Domain name for API request: emr.tencentcloudapi.com.
This API is used to start, stop, or restart services.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: StartStopServiceOrMonitor. |
Version | Yes | String | Common Params. The value used for this API: 2019-01-03. |
Region | No | String | Common Params. This parameter is not required for this API. |
InstanceId | Yes | String | The cluster ID. |
OpType | Yes | String | The operation type. Valid values: |
OpScope | Yes | OpScope | The operation scope. |
StrategyConfig | No | StrategyConfig | The operation policy. |
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to start and stop cluster services.
POST / HTTP/1.1
Host: emr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: StartStopServiceOrMonitor
<Common request parameters>
{
"InstanceId": "emr-4zvc5mul",
"OpType": "StartService",
"OpScope": {
"ServiceInfoList": [
{
"ServiceName": "abc",
"ComponentInfoList": [
{
"ComponentName": "ZKFailoverController",
"IpList": [
"172.16.114.126"
]
}
]
}
]
},
"StrategyConfig": {
"RollingRestartSwitch": 0,
"BatchSize": 1,
"TimeWait": 5,
"DealOnFail": 0
}
}
{
"Response": {
"RequestId": "4c141dbb-b365-4c1b-a209-2c18e47fdb11"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation failed. |
InternalError.CamCgwError | An error occurred while calling another service API. |
InternalError.WoodServerError | An error occurred while calling another service API. |
InvalidParameter.InvalidInstanceName | Invalid cluster name. |
InvalidParameter.InvalidJobFlow | Invalid process task. |
ResourceInUse.InstanceInProcess | The instance is under workflow. |
ResourceNotFound.InstanceNotFound | The instance was not found. |
UnauthorizedOperation.CheckCamAuth | Unauthorized operation. |
UnsupportedOperation.ServiceNotSupport | This operation is not supported. |
Was this page helpful?