Retrieves the build task of a cloud native artifact.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cr:GetArtifactBuildTask |
get |
*Instance
|
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 |
| 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:
|
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.