Skip to main content

image_versions

Creates, updates, deletes, gets or lists an image_versions resource.

Overview

Nameimage_versions
TypeResource
Idaws.sagemaker.image_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_imagestringThe registry path of the container image on which this image version is based. (pattern: <code>.*</code>)
container_imagestringThe registry path of the container image that contains this image version.
creation_timestring (date-time)When the version was created.
failure_reasonstringWhen a create or delete operation fails, the reason for the failure.
horovodbooleanIndicates Horovod compatibility.
image_arnstringThe 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_arnstringThe 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_statusstringThe status of the version. (CREATING, CREATED, CREATE_FAILED, DELETING, DELETE_FAILED)
job_typestringIndicates 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_timestring (date-time)When the version was last modified.
ml_frameworkstringThe machine learning framework vended in the image version. (pattern: <code>[a-zA-Z]+ ?\d+.\d+(.\d+)?</code>)
processorstringIndicates CPU or GPU compatibility. CPU: The image version is compatible with CPU. GPU: The image version is compatible with GPU. (CPU, GPU)
programming_langstringThe supported programming language and its version. (pattern: <code>[a-zA-Z]+ ?\d+.\d+(.\d+)?</code>)
release_notesstringThe maintainer description of the image version. (pattern: <code>.*</code>)
vendor_guidancestringThe 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)
versionintegerThe version number.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_image_versionselectregionDescribes a version of a SageMaker AI image.
create_image_versioninsertregion, BaseImage, ClientToken, ImageNameCreates a version of the SageMaker AI image specified by ImageName. The version represents the Amazon ECR container image specified by BaseImage.
update_image_versionupdateregion, ImageNameUpdates the properties of a SageMaker AI image version.
delete_image_versiondeleteregionDeletes a version of a SageMaker AI image. The container image the version represents isn't deleted.
list_image_versionsexecregion, ImageNameLists 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;

UPDATE examples

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

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

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 }}"
}'
;