GetImage
Retrieves the details of a specified image by image ID.
Operation description
DataWorks Basic Edition or later is required.
Ensure that the service-linked role AliyunServiceRoleForDataWorks is created before you call this operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetImage |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
string |
Yes |
The image ID. |
Custom_image_xxxx_xxxx |
| ImageVersion |
string |
No |
The image version. If you do not specify this parameter, the latest version is retrieved. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Image |
object |
The image details. |
|
| Id |
string |
The image ID. |
Custom_image_xxxx_xxxx |
| Name |
string |
The image name. |
dataworks_image |
| Version |
string |
The image version. |
1 |
| Description |
string |
The image description. |
Test image created by xxx |
| Creator |
string |
The ID of the creator. |
123 |
| Modifier |
string |
The ID of the modifier. |
123 |
| CreatedTime |
integer |
The creation time. The value is a 64-bit timestamp. |
1727055811000 |
| LastModifiedTime |
integer |
The last modified time. The value is a 64-bit timestamp. |
1727055811000 |
| Official |
boolean |
Indicates whether the image is an official image. |
true |
| Accessibility |
string |
The image visibility. Valid values:
Valid values:
|
Public |
| Status |
string |
The image status. Valid values:
|
Available |
| PublishStage |
string |
The publish status. Valid values:
|
Published |
| Supported |
object |
The supported modules and task types. |
|
| Module |
string |
The supported module. Valid values:
|
Scheduler |
| TaskTypes |
array |
The list of supported task types. |
|
|
string |
The supported task types. Valid values:
|
Shell |
|
| IsDefault |
boolean |
Indicates whether the image is the default image. |
false |
| EnableSyncMaxCompute |
boolean |
Indicates whether MaxCompute synchronization is enabled. |
false |
| ProviderType |
string |
The image reference data type. Valid values:
|
ACR |
| ProviderImageId |
string |
The image ID of the provider. |
acr_image_id |
| ImageUri |
string |
The image URI. |
registry.cn-hangzhou.aliyuncs.com/xxx/xxx:tag |
| Namespace |
string |
The namespace. |
namespace |
| Size |
string |
The image size. |
1GB |
| AcrInstanceId |
string |
The ACR instance ID. |
cri-xxx |
| ImageTag |
string |
The image tag. |
v1.0.0 |
| RepositoryName |
string |
The repository name. |
repo_name |
| ImageVpcUri |
string |
The image VPC URI. |
registry-vpc.cn-hangzhou.aliyuncs.com/xxx/xxx:tag |
| AcrEndpoint |
string |
ACR Endpoint |
registry.cn-hangzhou.aliyuncs.com |
| AcrAssociatedVpcId |
string |
The ID of the VPC associated with the ACR instance. |
vpc-xxx |
| BuildConfig |
object |
The image build configuration. |
|
| BuildType |
string |
The build type. |
PackageInstallation |
| PackageInstallationScripts |
array<object> |
The list of pre-installation execution scripts. |
|
|
object |
The pre-installation execution script. |
||
| Type |
string |
The script type. |
Python3 |
| Content |
string |
The script content. If the content is a list of installation package names, separate the names with commas (,). |
requests |
| RequestId |
string |
The request ID. You can use the ID to locate logs and troubleshoot issues. |
6A6CBE87-9F91-1323-B680-E7A7065XXXXX |
Examples
Success response
JSON format
{
"Success": true,
"Image": {
"Id": "Custom_image_xxxx_xxxx",
"Name": "dataworks_image",
"Version": "1",
"Description": "Test image created by xxx",
"Creator": "123",
"Modifier": "123",
"CreatedTime": 1727055811000,
"LastModifiedTime": 1727055811000,
"Official": true,
"Accessibility": "Public",
"Status": "Available",
"PublishStage": "Published",
"Supported": {
"Module": "Scheduler",
"TaskTypes": [
"Shell"
]
},
"IsDefault": false,
"EnableSyncMaxCompute": false,
"ProviderType": "ACR",
"ProviderImageId": "acr_image_id",
"ImageUri": "registry.cn-hangzhou.aliyuncs.com/xxx/xxx:tag",
"Namespace": "namespace",
"Size": "1GB",
"AcrInstanceId": "cri-xxx",
"ImageTag": "v1.0.0",
"RepositoryName": "repo_name",
"ImageVpcUri": "registry-vpc.cn-hangzhou.aliyuncs.com/xxx/xxx:tag",
"AcrEndpoint": "registry.cn-hangzhou.aliyuncs.com",
"AcrAssociatedVpcId": "vpc-xxx",
"BuildConfig": {
"BuildType": "PackageInstallation",
"PackageInstallationScripts": [
{
"Type": "Python3",
"Content": "requests"
}
]
}
},
"RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.