Skip to main content

image_versions

Creates, updates, deletes or gets an image_version resource or lists image_versions in a region

Overview

Nameimage_versions
TypeResource
DescriptionResource Type definition for AWS::SageMaker::ImageVersion
Idaws.sagemaker.image_versions

Fields

NameDatatypeDescription
image_namestringThe name of the image this version belongs to.
image_arnstringThe Amazon Resource Name (ARN) of the parent image.
image_version_arnstringThe Amazon Resource Name (ARN) of the image version.
base_imagestringThe registry path of the container image on which this image version is based.
container_imagestringThe image to use for the container that will be materialized for the inference component
versionintegerThe version number of the image version.
aliasstringThe alias of the image version.
aliasesarrayList of aliases for the image version.
vendor_guidancestringThe availability of the image version specified by the maintainer.
job_typestringIndicates SageMaker job type compatibility.
ml_frameworkstringThe machine learning framework vended in the image version.
programming_langstringThe supported programming language and its version.
processorstringIndicates CPU or GPU compatibility.
horovodbooleanIndicates Horovod compatibility.
release_notesstringThe maintainer description of the image version.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTImageName, BaseImage, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all image_versions in a region.

SELECT
region,
image_name,
image_arn,
image_version_arn,
base_image,
container_image,
version,
alias,
aliases,
vendor_guidance,
job_type,
ml_framework,
programming_lang,
processor,
horovod,
release_notes
FROM aws.sagemaker.image_versions
WHERE region = 'us-east-1';

Gets all properties from an individual image_version.

SELECT
region,
image_name,
image_arn,
image_version_arn,
base_image,
container_image,
version,
alias,
aliases,
vendor_guidance,
job_type,
ml_framework,
programming_lang,
processor,
horovod,
release_notes
FROM aws.sagemaker.image_versions
WHERE region = 'us-east-1' AND data__Identifier = '<ImageVersionArn>';

INSERT example

Use the following StackQL query and manifest file to create a new image_version resource, using stack-deploy.

/*+ create */
INSERT INTO aws.sagemaker.image_versions (
ImageName,
BaseImage,
region
)
SELECT
'{{ ImageName }}',
'{{ BaseImage }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.sagemaker.image_versions
WHERE data__Identifier = '<ImageVersionArn>'
AND region = 'us-east-1';

Permissions

To operate on the image_versions resource, the following permissions are required:

Create

sagemaker:CreateImageVersion,
sagemaker:DescribeImageVersion

Read

sagemaker:DescribeImageVersion

Update

sagemaker:UpdateImageVersion,
sagemaker:DescribeImageVersion,
sagemaker:ListAliases

Delete

sagemaker:DeleteImageVersion,
sagemaker:DescribeImageVersion

List

sagemaker:ListImageVersions