Domain name for API request: batch.tencentcloudapi.com.
This API is used to terminate a task instance.SUCCEED
and FAILED
task instances: No actionSUBMITTED
, PENDING
, and RUNNABLE
task instances: Change status to FAILED
.STARTING
, RUNNING
and FAILED_INTERRUPTED
task instances: If EnvId
is not specified, the CVM instance is terminated, and then the task status goes to FAILED
. If EnvId
is specified, the task instance changes to FAILED
, then the related CVM instance is restarted.FAILED_INTERRUPTED
task instances: The related resources and quotas will be released only after the termination actually succeeds.
A maximum of 2 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: TerminateTaskInstance. |
Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
Region | No | String | Common Params. This parameter is not required for this API. |
JobId | Yes | String | Job ID |
TaskName | Yes | String | Task name |
TaskInstanceIndex | Yes | Integer | Task instance index |
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://batch.tencentcloudapi.com/?Action=TerminateTaskInstance
&JobId=job-rybewp57
&TaskName=A
&TaskInstanceIndex=0
&<Common request parameters>
{
"Response": {
"RequestId": "72e9a712-1fed-4b57-be72-62e71eefd4c3"
}
}
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 |
---|---|
InternalError | Internal error. |
InvalidParameter.JobIdMalformed | Invalid job ID format. |
ResourceNotFound.TaskInstance | The specified task instance does not exist. |
UnsupportedOperation.TerminateOperationWithEnvId | This operation is prohibited for the task instances in the specified compute environment. |
本页内容是否解决了您的问题?