Restarts a container group.
Description
When you call this operation, take note of the following:
- You can only restart container groups that are in the Pending or Running state. You cannot restart container groups that are in the Succeeded state.
- You cannot restart container groups that were created before 15:00:00 on March 7, 2019.
- When a container group is restarting, it is in the Restarting state.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
ContainerGroupId | String | Yes | eci-djfioduf35gitgyif |
The ID of the container group. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the container group. |
Action | String | No | RestartContainerGroup |
The operation that you want to perform. Set the value to RestartContainerGroup. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
The client token that is used to guarantee the idempotence of the request. You can use the client to generate the value, but you must make sure that the value 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 unique ID of the request. |
Examples
Sample requests
http(s)://eci.aliyuncs.com/? Action=RestartContainerGroup
&ContainerGroupId=eci-djfioduf35gitgyif
&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 container group is invalid. |
403 | InvalidAction | The specified action is invalid | The error message returned because the specified operation is invalid. |
400 | InvalidParameter | %s | The error message returned because the specified parameter is invalid. |
For a list of error codes, visit the API Error Center.