All Products
Search
Document Center

Elastic Container Instance:CommitContainer

Last Updated:Sep 13, 2024

Creates an asynchronous task to store a specified container in an elastic container instance as an image and pushes the image to an image repository of Alibaba Cloud Container Registry.

Operation description

You must specify the Alibaba Cloud Resource Name (ARN) of the RAM role of the Container Registry Enterprise Edition instance to grant the elastic container instance to assume the RAM role to push images.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eci:CommitContainercreate
  • CommitContainerTask
    acs:eci:{#regionId}:{#accountId}:containergroup/*
  • eci:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
ContainerGroupIdstringYes

The ID of the container group.

eci-bp1do4xz75fa5sd****
ContainerNamestringYes

The name of the container.

container-1
ImageobjectNo

The image of the container.

RepositorystringYes

The image repository.

registry-vpc.cn-hangzhou.aliyuncs.com/eastest/registry-test
TagstringYes

The tag of the image. This parameter is empty by default, which indicates that the tag is not modified.

0.0.6
MessagestringNo

The message about the image.

test commit
AuthorstringNo

The authorization of the image.

ECI
AcrRegistryInfoobjectNo

The access credential configurations of the Container Registry Enterprise Edition instance.

Note If you use a Container Registry Personal Edition instance, you do not need to configure this parameter. If you use a Container Registry Enterprise Edition instance, you must configure this parameter.
InstanceIdstringNo

The ID of the Container Registry Enterprise Edition instance.

cri-nwj395hgf6f3****
RegionIdstringNo

The region ID of the Container Registry Enterprise Edition instance.

cn-hangzhou
ArnServicestringNo

The Alibaba Cloud Resource Access (ARN) of the RAM role that is assigned to the user (the authorized account) in cross-account authorization scenarios.

acs:ram::1609982529******:role/role-test
ArnUserstringNo

The ARN of the RAM role that is assigned to the authorizer in cross-account authorization scenarios.

acs:ram::1298452580******:role/role-test
ArnobjectNo

The details about the ARN that is required for authorization.

RoleArnstringNo

The ARN of the authorized role.

acs:ram:xxx
RoleTypestringNo

The authorization type. A value of service indicates that RAM roles are used for authorization.

user

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

CB8D2B22-D636-4182-****-1FC9DBDAD66F
TaskIdstring

The ID of the task.

t-bp18cwvrb3v9tjk0tekz

Examples

Sample success responses

JSONformat

{
  "RequestId": "CB8D2B22-D636-4182-****-1FC9DBDAD66F",
  "TaskId": "t-bp18cwvrb3v9tjk0tekz"
}

Error codes

HTTP status codeError codeError message
400InvalidParameter%s
403InvalidVolumeTypeThe specified volumeName is invalid, only volume of cloud disk support capacity resize
403IncorrectStatusDetail%s
403InvalidActionThe specified action is invalid

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-01The Error code has changed. The request parameters of the API has changedView Change Details
2023-06-27The Error code has changedView Change Details
2023-03-30The Error code has changedView Change Details
2023-03-08The Error code has changed. The request parameters of the API has changedView Change Details