Sets deletion protection for a scaling group. If you enable deletion protection for a scaling group, you cannot delete the scaling group. If you disable deletion protection for a scaling group, you can directly delete the scaling group. You can call the SetGroupDeletionProtection operation to enable or disable deletion protection.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | SetGroupDeletionProtection | The operation that you want to perform. Set the value to SetGroupDeletionProtection. |
GroupDeletionProtection | Boolean | Yes | true | Specifies whether to enable deletion protection for the scaling group. Valid values:
Default value: false. |
ScalingGroupId | String | Yes | asg-bp1igpak5ft1flyp**** | The ID of the scaling group. |
RegionId | String | No | cn-qingdao | The region ID of the scaling group. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | CCC29E24-3AEC-4F2C-8A14-78B14FA7**** | The request ID. |
Examples
Sample requests
http(s)://ess.aliyuncs.com/?Action=SetGroupDeletionProtection
&GroupDeletionProtection=true
&ScalingGroupId=asg-bp1igpak5ft1flyp****
&RegionId=cn-qingdao
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SetGroupDeletionProtectionResponse>
<RequestId>CCC29E24-3AEC-4F2C-8A14-78B14FA7****</RequestId>
</SetGroupDeletionProtectionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CCC29E24-3AEC-4F2C-8A14-78B14FA7****"
}
Error codes
For a list of error codes, see Service error codes.
HTTP status code | Error code | Error message | Description |
404 | InvalidScalingGroupId.NotFound | The specified scaling group does not exist. | The scaling group does not exist. |
400 | InvalidOperation.Conflict | Specific operation may conflicts with other operations, please retry later. | The operation conflicts with another operation that is in progress. Try again later. |