images
Creates, updates, deletes, gets or lists an images resource.
Overview
| Name | images |
| Type | Resource |
| Id | aws.sagemaker.images |
Fields
The following fields are returned by SELECT queries:
- describe_image
- list_images
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | When the image was created. |
description | string | The description of the image. (pattern: <code>.*</code>) |
display_name | string | The name of the image as displayed. (pattern: <code>\S(.*\S)?</code>) |
failure_reason | string | When a create, update, or delete operation fails, the reason for the failure. |
image_arn | string | The ARN of the image. (pattern: <code>arn:aws(-[\w]+):sagemaker:.+:[0-9]{12}:image/[a-zA-Z0-9]([-.]?[a-zA-Z0-9])</code>) |
image_name | string | The name of the image. (pattern: <code>[a-zA-Z0-9]([-.]?[a-zA-Z0-9]){0,62}</code>) |
image_status | string | The status of the image. (CREATING, CREATED, CREATE_FAILED, UPDATING, UPDATE_FAILED, DELETING, DELETE_FAILED) |
last_modified_time | string (date-time) | When the image was last modified. |
role_arn | string | The 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>) |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | When the image was created. |
description | string | The description of the image. (pattern: <code>.*</code>) |
display_name | string | The name of the image as displayed. (pattern: <code>\S(.*\S)?</code>) |
failure_reason | string | When a create, update, or delete operation fails, the reason for the failure. |
image_arn | string | The ARN of the image. (pattern: <code>arn:aws(-[\w]+):sagemaker:.+:[0-9]{12}:image/[a-zA-Z0-9]([-.]?[a-zA-Z0-9])</code>) |
image_name | string | The name of the image. (pattern: <code>[a-zA-Z0-9]([-.]?[a-zA-Z0-9]){0,62}</code>) |
image_status | string | The status of the image. (CREATING, CREATED, CREATE_FAILED, UPDATING, UPDATE_FAILED, DELETING, DELETE_FAILED) |
last_modified_time | string (date-time) | When the image was last modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_image | select | region | Describes a SageMaker AI image. | |
list_images | select | region | Lists 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_image | insert | region, ImageName, RoleArn | 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. | |
update_image | update | region, ImageName | Updates the properties of a SageMaker AI image. To change the image's tags, use the AddTags and DeleteTags APIs. | |
delete_image | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_image
- list_images
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
;
Lists 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.
SELECT
creation_time,
description,
display_name,
failure_reason,
image_arn,
image_name,
image_status,
last_modified_time
FROM aws.sagemaker.images
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_image
- Manifest
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
;
# Description fields are for documentation purposes
- name: images
props:
- name: region
value: "{{ region }}"
description: Required parameter for the images resource.
- name: Description
value: "{{ Description }}"
description: |
The description of the image.
- name: DisplayName
value: "{{ DisplayName }}"
description: |
The display name of the image. If not provided, ImageName is displayed.
- name: ImageName
value: "{{ ImageName }}"
description: |
The name of the image. Must be unique to your account.
- name: RoleArn
value: "{{ RoleArn }}"
description: |
The ARN of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.
- name: Tags
description: |
A list of tags to apply to the image.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_image
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
- delete_image
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
;