Enables or disables protection for one or more Elastic Compute Service (ECS) instances in a scaling group. Protected instances are not stopped or released during scale-in events. You can manually remove protected instances from the Auto Scaling console or by calling the RemoveInstances operation.
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 |
Whether to protect ECS instances from being stopped or removed from the scaling group during scale-in events. Valid values:
|
true |
| InstanceIds |
array |
Yes |
The IDs of the ECS instances. |
|
|
string |
No |
The IDs of the ECS instances. |
i-28wt4**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
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.