Skip to main content

images

Creates, updates, deletes or gets an image resource or lists images in a region

Overview

Nameimages
TypeResource
DescriptionResource Type definition for AWS::SageMaker::Image
Idaws.sagemaker.images

Fields

NameDatatypeDescription
image_namestringThe name of the image this version belongs to.
image_arnstringThe Amazon Resource Name (ARN) of the parent image.
image_role_arnstringThe Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on behalf of the customer.
image_display_namestringThe display name of the image.
image_descriptionstringA description of the image.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

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

SELECT examples

Gets all images in a region.

SELECT
region,
image_name,
image_arn,
image_role_arn,
image_display_name,
image_description,
tags
FROM aws.sagemaker.images
WHERE region = 'us-east-1';

Gets all properties from an individual image.

SELECT
region,
image_name,
image_arn,
image_role_arn,
image_display_name,
image_description,
tags
FROM aws.sagemaker.images
WHERE region = 'us-east-1' AND data__Identifier = '<ImageArn>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

sagemaker:CreateImage,
sagemaker:DescribeImage,
iam:PassRole,
sagemaker:AddTags,
sagemaker:ListTags

Read

sagemaker:DescribeImage,
sagemaker:ListTags

Update

sagemaker:UpdateImage,
sagemaker:DescribeImage,
sagemaker:ListTags,
sagemaker:AddTags,
sagemaker:DeleteTags,
iam:PassRole

Delete

sagemaker:DeleteImage,
sagemaker:DescribeImage

List

sagemaker:ListImages