All Products
Search
Document Center

Auto Scaling:SetGroupDeletionProtection

Last Updated:May 07, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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:

  • true: enables deletion protection. In this case, you cannot delete the scaling group by using the Auto Scaling console or calling an API operation. In this case, you cannot delete the scaling group by using the Auto Scaling console or calling an API operation.

  • false: disables deletion protection.

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.