Starts or stops protection for one or more ECS instances in a scaling group.
Operation description
Operation description
After the protection status is enabled for an ECS instance:
-
The instance remains in this state until you stop the protection status.
-
Even if the number of instances in the scaling group changes or a monitoring node triggers a scale-in scaling activity, ECS instances in the protection status are not removed. You must remove the ECS instances before you can release them. For more information, see Remove ECS instances.
-
The health check status of an ECS instance is not updated when the instance is stopped or restarted.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:SetInstancesProtection |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp18p2yfxow2dloq**** |
| ProtectedFromScaleIn |
boolean |
Yes |
Specifies whether to protect ECS instances from being terminated or removed from the scaling group during a scale-in activity. Valid values:
|
true |
| InstanceId |
array |
Yes |
The ID of the ECS instance. |
i-28wt4**** |
|
string |
No |
The ID of the ECS instance. Valid values of N: 1 to 20. |
i-28wt4**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.