model_cards
Creates, updates, deletes, gets or lists a model_cards resource.
Overview
| Name | model_cards |
| Type | Resource |
| Id | aws.sagemaker.model_cards |
Fields
The following fields are returned by SELECT queries:
- describe_model_card
- list_model_cards
| Name | Datatype | Description |
|---|---|---|
content | string | The 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_by | object | Information about the user who created or modified a SageMaker resource. |
creation_time | string (date-time) | The date and time the model card was created. |
last_modified_by | object | Information about the user who created or modified a SageMaker resource. |
last_modified_time | string (date-time) | The date and time the model card was last modified. |
model_card_arn | string | The 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_name | string | The name of the model card. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
model_card_processing_status | string | The 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_status | string | The 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_version | integer | The version of the model card. |
security_config | object | The security configuration used to protect model card content. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The date and time that the model card was created. |
last_modified_time | string (date-time) | The date and time that the model card was last modified. |
model_card_arn | string | The 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_name | string | The name of the model card. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
model_card_status | string | The 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) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_model_card | select | region | 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. | |
list_model_cards | select | region | List existing model cards. | |
create_model_card | insert | region, ModelCardName, ModelCardStatus | Creates an Amazon SageMaker Model Card. For information about how to use model cards, see Amazon SageMaker Model Card. | |
update_model_card | update | region, ModelCardName | Update an Amazon SageMaker Model Card. You cannot update both model card content and model card status in a single call. | |
delete_model_card | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_model_card
- list_model_cards
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
;
List existing model cards.
SELECT
creation_time,
last_modified_time,
model_card_arn,
model_card_name,
model_card_status
FROM aws.sagemaker.model_cards
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_model_card
- Manifest
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
;
# Description fields are for documentation purposes
- name: model_cards
props:
- name: region
value: "{{ region }}"
description: Required parameter for the model_cards resource.
- name: ModelCardName
value: "{{ ModelCardName }}"
description: |
The unique name of the model card.
- name: SecurityConfig
description: |
An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated workloads with highly sensitive data.
value:
KmsKeyId: "{{ KmsKeyId }}"
- name: Content
value: "{{ Content }}"
description: |
The content of the model card. Content must be in model card JSON schema and provided as a string.
- name: ModelCardStatus
value: "{{ ModelCardStatus }}"
description: |
The 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.
valid_values: ['Draft', 'PendingReview', 'Approved', 'Archived']
- name: Tags
description: |
Key-value pairs used to manage metadata for model cards.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_model_card
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
- delete_model_card
Deletes an Amazon SageMaker Model Card.
DELETE FROM aws.sagemaker.model_cards
WHERE region = '{{ region }}' --required
;