调用ModifyDBInstanceDeletionProtection接口开启或关闭RDS实例的释放保护功能。
更多信息,请参见开启或关闭实例释放保护。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ModifyDBInstanceDeletionProtection |
系统规定参数。取值:ModifyDBInstanceDeletionProtection。 |
ClientToken | String | 否 | ETnLKlblzczshOTUbOCzxxxxxxxxxx |
用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过64个ASCII字符,且该参数值中不能包含非ASCII字符。 |
DBInstanceId | String | 是 | rm-uf6wjk5xxxxxxx |
实例ID。可调用DescribeDBInstances获取。 说明
|
DeletionProtection | Boolean | 是 | true |
是否开启RDS释放保护功能。取值:
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 3C5CFDEE-F774-4DED-89A2-1D76EC63C575 |
请求ID。 |
示例
请求示例
http(s)://rds.aliyuncs.com/?Action=ModifyDBInstanceDeletionProtection
&DBInstanceId=rm-uf6wjk5xxxxxxx
&DeletionProtection=true
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBInstanceDeletionProtectionResponse>
<RequestId>3C5CFDEE-F774-4DED-89A2-1D76EC63C575</RequestId>
</ModifyDBInstanceDeletionProtectionResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "3C5CFDEE-F774-4DED-89A2-1D76EC63C575"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | OperationDenied.PayType | The operation is not permitted due to pay type of instance. | 操作失败,实例当前计费模式不支持此操作。 |
访问错误中心查看更多错误码。