All Products
Search
Document Center

Container Registry:GetArtifactBuildTask

Last Updated:Mar 01, 2024

Queries the details of an artifact building task.

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

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

cri-shac42yvqzvq****
BuildTaskIdstringYes

The ID of the artifact building task.

i2a-1yu****

Response parameters

ParameterTypeDescriptionExample
object
EndTimeinteger

The time when the artifact building task ends.

156871880
StartTimeinteger

The time when the artifact building task starts.

156871881
ArtifactBuildTypestring

The type of the artifact building 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: The artifact is being scheduled.
  • BUILDING: The artifact is being built.
  • SUCCESS: The artifact is built.
  • FAILED: The artifact fails to be built.
BUILDING
BuildTaskIdstring

The ID of the artifact building task.

i2a-1yu****
Codestring

The return value.

success
IsSuccessboolean

Indicates whether the request is successful.

true
Instructionsarray
string

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

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 version 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 version 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"
  }
}

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.