GetImageBuild
Retrieves the details of an image build.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paiimage:GetImageBuild |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/imagebuilds/{ImageBuildId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageBuildId |
string |
Yes |
The ID of the image build. |
build-****abcd |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
681192FB-****-****-****-*****C9E4 |
| Accessibility |
string |
The visibility of the image build. |
PUBLIC |
| GmtCreateTime |
string |
The creation time. |
2025-11-04T06:22:02.000Z |
| WorkspaceId |
string |
The workspace ID. |
12345 |
| Resource |
object |
The runtime resources for the build job. |
|
| EcsSpec |
string |
The pay-as-you-go resource specifications. This parameter is not required when you use subscription resources. |
ecs.c6.large |
| ResourceConfig |
object |
The resource configuration. This parameter is not required when you use pay-as-you-go resources. |
|
| CPU |
string |
The number of CPU cores used by the image build job. For example, 4 indicates 4 cores. |
4 |
| Memory |
string |
The memory capacity used by the image build job. For example, 8Gi indicates 8 GiB. |
8Gi |
| ResourceId |
string |
The resource quota ID. |
quota123434 |
| ResourceType |
string |
The resource type. Example: Lingjun. |
Lingjun |
| UserVpc |
object |
The user VPC information. |
|
| VpcId |
string |
The VPC ID. |
vpc-abcdef** |
| SwitchId |
string |
The vSwitch ID. |
vs-abcdef** |
| SecurityGroupId |
string |
The security group ID. |
sg-abcdef** |
| DefaultRoute |
string |
The default route ENI egress. |
eth1 |
| ExtendedCidrs |
array |
The extended CIDR blocks. |
|
|
string |
The Classless Inter-Domain Routing (CIDR) block, which specifies the IP address and prefix length. |
10.0.0.0/24 |
|
| TargetRegistry |
object |
The target image service configuration. |
|
| InstanceId |
string |
The ID of the Container Registry (ACR) Enterprise instance that stores the build artifacts. |
cri-**abcd |
| Type |
string |
The type of the target image service. AcrEnterprise indicates Container Registry (ACR) Enterprise Edition. |
AcrEnterprise |
| ImageBuildId |
string |
The ID of the image build. |
build-****ks92 |
| OverwriteImageTag |
boolean |
Specifies whether to overwrite the image. |
|
| BuildConfig |
object |
The build configuration, which specifies the content of the Dockerfile to be built. Valid values for BuildType:
|
|
| Dockerfile |
string |
The content of the Dockerfile. |
FROM ubuntu:18:04 RUN pip3 install numpy==1.19.5 |
| BuildType |
string |
The image build method. PackageInstallation indicates installing software packages on a specified base image. CustomDockerfile indicates building an image by using a custom Dockerfile. |
PackageInstallation |
| DockerfilePath |
string |
The path of the Dockerfile, which is a relative path to the mounted context path. |
docker/Dockerfile |
| DataSources |
array<object> |
The list of data sources. |
|
|
object |
The data source object. |
||
| DataSourceId |
string |
The ID of the dataset in the workspace. |
d-************zbs |
| Uri |
string |
The storage path, including the endpoint. This parameter is mutually exclusive with DataSourceId. |
oss://{bucket-name}.oss-{region}-internal.aliyuncs.com/{subPath}/ |
| MountPath |
string |
The mount path. |
/mnt/data/ |
| MountAccess |
string |
The read and write permissions for the contextual mount of the build. |
RO |
| Options |
string |
The custom mount property for the custom dataset. Currently, only OSS is supported. |
{"fs.oss.download.thread.concurrency":"10"} |
| DataSourceVersion |
string |
The version of the dataset. If you specify this parameter, you must also specify DataSourceId. |
v1 |
| ImageBuildJobId |
string |
The ID of the build job. |
dlc-****ks92 |
| ImageBuildJobName |
string |
The name of the image build job. |
build-my-image |
| Creator |
string |
The creator. |
12345678******** |
| Image |
object |
The information about the custom image generated by the build, including the image name, description, URI, and labels. |
|
| Name |
string |
The display name of the generated image in the workspace. |
test-v1 |
| Description |
string |
The description of the generated image in the workspace. |
Build test image |
| Uri |
string |
The full URI of the generated image in the target repository, including the repository domain name, namespace, repository name, and image version label (tag). |
user-test-registry-vpc.cn-wulanchabu.cr.aliyuncs.com/pai-test/pai-test:test-v1 |
| Labels |
array<object> |
The list of labels used to tag the image in the workspace. Each label consists of a key and a value. |
|
|
object |
An image label, which includes a key and a value. |
||
| Key |
string |
The key of the image label, which identifies the name of the label. |
key1 |
| Value |
string |
The value of the image label, which corresponds to the key in the same label. |
value1 |
| GmtModifiedTime |
string |
The time when the image build record was last updated. The time is in ISO 8601 format. |
2025-11-04T06:22:02.000Z |
| ImageId |
string |
The ID of the custom image generated by the build in the PAI workspace. |
image-4c62******53uor |
| ImageBuildJobTags |
object |
The user-defined tags for the image build job. |
{"labelKey":"labelValue"} |
Examples
Success response
JSON format
{
"RequestId": "681192FB-****-****-****-*****C9E4",
"Accessibility": "PUBLIC",
"GmtCreateTime": "2025-11-04T06:22:02.000Z",
"WorkspaceId": "12345",
"Resource": {
"EcsSpec": "ecs.c6.large",
"ResourceConfig": {
"CPU": "4",
"Memory": "8Gi"
},
"ResourceId": "quota123434",
"ResourceType": "Lingjun"
},
"UserVpc": {
"VpcId": "vpc-abcdef**",
"SwitchId": "vs-abcdef**",
"SecurityGroupId": "sg-abcdef**",
"DefaultRoute": "eth1",
"ExtendedCidrs": [
"10.0.0.0/24"
]
},
"TargetRegistry": {
"InstanceId": "cri-**abcd",
"Type": "AcrEnterprise"
},
"ImageBuildId": "build-****ks92",
"OverwriteImageTag": false,
"BuildConfig": {
"Dockerfile": "FROM ubuntu:18:04\nRUN pip3 install numpy==1.19.5",
"BuildType": "PackageInstallation",
"DockerfilePath": "docker/Dockerfile",
"DataSources": [
{
"DataSourceId": "d-************zbs",
"Uri": "oss://{bucket-name}.oss-{region}-internal.aliyuncs.com/{subPath}/",
"MountPath": "/mnt/data/",
"MountAccess": "RO",
"Options": "{\"fs.oss.download.thread.concurrency\":\"10\"}",
"DataSourceVersion": "v1"
}
]
},
"ImageBuildJobId": "dlc-****ks92",
"ImageBuildJobName": "build-my-image",
"Creator": "12345678********",
"Image": {
"Name": "test-v1",
"Description": "Build test image",
"Uri": "user-test-registry-vpc.cn-wulanchabu.cr.aliyuncs.com/pai-test/pai-test:test-v1",
"Labels": [
{
"Key": "key1",
"Value": "value1"
}
]
},
"GmtModifiedTime": "2025-11-04T06:22:02.000Z",
"ImageId": "image-4c62******53uor",
"ImageBuildJobTags": {
"labelKey": "labelValue"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.