Call the CommitContainer operation to create an asynchronous task that saves a specified container in an Elastic Container Instance (ECI) instance as an image and pushes the image to an image repository in Alibaba Cloud Container Registry (ACR).
Operation description
Before you call the CommitContainer operation, prepare an ACR image repository. Then, create a Resource Access Management (RAM) role and grant the required permissions. For more information, see Create an image from a container and push it to an ACR repository.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eci:CommitContainer |
create |
*CommitContainerTask
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region. |
cn-hangzhou |
| RegionId |
string |
Yes |
The ID of the region. |
cn-hangzhou |
| ContainerGroupId |
string |
Yes |
The ECI instance for which you want to create a CommitContainer task. |
eci-bp1do4xz75fa5sd**** |
| ContainerName |
string |
Yes |
The name of the container that you want to use to create the image. |
container-1 |
| Image |
object |
No |
The information about the container image. |
|
| Repository |
string |
Yes |
The address of the ACR image repository. |
registry-vpc.cn-beijing.aliyuncs.com/test/test-**** |
| Tag |
string |
Yes |
The tag of the image. If you leave this parameter empty, the tag is not modified. |
0.0.6 |
| Message |
string |
No |
The description of the image. |
test commit |
| Author |
string |
No |
Specifies the author of the image. |
alice |
| AcrRegistryInfo |
object |
No |
The access credential configurations for the ACR Enterprise Edition instance. Note
You do not need to configure this parameter if you use an ACR Personal Edition instance. You must configure this parameter if you use an ACR Enterprise Edition instance. |
|
| InstanceId |
string |
No |
The ID of the ACR Enterprise Edition instance. |
cri-nwj395hgf6f3**** |
| RegionId |
string |
No |
The region where the ACR Enterprise Edition instance is located. |
cn-hangzhou |
| ArnService |
string |
No |
In a cross-account authorization scenario, this is the Alibaba Cloud Resource Name (ARN) of the RAM role of the user who is granted permissions. |
acs:ram::1609982529******:role/role-test |
| ArnUser |
string |
No |
In a cross-account authorization scenario, this is the ARN of the RAM role of the user who grants the permissions. |
acs:ram::1298452580******:role/role-test |
| Arn |
object |
No |
The ARN information required for authorization. |
|
| RoleArn |
string |
No |
The ARN of the authorization role. |
acs:ram:xxx |
| RoleType |
string |
No |
The authorization type. Set the value to service to use a RAM role for authorization. |
service |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. This ID is unique. |
CB8D2B22-D636-4182-****-1FC9DBDAD66F |
| TaskId |
string |
The ID of the task. |
t-bp18cwvrb3v9tjk0tekz |
Examples
Success response
JSON format
{
"RequestId": "CB8D2B22-D636-4182-****-1FC9DBDAD66F",
"TaskId": "t-bp18cwvrb3v9tjk0tekz"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | %s | |
| 403 | InvalidVolumeType | The specified volumeName is invalid, only volume of cloud disk support capacity resize | |
| 403 | IncorrectStatusDetail | %s | |
| 403 | InvalidAction | The specified action is invalid |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.