You can call this operation to restart an elastic container instance.

Description

  • You can restart only elastic container instances that are in the Pending (Pending) or Running (Running) state. You cannot restart the instances that are in the Succeeded (Succeeded) or Failed (Failed) state.
  • You cannot restart the elastic container instances that were created before 15:00:00 on March 7, 2019.
  • When an elastic container instance is being restarted, it is in the Restarting state.

Debugging

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 No RestartContainerGroup

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

ContainerGroupId String Yes eci-2zelg8vwnlzdhf8hv****

The ID of the elastic container instance.

RegionId String Yes cn-hangzhou

The region ID of the elastic container instance.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Response parameters

Parameter Type Example Description
RequestId String 45D5B0AD-3B00-4A9B-9911-6D5303B06712

The ID of the request.

Examples

Sample requests

https://eci.aliyuncs.com/?Action=RestartContainerGroup
&ContainerGroupId=eci-2zelg8vwnlzdhf8hv****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<RestartContainerGroupResponse>
    <RequestId>45D5B0AD-3B00-4A9B-9911-6D5303B06712</RequestId>
<RestartContainerGroupResponse>

JSON format

{  
   "RequestId":"45D5B0AD-3B00-4A9B-9911-6D5303B06712"
}

Error codes

HTTP status code Error code Error message Description
400 IncorrectStatus %s The error message returned because the status of the specified elastic container instance is invalid.
403 InvalidAction The specified action is invalid The error message returned because the operation is invalid.
400 InvalidParameter %s The error message returned because a specified parameter is invalid.

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