Skip to main content

model_cards

Creates, updates, deletes or gets a model_card resource or lists model_cards in a region

Overview

Namemodel_cards
TypeResource
DescriptionResource Type definition for AWS::SageMaker::ModelCard.
Idaws.sagemaker.model_cards

Fields

NameDatatypeDescription
model_card_arnstringThe Amazon Resource Name (ARN) of the successfully created model card.
model_card_versionintegerA version of the model card.
model_card_namestringThe unique name of the model card.
security_configobjectAn optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated workloads with highly sensitive data.
model_card_statusstringThe approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.
contentobjectThe content of the model card.
creation_timestringThe date and time the model card was created.
created_byobjectInformation about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.
last_modified_timestringThe date and time the model card was last modified.
last_modified_byobjectInformation about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.
model_card_processing_statusstringThe processing status of model card deletion. The ModelCardProcessingStatus updates throughout the different deletion steps.
tagsarrayKey-value pairs used to manage metadata for model cards.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTModelCardName, Content, ModelCardStatus, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all model_cards in a region.

SELECT
region,
model_card_arn,
model_card_version,
model_card_name,
security_config,
model_card_status,
content,
creation_time,
created_by,
last_modified_time,
last_modified_by,
model_card_processing_status,
tags
FROM aws.sagemaker.model_cards
WHERE region = 'us-east-1';

Gets all properties from an individual model_card.

SELECT
region,
model_card_arn,
model_card_version,
model_card_name,
security_config,
model_card_status,
content,
creation_time,
created_by,
last_modified_time,
last_modified_by,
model_card_processing_status,
tags
FROM aws.sagemaker.model_cards
WHERE region = 'us-east-1' AND data__Identifier = '<ModelCardName>';

INSERT example

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

/*+ create */
INSERT INTO aws.sagemaker.model_cards (
ModelCardName,
ModelCardStatus,
Content,
region
)
SELECT
'{{ ModelCardName }}',
'{{ ModelCardStatus }}',
'{{ Content }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.sagemaker.model_cards
WHERE data__Identifier = '<ModelCardName>'
AND region = 'us-east-1';

Permissions

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

Create

sagemaker:CreateModelCard,
sagemaker:DescribeModel,
kms:DescribeKey,
kms:GenerateDataKey,
kms:CreateGrant,
sagemaker:DescribeModelPackageGroup,
sagemaker:DescribeModelPackage,
sagemaker:AddTags

Read

sagemaker:DescribeModelCard,
sagemaker:DescribeModelPackageGroup,
sagemaker:DescribeModelPackage,
kms:Decrypt,
sagemaker:ListTags

Update

sagemaker:UpdateModelCard,
sagemaker:DescribeModelCard,
sagemaker:DescribeModel,
kms:GenerateDataKey,
kms:Decrypt,
sagemaker:DescribeModelPackageGroup,
sagemaker:DescribeModelPackage,
sagemaker:ListTags,
sagemaker:AddTags,
sagemaker:DeleteTags

Delete

sagemaker:DescribeModelCard,
sagemaker:DeleteModelCard,
sagemaker:DescribeModelPackageGroup,
sagemaker:DescribeModelPackage,
kms:RetireGrant,
kms:Decrypt,
sagemaker:ListTags,
sagemaker:DeleteTags

List

sagemaker:ListModelCards,
sagemaker:ListModelCardVersions