Skip to main content

model_cards

Creates, updates, deletes, gets or lists a model_cards resource.

Overview

Namemodel_cards
TypeResource
Idaws.sagemaker.model_cards

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentstringThe content of the model card. Content is provided as a string in the model card JSON schema. When you set IncludedData to MetadataOnly in the request, SageMaker returns a sanitized version of Content that includes only the following JSON paths, when present in the model card: model_overview.model_id model_overview.model_name intended_uses.risk_rating model_package_details.model_package_group_name model_package_details.model_package_arn All other fields are removed from Content when IncludedData is MetadataOnly, including model description, training details, evaluation details, business details, and additional information. To retrieve the complete Content, set IncludedData to AllData or omit the parameter. (pattern: <code>.*</code>)
created_byobjectInformation about the user who created or modified a SageMaker resource.
creation_timestring (date-time)The date and time the model card was created.
last_modified_byobjectInformation about the user who created or modified a SageMaker resource.
last_modified_timestring (date-time)The date and time the model card was last modified.
model_card_arnstringThe Amazon Resource Name (ARN) of the model card. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]{9,16}:[0-9]{12}:model-card/[a-zA-Z0-9](-[a-zA-Z0-9]){0,62}</code>)
model_card_namestringThe name of the model card. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
model_card_processing_statusstringThe processing status of model card deletion. The ModelCardProcessingStatus updates throughout the different deletion steps. DeletePending: Model card deletion request received. DeleteInProgress: Model card deletion is in progress. ContentDeleted: Deleted model card content. ExportJobsDeleted: Deleted all export jobs associated with the model card. DeleteCompleted: Successfully deleted the model card. DeleteFailed: The model card failed to delete. (DeleteInProgress, DeletePending, ContentDeleted, ExportJobsDeleted, DeleteCompleted, DeleteFailed)
model_card_statusstringThe approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. Draft: The model card is a work in progress. PendingReview: The model card is pending review. Approved: The model card is approved. Archived: The model card is archived. No more updates should be made to the model card, but it can still be exported. (Draft, PendingReview, Approved, Archived)
model_card_versionintegerThe version of the model card.
security_configobjectThe security configuration used to protect model card content.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_model_cardselectregionDescribes the content, creation time, and security configuration of an Amazon SageMaker Model Card. To retrieve only metadata about a model card without requiring kms:Decrypt permission on the associated customer-managed Amazon Web Services KMS key, set IncludedData to MetadataOnly. The default is AllData, which returns the full model card Content and requires kms:Decrypt permission when a customer-managed key is configured.
list_model_cardsselectregionList existing model cards.
create_model_cardinsertregion, ModelCardName, ModelCardStatusCreates an Amazon SageMaker Model Card. For information about how to use model cards, see Amazon SageMaker Model Card.
update_model_cardupdateregion, ModelCardNameUpdate an Amazon SageMaker Model Card. You cannot update both model card content and model card status in a single call.
delete_model_carddeleteregionDeletes an Amazon SageMaker Model Card.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the content, creation time, and security configuration of an Amazon SageMaker Model Card. To retrieve only metadata about a model card without requiring kms:Decrypt permission on the associated customer-managed Amazon Web Services KMS key, set IncludedData to MetadataOnly. The default is AllData, which returns the full model card Content and requires kms:Decrypt permission when a customer-managed key is configured.

SELECT
content,
created_by,
creation_time,
last_modified_by,
last_modified_time,
model_card_arn,
model_card_name,
model_card_processing_status,
model_card_status,
model_card_version,
security_config
FROM aws.sagemaker.model_cards
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon SageMaker Model Card. For information about how to use model cards, see Amazon SageMaker Model Card.

INSERT INTO aws.sagemaker.model_cards (
ModelCardName,
SecurityConfig,
Content,
ModelCardStatus,
Tags,
region
)
SELECT
'{{ ModelCardName }}' /* required */,
'{{ SecurityConfig }}',
'{{ Content }}',
'{{ ModelCardStatus }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
model_card_arn
;

UPDATE examples

Update an Amazon SageMaker Model Card. You cannot update both model card content and model card status in a single call.

UPDATE aws.sagemaker.model_cards
SET
ModelCardName = '{{ ModelCardName }}',
Content = '{{ Content }}',
ModelCardStatus = '{{ ModelCardStatus }}'
WHERE
region = '{{ region }}' --required
AND ModelCardName = '{{ ModelCardName }}' --required
RETURNING
model_card_arn;

DELETE examples

Deletes an Amazon SageMaker Model Card.

DELETE FROM aws.sagemaker.model_cards
WHERE region = '{{ region }}' --required
;