调用StopDBInstance接口暂停RDS MySQL、RDS PostgreSQL、RDS SQL Server实例或专属集群内的实例。

  • 不支持暂停RDS MySQL Serverless实例,Serverless实例支持自动启停功能,详情请参见配置Serverless实例
  • 暂停RDS MySQL实例的注意事项,请参见暂停实例
  • 暂停RDS PostgreSQL实例的注意事项,请参见暂停实例
  • 暂停RDS SQL Server实例的注意事项,请参见暂停实例
  • 暂停专属集群内实例的注意事项:
    • 停止实例会释放实例的计算资源,保留数据,保留的数据可用于启动实例。
    • 停止实例会同时停止实例下的只读实例。
    • 停止实例后,因为数据存储在已付费的存储资源上,所以不需要支付额外费用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String StopDBInstance

系统规定参数。取值:StopDBInstance

DBInstanceId String rm-bp1q915x50h******

实例ID。可调用DescribeDBInstances获取。

RegionId String cn-hangzhou

地域ID。可调用DescribeRegions获取。

返回数据

名称 类型 示例值 描述
RequestId String A417FB41-A3D9-464E-AD0A-C7FE05C72E98

请求ID。

示例

请求示例

http(s)://rds.aliyuncs.com/?Action=StopDBInstance
&DBInstanceId=rm-bp1q915x50h******
&RegionId=cn-hangzhou
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<StopDBInstanceResponse>
    <RequestId>A417FB41-A3D9-464E-AD0A-C7FE05C72E98</RequestId>
</StopDBInstanceResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A417FB41-A3D9-464E-AD0A-C7FE05C72E98"
}

错误码

HttpCode 错误码 错误信息 描述
400 EngineNotSupported The engine does not support the operation. 当前引擎不支持此操作。
400 ReadOnlyInstanceNotSupport Specified ReadOnly Instance not support this operation. 操作失败,只读实例不支持此操作。
400 InvalidShareInstance.NotSupport The share dbInstance is not support. 共享型实例不支持
400 ReadonlyInstanceNotSupport The operation is not permitted due to type of the instance. 指定的只读实例不支持此操作。
400 InstanceHasReadOnlyInstanceNotSupportStop The instance has read-only instance , stop is not supported 实例有只读实例,不支持暂停实例

访问错误中心查看更多错误码。