You can call this operation to run actions on services.

Request parameters

Name Type Required Example Description
ServiceName String No TEZ The name of the service.
ClusterId String Yes C-F32FB31D82954C64 The ID of the cluster.
RegionId String Yes cn-hangzhou RegionID
ServiceActionName String Yes STOP The name of the action.
Comment String No test run action The description of the action.
ComponentNameList String No Tomcat The list of component names. Names are separated by commas (,).
CustomCommand String No "" Required when the value of ServiceActionName is CUSTOM_COMMAND. For example, refreshQueues.
HostIdList String No "" The list of host IDs. IDs are separated by commas (,).
Interval Long No 60 The interval between actions. Specified when the value of IsRolling is true.
IsRolling Boolean No true Indicates whether to repeat the action.
NodeCountPerBatch Integer No 2 The number of nodes to run each batch of actions. Specified when IsRolling = true.
OnlyRestartStaleConfigNodes Boolean No true A value of true indicates that nodes are restarted only when the configuration items are modified.
TotlerateFailCount Integer No 5 A reserved parameter. The maximum number of failed jobs that a workflow can tolerate.
TurnOnMaintenanceMode Boolean No false Indicates whether to enable maintenance mode.
AccessKeyId String No 111 The AccessKey ID.

Response parameters

Name Type Example Description
RequestId String A544317F-4A60-4532-AC96-191B9D80420A The ID of the request.

Examples

  • Sample requests
    /? ClusterId=C-F32FB31D82954C64
    &RegionId=cn-hangzhou
    &ServiceActionName=STOP
    &AccessKeyId=111
    &Comment=test run action
    &ComponentNameList=Tomcat
    &CustomCommand=""
    &HostIdList=""
    &Interval=60
    &IsRolling=true
    &NodeCountPerBatch=2
    &OnlyRestartStaleConfigNodes=true
    &ServiceName=TEZ
    &TotlerateFailCount=5
    &TurnOnMaintenanceMode=false
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"requestId":"9AEDC439-1F63-491D-B8C6-9737C372BF3A"
    }
  • Error response examples
    JSON format
    {
    	"code":"RAM.Permission.NotAllow",
    	"message":"It is not allow to execute this operation,please use RAM to authorize!",
    	"requestId":"9AEDC439-1F63-491D-B8C6-9737C372BF3A",
    	"successResponse":false
    }

Error codes

View error codes.