You can call RunClusterServiceAction operation to run specified operations on a specified service of a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | RunClusterServiceAction |
The operation that you want to perform. This parameter is required for API requests that you create by piecing together HTTP or HTTPS URLs. Set the value to RunClusterServiceAction. |
ServiceName | String | Yes | TEZ |
The name of the service. The service name of an existing service in the cluster. |
ClusterId | String | Yes | C-F32FB31D8295**** |
The ID of the cluster. You can call ListClusters You can call this operation to view the ID of a cluster. |
RegionId | String | Yes | cn-hangzhou |
The region ID. You can call DescribeRegions To view the latest list of Alibaba Cloud regions. |
ServiceActionName | String | Yes | STOP |
Action name:
|
HostGroupIdList.N | RepeatList | No | 1 |
The ID of the host group. You can call ListClusterHostGroup View Machine Group ID. |
HostIdList | String | No | "" |
The list of host IDs. Separate host IDs with commas (,). |
CustomCommand | String | No | "" |
In the ServiceActionName for CUSTOM_COMMAND When, you need to specify. For example, you can run the following command: refreshQueues . |
ComponentNameList | String | No | Tomcat |
The list of components. Separate component names with commas (,). |
Comment | String | No | test run action |
The comment for the action. |
IsRolling | Boolean | No | true |
Specifies whether to roll actions. |
ExecuteStrategy | String | No | FAILED_BLOCK |
Task execution policy:
|
CustomParams | String | No | "" |
Optional configuration parameters for running custom actions. Currently, only the following configuration parameters are supported: innode_disks_balance of kafka . |
Interval | Long | No | 60 |
The execution interval of each task. IsRolling is true Can be specified when. |
NodeCountPerBatch | Integer | No | 2 |
The number of hosts on which each batch is performed. The IsRolling is true Can be specified when. |
TotlerateFailCount | Integer | No | 5 |
A reserved parameter. You do not need to specify this parameter. |
OnlyRestartStaleConfigNodes | Boolean | No | true |
Specifies whether to modify only the host where the configuration items runs the command. Valid values:
|
TurnOnMaintenanceMode | Boolean | No | false |
Enable the maintenance mode:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 9AEDC439-1F63-491D-B8C6-9737C372BF3A |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=RunClusterServiceAction
&ClusterId=C-F32FB31D8295****
&RegionId=cn-hangzhou
&ServiceActionName=STOP
&<common request parameters>
Sample success responses
XML
format
<requestId>9AEDC439-1F63-491D-B8C6-9737C372BF3A</requestId>
JSON
Syntax
{
"requestId": "9AEDC439-1F63-491D-B8C6-9737C372BF3A"
}