You can call the ModifyDBInstanceDeletionProtection operation to enable or disable the release protection feature for an ApsaraDB RDS instance.
For more information, see Enable or disable the release protection feature for an ApsaraDB RDS for MySQL instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ModifyDBInstanceDeletionProtection | The operation that you want to perform. Set the value to ModifyDBInstanceDeletionProtection. |
| ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxxxxx | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. |
| DBInstanceId | String | Yes | rm-uf6wjk5xxxxxxx | The ID of the instance. You can call the DescribeDBInstances operation to query the instance ID. Note
|
| DeletionProtection | Boolean | Yes | true | Specifies whether to enable the release protection feature for the instance. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 3C5CFDEE-F774-4DED-89A2-1D76EC63C575 | The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=ModifyDBInstanceDeletionProtection
&DBInstanceId=rm-uf6wjk5xxxxxxx
&DeletionProtection=true
&Common request parametersSample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBInstanceDeletionProtectionResponse>
<RequestId>3C5CFDEE-F774-4DED-89A2-1D76EC63C575</RequestId>
</ModifyDBInstanceDeletionProtectionResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "3C5CFDEE-F774-4DED-89A2-1D76EC63C575"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | OperationDenied.PayType | The operation is not permitted due to pay type of instance. | The error message returned because the operation failed. The billing method of the instance does not support this operation. |
For a list of error codes, visit the API Error Center.