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
Idawscc.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.

For more information, see AWS::SageMaker::Image.

Methods

NameResourceAccessible byRequired Params
create_resourceimagesINSERTImageName, ImageRoleArn, region
delete_resourceimagesDELETEIdentifier, region
update_resourceimagesUPDATEIdentifier, PatchDocument, region
list_resourcesimages_list_onlySELECTregion
get_resourceimagesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual image.

SELECT
region,
image_name,
image_arn,
image_role_arn,
image_display_name,
image_description,
tags
FROM awscc.sagemaker.images
WHERE
region = 'us-east-1' AND
Identifier = '{{ image_arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.sagemaker.images
SET PatchDocument = string('{{ {
"ImageRoleArn": image_role_arn,
"ImageDisplayName": image_display_name,
"ImageDescription": image_description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ image_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.sagemaker.images
WHERE
Identifier = '{{ image_arn }}' AND
region = 'us-east-1';

Permissions

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

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