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.
Idawscc.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.
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.

For more information, see AWS::SageMaker::ModelCard.

Methods

NameResourceAccessible byRequired Params
create_resourcemodel_cardsINSERTModelCardName, Content, ModelCardStatus, region
delete_resourcemodel_cardsDELETEIdentifier, region
update_resourcemodel_cardsUPDATEIdentifier, PatchDocument, region
list_resourcesmodel_cards_list_onlySELECTregion
get_resourcemodel_cardsSELECTIdentifier, region

SELECT examples

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 awscc.sagemaker.model_cards
WHERE
region = '{{ region }}' AND
Identifier = '{{ model_card_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.sagemaker.model_cards (
ModelCardName,
ModelCardStatus,
Content,
region
)
SELECT
'{{ model_card_name }}',
'{{ model_card_status }}',
'{{ content }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.sagemaker.model_cards
SET PatchDocument = string('{{ {
"ModelCardStatus": model_card_status,
"Content": content,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ model_card_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.sagemaker.model_cards
WHERE
Identifier = '{{ model_card_name }}' 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:

ParameterDescription
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 model_cards resource, the following permissions are required:

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