images
Creates, updates, deletes or gets an image
resource or lists images
in a region
Overview
Name | images |
Type | Resource |
Description | Resource Type definition for AWS::SageMaker::Image |
Id | aws.sagemaker.images |
Fields
Name | Datatype | Description |
---|---|---|
image_name | string | The name of the image this version belongs to. |
image_arn | string | The Amazon Resource Name (ARN) of the parent image. |
image_role_arn | string | The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on behalf of the customer. |
image_display_name | string | The display name of the image. |
image_description | string | A description of the image. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ImageName, ImageRoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.images (
ImageName,
ImageRoleArn,
region
)
SELECT
'{{ ImageName }}',
'{{ ImageRoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.images (
ImageName,
ImageRoleArn,
ImageDisplayName,
ImageDescription,
Tags,
region
)
SELECT
'{{ ImageName }}',
'{{ ImageRoleArn }}',
'{{ ImageDisplayName }}',
'{{ ImageDescription }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: image
props:
- name: ImageName
value: '{{ ImageName }}'
- name: ImageRoleArn
value: '{{ ImageRoleArn }}'
- name: ImageDisplayName
value: '{{ ImageDisplayName }}'
- name: ImageDescription
value: '{{ ImageDescription }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
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