Skip to main content

images

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

Overview

Nameimages
TypeResource
Idaws.sagemaker.images

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)When the image was created.
descriptionstringThe description of the image. (pattern: <code>.*</code>)
display_namestringThe name of the image as displayed. (pattern: <code>\S(.*\S)?</code>)
failure_reasonstringWhen a create, update, or delete operation fails, the reason for the failure.
image_arnstringThe ARN of the image. (pattern: <code>arn:aws(-[\w]+):sagemaker:.+:[0-9]{12}:image/[a-zA-Z0-9]([-.]?[a-zA-Z0-9])</code>)
image_namestringThe name of the image. (pattern: <code>[a-zA-Z0-9]([-.]?[a-zA-Z0-9]){0,62}</code>)
image_statusstringThe status of the image. (CREATING, CREATED, CREATE_FAILED, UPDATING, UPDATE_FAILED, DELETING, DELETE_FAILED)
last_modified_timestring (date-time)When the image was last modified.
role_arnstringThe ARN of the IAM role that enables Amazon SageMaker AI to perform tasks on your behalf. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_imageselectregionDescribes a SageMaker AI image.
list_imagesselectregionLists the images in your account and their properties. The list can be filtered by creation time or modified time, and whether the image name contains a specified string.
create_imageinsertregion, ImageName, RoleArnCreates a custom SageMaker AI image. A SageMaker AI image is a set of image versions. Each image version represents a container image stored in Amazon ECR. For more information, see Bring your own SageMaker AI image.
update_imageupdateregion, ImageNameUpdates the properties of a SageMaker AI image. To change the image's tags, use the AddTags and DeleteTags APIs.
delete_imagedeleteregionDeletes a SageMaker AI image and all versions of the image. The container images aren't deleted.

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 SageMaker AI image.

SELECT
creation_time,
description,
display_name,
failure_reason,
image_arn,
image_name,
image_status,
last_modified_time,
role_arn
FROM aws.sagemaker.images
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a custom SageMaker AI image. A SageMaker AI image is a set of image versions. Each image version represents a container image stored in Amazon ECR. For more information, see Bring your own SageMaker AI image.

INSERT INTO aws.sagemaker.images (
Description,
DisplayName,
ImageName,
RoleArn,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ DisplayName }}',
'{{ ImageName }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
image_arn
;

UPDATE examples

Updates the properties of a SageMaker AI image. To change the image's tags, use the AddTags and DeleteTags APIs.

UPDATE aws.sagemaker.images
SET
DeleteProperties = '{{ DeleteProperties }}',
Description = '{{ Description }}',
DisplayName = '{{ DisplayName }}',
ImageName = '{{ ImageName }}',
RoleArn = '{{ RoleArn }}'
WHERE
region = '{{ region }}' --required
AND ImageName = '{{ ImageName }}' --required
RETURNING
image_arn;

DELETE examples

Deletes a SageMaker AI image and all versions of the image. The container images aren't deleted.

DELETE FROM aws.sagemaker.images
WHERE region = '{{ region }}' --required
;