Calls 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, create a RAM role, and complete the authorization. For more information, see Commit a container to generate an image and push the image to ACR.
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 region ID. |
cn-hangzhou |
| RegionId |
string |
Yes |
The ECI instance for which you want to create a CommitContainer task. |
eci-bp1do4xz75fa5sd**** |
| ContainerGroupId |
string |
Yes |
The name of the container from which you want to create an image. |
container-1 |
| ContainerName |
string |
Yes |
The container image information. |
container-1 |
| Image |
object |
No |
The access credential configuration for a Container Registry Enterprise Edition instance. Note
You do not need to configure this parameter when you use a Container Registry Personal Edition instance. You must configure this parameter when you use a Container Registry Enterprise Edition instance. |
|
| 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 |
| ArnService |
No |
The ARN of the RAM role of the consumer (authorized party) in a cross-account authorization scenario. |
acs:ram::1609982529******:role/role-test |
|
| InstanceId |
No |
The instance ID of the ACR Enterprise instance. |
cri-nwj395hgf6f3**** |
|
| RegionId |
No |
The region where the ACR Enterprise instance resides. |
cn-hangzhou |
|
| ArnUser |
No |
The ARN of the RAM role of the authorizer in a cross-account authorization scenario. |
acs:ram::1298452580******:role/role-test |
|
| AcrRegistryInfo |
object |
No |
The ARN information required for authorization. |
|
| 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 |
| RoleType |
No |
The authorization type. Set this parameter to service, which indicates that a RAM role is used for authorization. |
service |
|
| RoleArn |
No |
The ARN of the authorized role. |
acs:ram:xxx |
|
| 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 request ID, which uniquely identifies the request. |
CB8D2B22-D636-4182-****-1FC9DBDAD66F |
| TaskId |
string |
The task ID. |
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 | The parameter is invalid. |
| 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.