All Products
Search
Document Center

Container Registry:GetArtifactBuildTask

Last Updated:Mar 24, 2023

Queries the details of an artifact building task.

Operation Description

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 keyAssociation operation
cr:GetArtifactBuildTaskRead
  • CR
    acs:cr:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the Container Registry instance.

cri-shac42yvqzvq****
BuildTaskIdstringYes

The ID of the artifact build task.

i2a-1yu****

Response parameters

ParameterTypeDescriptionExample
object
EndTimeinteger

The end time of the artifact build task.

156871880
StartTimeinteger

The start time of the artifact build task.

156871881
ArtifactBuildTypestring

The type of the artifact build task. Valid values:

  • IMAGE_TO_ACCELERATED_IMAGE: builds accelerated images for Container Service for Kubernetes (ACK) clusters.
  • IMAGE_TO_ECI_ACCELERATED_IMAGE: builds accelerated images for elastic container instances.
IMAGE_TO_ACCELERATED_IMAGE
RequestIdstring

The ID of the request.

C4C7DD0C-C9D6-437A-A7EE-121EFD70D002
TaskStatusstring

The status of the artifact that is built in the task. Valid values:

  • PENDING
  • BUILDING
  • SUCCESS
  • FAILED
BUILDING
BuildTaskIdstring

The ID of the artifact build task.

i2a-1yu****
Codestring

The response code.

success
IsSuccessboolean

Indicates whether the operation is successful.

true
Instructionsarray

This parameter is left empty because it is a reserved parameter.

string
null
SourceArtifactobject

The information about the source artifact.

RepoIdstring

The ID of the repository to which the source artifact belongs. The repository can only be an image repository.

cri-shac42yvqzvq****
Versionstring

The tag of the artifact. The artifact can only be an image.

latest
ArtifactTypestring

The type of the artifact that is built in the task. The value can only be IMAGE.

IMAGE
TargetArtifactobject

The artifact that is built in the task.

RepoIdstring

The ID of the repository to which the artifact that is built in the task belongs. The repository can only be an image repository. The value is the same as the ID of the repository to which the source artifact belongs.

crr-1234567
Versionstring

The tag of the artifact that is built in the task. The artifact can only be an image.

latest_accelerated
ArtifactTypestring

The type of the artifact that is built in the task. The value can only be IMAGE.

IMAGE

Examples

Sample success responses

JSONformat

{
  "EndTime": 156871880,
  "StartTime": 156871881,
  "ArtifactBuildType": "IMAGE_TO_ACCELERATED_IMAGE",
  "RequestId": "C4C7DD0C-C9D6-437A-A7EE-121EFD70D002",
  "TaskStatus": "BUILDING",
  "BuildTaskId": "i2a-1yu****",
  "Code": "success",
  "IsSuccess": true,
  "Instructions": [
    "null"
  ],
  "SourceArtifact": {
    "RepoId": "cri-shac42yvqzvq****",
    "Version": "latest",
    "ArtifactType": "IMAGE"
  },
  "TargetArtifact": {
    "RepoId": "crr-1234567",
    "Version": "latest_accelerated",
    "ArtifactType": "IMAGE"
  }
}

Error codes

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