Gracefully runs commands on an ECS instance in an SLB vServer group by adjusting the instance weight before and after execution to avoid service interruption.
Description
Gracefully runs commands on an Elastic Compute Service (ECS) instance in a vServer group of a Server Load Balancer (SLB) instance. The instance weight is set to zero before command execution and restored afterward to prevent service interruption during maintenance.
Syntax
Action: ACS::ECS::ElegantRunCommandInSLBVServerGroup
Properties:
regionId: String
VServerGroupId: String
serverId: String
weight: Number
type: String
port: Number
commandType: String
commandContent: String
Attributes
|
Attribute |
Description |
Type |
Required |
Default value |
Limit |
|
regionId |
The region ID. |
String |
No |
{{ ACS::RegionId }} |
|
|
VServerGroupId |
The ID of the vServer group of the SLB instance. |
String |
Yes |
||
|
serverId |
The ECS instance ID. |
String |
Yes |
||
|
weight |
The weight of the backend server. |
Number |
Yes |
||
|
type |
The type of the backend server. |
String |
Yes |
||
|
port |
The port of the backend server. |
Number |
Yes |
||
|
commandType |
The command type. |
String |
No |
RunShellScript |
|
|
commandContent |
The commands to be run on the ECS instance. |
String |
Yes |
Output
|
Output item |
Description |
Type |
|
commandOutput |
String |
References
For more information, see ACS::ECS::ElegantRunCommandInSLBVServerGroup.yml on GitHub.