image_versions
Creates, updates, deletes, gets or lists an image_versions resource.
Overview
| Name | image_versions |
| Type | Resource |
| Id | aws.sagemaker.image_versions |
Fields
The following fields are returned by SELECT queries:
- describe_image_version
| Name | Datatype | Description |
|---|---|---|
base_image | string | The registry path of the container image on which this image version is based. (pattern: <code>.*</code>) |
container_image | string | The registry path of the container image that contains this image version. |
creation_time | string (date-time) | When the version was created. |
failure_reason | string | When a create or delete operation fails, the reason for the failure. |
horovod | boolean | Indicates Horovod compatibility. |
image_arn | string | The ARN of the image the version is based on. (pattern: <code>arn:aws(-[\w]+):sagemaker:.+:[0-9]{12}:image/[a-zA-Z0-9]([-.]?[a-zA-Z0-9])</code>) |
image_version_arn | string | The ARN of the version. (pattern: <code>(arn:aws(-[\w]+):sagemaker:.+:[0-9]{12}:image-version/[a-z0-9]([-.]?[a-z0-9])/[0-9]+|None)</code>) |
image_version_status | string | The status of the version. (CREATING, CREATED, CREATE_FAILED, DELETING, DELETE_FAILED) |
job_type | string | Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels. (TRAINING, INFERENCE, NOTEBOOK_KERNEL) |
last_modified_time | string (date-time) | When the version was last modified. |
ml_framework | string | The machine learning framework vended in the image version. (pattern: <code>[a-zA-Z]+ ?\d+.\d+(.\d+)?</code>) |
processor | string | Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. (CPU, GPU) |
programming_lang | string | The supported programming language and its version. (pattern: <code>[a-zA-Z]+ ?\d+.\d+(.\d+)?</code>) |
release_notes | string | The maintainer description of the image version. (pattern: <code>.*</code>) |
vendor_guidance | string | The stability of the image version specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported. (NOT_PROVIDED, STABLE, TO_BE_ARCHIVED, ARCHIVED) |
version | integer | The version number. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_image_version | select | region | Describes a version of a SageMaker AI image. | |
create_image_version | insert | region, BaseImage, ClientToken, ImageName | Creates a version of the SageMaker AI image specified by ImageName. The version represents the Amazon ECR container image specified by BaseImage. | |
update_image_version | update | region, ImageName | Updates the properties of a SageMaker AI image version. | |
delete_image_version | delete | region | Deletes a version of a SageMaker AI image. The container image the version represents isn't deleted. | |
list_image_versions | exec | region, ImageName | Lists the versions of a specified image and their properties. The list can be filtered by creation time or modified time. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_image_version
Describes a version of a SageMaker AI image.
SELECT
base_image,
container_image,
creation_time,
failure_reason,
horovod,
image_arn,
image_version_arn,
image_version_status,
job_type,
last_modified_time,
ml_framework,
processor,
programming_lang,
release_notes,
vendor_guidance,
version
FROM aws.sagemaker.image_versions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_image_version
- Manifest
Creates a version of the SageMaker AI image specified by ImageName. The version represents the Amazon ECR container image specified by BaseImage.
INSERT INTO aws.sagemaker.image_versions (
BaseImage,
ClientToken,
ImageName,
Aliases,
VendorGuidance,
JobType,
MLFramework,
ProgrammingLang,
Processor,
Horovod,
ReleaseNotes,
region
)
SELECT
'{{ BaseImage }}' /* required */,
'{{ ClientToken }}' /* required */,
'{{ ImageName }}' /* required */,
'{{ Aliases }}',
'{{ VendorGuidance }}',
'{{ JobType }}',
'{{ MLFramework }}',
'{{ ProgrammingLang }}',
'{{ Processor }}',
{{ Horovod }},
'{{ ReleaseNotes }}',
'{{ region }}'
RETURNING
image_version_arn
;
# Description fields are for documentation purposes
- name: image_versions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the image_versions resource.
- name: BaseImage
value: "{{ BaseImage }}"
description: |
The registry path of the container image to use as the starting point for this version. The path is an Amazon ECR URI in the following format: `<acct-id>`.dkr.ecr.`<region>`.amazonaws.com/<repo-name[:tag] or [@digest]>
- name: ClientToken
value: "{{ ClientToken }}"
description: |
A unique ID. If not specified, the Amazon Web Services CLI and Amazon Web Services SDKs, such as the SDK for Python (Boto3), add a unique value to the call.
- name: ImageName
value: "{{ ImageName }}"
description: |
The ImageName of the Image to create a version of.
- name: Aliases
value:
- "{{ Aliases }}"
description: |
A list of aliases created with the image version.
- name: VendorGuidance
value: "{{ VendorGuidance }}"
description: |
The stability of the image version, specified by the maintainer. NOT_PROVIDED: The maintainers did not provide a status for image version stability. STABLE: The image version is stable. TO_BE_ARCHIVED: The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months. ARCHIVED: The image version is archived. Archived image versions are not searchable and are no longer actively supported.
valid_values: ['NOT_PROVIDED', 'STABLE', 'TO_BE_ARCHIVED', 'ARCHIVED']
- name: JobType
value: "{{ JobType }}"
description: |
Indicates SageMaker AI job type compatibility. TRAINING: The image version is compatible with SageMaker AI training jobs. INFERENCE: The image version is compatible with SageMaker AI inference jobs. NOTEBOOK_KERNEL: The image version is compatible with SageMaker AI notebook kernels.
valid_values: ['TRAINING', 'INFERENCE', 'NOTEBOOK_KERNEL']
- name: MLFramework
value: "{{ MLFramework }}"
description: |
The machine learning framework vended in the image version.
- name: ProgrammingLang
value: "{{ ProgrammingLang }}"
description: |
The supported programming language and its version.
- name: Processor
value: "{{ Processor }}"
description: |
Indicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU.
valid_values: ['CPU', 'GPU']
- name: Horovod
value: {{ Horovod }}
description: |
Indicates Horovod compatibility.
- name: ReleaseNotes
value: "{{ ReleaseNotes }}"
description: |
The maintainer description of the image version.
UPDATE examples
- update_image_version
Updates the properties of a SageMaker AI image version.
UPDATE aws.sagemaker.image_versions
SET
ImageName = '{{ ImageName }}',
Alias = '{{ Alias }}',
Version = {{ Version }},
AliasesToAdd = '{{ AliasesToAdd }}',
AliasesToDelete = '{{ AliasesToDelete }}',
VendorGuidance = '{{ VendorGuidance }}',
JobType = '{{ JobType }}',
MLFramework = '{{ MLFramework }}',
ProgrammingLang = '{{ ProgrammingLang }}',
Processor = '{{ Processor }}',
Horovod = {{ Horovod }},
ReleaseNotes = '{{ ReleaseNotes }}'
WHERE
region = '{{ region }}' --required
AND ImageName = '{{ ImageName }}' --required
RETURNING
image_version_arn;
DELETE examples
- delete_image_version
Deletes a version of a SageMaker AI image. The container image the version represents isn't deleted.
DELETE FROM aws.sagemaker.image_versions
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- list_image_versions
Lists the versions of a specified image and their properties. The list can be filtered by creation time or modified time.
EXEC aws.sagemaker.image_versions.list_image_versions
@region='{{ region }}' --required
@@json=
'{
"CreationTimeAfter": "{{ CreationTimeAfter }}",
"CreationTimeBefore": "{{ CreationTimeBefore }}",
"ImageName": "{{ ImageName }}",
"LastModifiedTimeAfter": "{{ LastModifiedTimeAfter }}",
"LastModifiedTimeBefore": "{{ LastModifiedTimeBefore }}",
"MaxResults": {{ MaxResults }},
"NextToken": "{{ NextToken }}",
"SortBy": "{{ SortBy }}",
"SortOrder": "{{ SortOrder }}"
}'
;