All Products
Search
Document Center

Elastic Container Instance:CommitContainer

Last Updated:Apr 15, 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:CommitContainerWrite
  • All Resources
    *
  • 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.
If you use a Container Registry Personal Edition instance, you can leave this parameter empty.

InstanceIdstringNo

The ID of the Container Registry Enterprise Edition instance.

cri-nwj395hgf6f3****
RegionIdstringNo

The ID of the region where the Container Registry Enterprise Edition instance resides.

cn-hangzhou
ArnServicestringNo

The RAM role ARN of the account to which permissions are granted during a cross-account authorization.

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

The RAM role ARN of the account that is used to grant permissions during a cross-account authorization.

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

The ARN that is required for authorization.

RoleArnstringNo

The ARN of the RAM role of the Container Registry Enterprise Edition instance.

acs:ram:xxx
RoleTypestringNo

The type of the 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 changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    delete Input Parameters: ImageCacheParam
    delete Input Parameters: AutoImageCache
    delete Input Parameters: ExcludePath
2023-06-27The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
2023-03-30The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
2023-03-08The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ImageCacheParam
    Added Input Parameters: AutoImageCache
    Added Input Parameters: ExcludePath