All Products
Search
Document Center

Container Registry:GetArtifactBuildTask

Last Updated:Sep 17, 2026

Retrieves the build task of a cloud native artifact.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cr:GetArtifactBuildTask

get

*Instance

acs:cr:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

cri-shac42yvqzvq****

BuildTaskId

string

Yes

The ID of the artifact build task.

i2a-1yu****

Response elements

Element

Type

Description

Example

object

ArtifactBuildType

string

The artifact build type. Valid values:

  • IMAGE_TO_ACCELERATED_IMAGE: accelerated image optimized for ACK scenarios.

  • IMAGE_TO_ECI_ACCELERATED_IMAGE: accelerated image artifact optimized for Elastic Container Instance (ECI) scenarios.

IMAGE_TO_ACCELERATED_IMAGE

ArtifactCompression

object

The artifact compression parameters.

Platform

string

The operating system/architecture.

linux/arm64

SquashKeepLayers

integer

The number of layers retained after compression.

10

StartLayerDigest

string

The digest of the starting layer for compression.

sha256:xxxxx

BuildTaskId

string

The ID of the artifact build task.

i2a-1yu****

Code

string

The return code.

success

EndTime

integer

The end time. The value is a UNIX timestamp in seconds.

1685415871

Instructions

array

The reserved field list of the artifact build task. The list elements should be empty.

string

The reserved field. The value must be empty.

null

IsSuccess

boolean

Indicates whether the request was successful.

true

Priority

integer

The task priority.

3

RequestId

string

The request ID.

C4C7DD0C-C9D6-437A-A7EE-121EFD70D002

SourceArtifact

object

The source artifact.

ArtifactType

string

The artifact type. Currently, only IMAGE is supported.

IMAGE

LayerCount

integer

The number of artifact layers.

10

RepoId

string

The repository ID. Currently, only image repositories are supported.

cri-shac42yvqzvq****

Size

integer

The artifact size, in bytes.

5

Version

string

The artifact version. Currently, only image versions are supported.

latest

StartTime

integer

The start time. The value is a UNIX timestamp in seconds.

1685437471

TargetArtifact

object

The target artifact.

ArtifactType

string

The artifact type. Currently, only IMAGE is supported.

IMAGE

LayerCount

integer

The number of artifact layers.

5

RepoId

string

The repository ID. Currently, only image repositories are supported. The repository ID of the target artifact must be the same as that of the source artifact.

crr-1234567

Size

integer

The artifact size, in bytes.

10

Version

string

The artifact version. Currently, only images are supported.

latest_accelerated

TaskStatus

string

The artifact build status. Valid values:

  • PENDING: Scheduling.

  • BUILDING: Building.

  • SUCCESS: Build succeeded.

  • FAILED: Build failed.

BUILDING

Examples

Success response

JSON format

{
  "ArtifactBuildType": "IMAGE_TO_ACCELERATED_IMAGE",
  "ArtifactCompression": {
    "Platform": "linux/arm64",
    "SquashKeepLayers": 10,
    "StartLayerDigest": "sha256:xxxxx"
  },
  "BuildTaskId": "i2a-1yu****",
  "Code": "success",
  "EndTime": 1685415871,
  "Instructions": [
    "null"
  ],
  "IsSuccess": true,
  "Priority": 3,
  "RequestId": "C4C7DD0C-C9D6-437A-A7EE-121EFD70D002",
  "SourceArtifact": {
    "ArtifactType": "IMAGE",
    "LayerCount": 10,
    "RepoId": "cri-shac42yvqzvq****",
    "Size": 5,
    "Version": "latest"
  },
  "StartTime": 1685437471,
  "TargetArtifact": {
    "ArtifactType": "IMAGE",
    "LayerCount": 5,
    "RepoId": "crr-1234567",
    "Size": 10,
    "Version": "latest_accelerated"
  },
  "TaskStatus": "BUILDING"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.