image_versions
Creates, updates, deletes or gets an image_version resource or lists image_versions in a region
Overview
| Name | image_versions |
| Type | Resource |
| Description | Resource Type definition for AWS::SageMaker::ImageVersion |
| Id | awscc.sagemaker.image_versions |
Fields
- get (all properties)
- list (identifiers only)
| 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_version_arn | string | The Amazon Resource Name (ARN) of the image version. |
base_image | string | The registry path of the container image on which this image version is based. |
container_image | string | The image to use for the container that will be materialized for the inference component |
version | integer | The version number of the image version. |
alias | string | The alias of the image version. |
aliases | array | List of aliases for the image version. |
vendor_guidance | string | The availability of the image version specified by the maintainer. |
job_type | string | Indicates SageMaker job type compatibility. |
ml_framework | string | The machine learning framework vended in the image version. |
programming_lang | string | The supported programming language and its version. |
processor | string | Indicates CPU or GPU compatibility. |
horovod | boolean | Indicates Horovod compatibility. |
release_notes | string | The maintainer description of the image version. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
image_version_arn | string | The Amazon Resource Name (ARN) of the image version. |
version | integer | The version number of the image version. |
region | string | AWS region. |
For more information, see AWS::SageMaker::ImageVersion.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | image_versions | INSERT | ImageName, BaseImage, region |
delete_resource | image_versions | DELETE | Identifier, region |
update_resource | image_versions | UPDATE | Identifier, PatchDocument, region |
list_resources | image_versions_list_only | SELECT | region |
get_resource | image_versions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual image_version.
SELECT
region,
image_name,
image_arn,
image_version_arn,
base_image,
container_image,
version,
alias,
aliases,
vendor_guidance,
job_type,
ml_framework,
programming_lang,
processor,
horovod,
release_notes
FROM awscc.sagemaker.image_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ image_version_arn }}';
Lists all image_versions in a region.
SELECT
region,
image_version_arn
FROM awscc.sagemaker.image_versions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new image_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.sagemaker.image_versions (
ImageName,
BaseImage,
region
)
SELECT
'{{ image_name }}',
'{{ base_image }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.sagemaker.image_versions (
ImageName,
BaseImage,
Alias,
Aliases,
VendorGuidance,
JobType,
MLFramework,
ProgrammingLang,
Processor,
Horovod,
ReleaseNotes,
region
)
SELECT
'{{ image_name }}',
'{{ base_image }}',
'{{ alias }}',
'{{ aliases }}',
'{{ vendor_guidance }}',
'{{ job_type }}',
'{{ ml_framework }}',
'{{ programming_lang }}',
'{{ processor }}',
'{{ horovod }}',
'{{ release_notes }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: image_version
props:
- name: image_name
value: '{{ image_name }}'
- name: base_image
value: '{{ base_image }}'
- name: alias
value: '{{ alias }}'
- name: aliases
value:
- null
- name: vendor_guidance
value: '{{ vendor_guidance }}'
- name: job_type
value: '{{ job_type }}'
- name: ml_framework
value: '{{ ml_framework }}'
- name: programming_lang
value: '{{ programming_lang }}'
- name: processor
value: '{{ processor }}'
- name: horovod
value: '{{ horovod }}'
- name: release_notes
value: '{{ release_notes }}'
UPDATE example
Use the following StackQL query and manifest file to update a image_version resource, using stack-deploy.
/*+ update */
UPDATE awscc.sagemaker.image_versions
SET PatchDocument = string('{{ {
"Alias": alias,
"Aliases": aliases,
"VendorGuidance": vendor_guidance,
"JobType": job_type,
"MLFramework": ml_framework,
"ProgrammingLang": programming_lang,
"Processor": processor,
"Horovod": horovod,
"ReleaseNotes": release_notes
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ image_version_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.sagemaker.image_versions
WHERE
Identifier = '{{ image_version_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the image_versions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
sagemaker:CreateImageVersion,
sagemaker:DescribeImageVersion
sagemaker:DescribeImageVersion
sagemaker:UpdateImageVersion,
sagemaker:DescribeImageVersion,
sagemaker:ListAliases
sagemaker:DeleteImageVersion,
sagemaker:DescribeImageVersion
sagemaker:ListImageVersions