You can call this operation to run specified actions on a specified service of a cluster.


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 RunClusterServiceAction

The operation that you want to perform. Set the value to RunClusterServiceAction.

ClusterId String Yes C-F32FB31D82954C64

The ID of the cluster.

RegionId String Yes cn-hangzhou

The ID of the region to which the cluster belongs.

ServiceActionName String Yes STOP

The name of the action to be run on the service.

ServiceName String No TEZ

The name of the service.

Comment String No test run action

The comment for the action.

ComponentNameList String No Tomcat

The component name list of the service. You must separate each name with a comma (,).

CustomCommand String No ""

The command of the custom action. You must specify a custom action such as refreshQueues if you set the Action field to CUSTOM_COMMAND.

CustomParams String No ""

The parameters for running custom actions. You can only run the innode_disks_balance action in a Kafka cluster.

ExecuteStrategy String No FAILED_BLOCK

The policy to run a task. Valid values:

HostGroupIdList.N RepeatList No 1

The ID of the host group.

HostIdList String No ""

The IDs of the hosts. You must separate each ID with a comma (,).

Interval Long No 60

The interval for running each task. You can specify the parameter after you set the IsRolling parameter to true.

IsRolling Boolean No true

Specifies whether to roll actions.

NodeCountPerBatch Integer No 2

The number of hosts on which the action is to run for each batch. You can specify this parameter after you set the IsRolling parameter to true.

OnlyRestartStaleConfigNodes Boolean No true

If you set this parameter to true, you can only run actions on hosts that have the configuration file changed.

TotlerateFailCount Integer No 5

A reserved parameter.

TurnOnMaintenanceMode Boolean No false

Specifies whether to enable the maintenance mode for the hosts.

AccessKeyId String No 111

The AccessKey ID provided to you by Alibaba Cloud. This parameter identifies the user.

Response parameters

Parameter Type Example Description
RequestId String 9AEDC439-1F63-491D-B8C6-9737C372BF3A

The ID of the request.


Sample requests

http(s)://[Endpoint]/? Action=RunClusterServiceAction
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

HTTP status code Error code Error message Description
403 Params.Illegal The specified parameters are wrongly formed. The error message returned because the format of the specified parameters is invalid.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource. The error message returned because you are not authorized to manage other user's resources.
403 User.Account.Abnormal The User Account maybe is out of service! The error message returned because the user account is out of service.
403 JobId.Not.Exist Job [%s] does not exist or is deleted! The error message returned because the ID of the specified job does not exist. Specify a valid value.
403 Job.RegionId.Not.Match Specified job does not exist in this region[%s]! The error message returned because the job is not in the region where your cluster resides. Specify a valid value.
500 InternalError The request processing has failed due to some unknown error. The error message returned because the request processing has failed due to an internal error. Submit a ticket.

For a list of error codes, visit the API Error Center.