model_cards
Creates, updates, deletes or gets a model_card
resource or lists model_cards
in a region
Overview
Name | model_cards |
Type | Resource |
Description | Resource Type definition for AWS::SageMaker::ModelCard. |
Id | aws.sagemaker.model_cards |
Fields
Name | Datatype | Description |
---|---|---|
model_card_arn | string | The Amazon Resource Name (ARN) of the successfully created model card. |
model_card_version | integer | A version of the model card. |
model_card_name | string | The unique name of the model card. |
security_config | object | An optional Key Management Service key to encrypt, decrypt, and re-encrypt model card content for regulated workloads with highly sensitive data. |
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. |
content | object | The content of the model card. |
creation_time | string | The date and time the model card was created. |
created_by | object | Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card. |
last_modified_time | string | The date and time the model card was last modified. |
last_modified_by | object | Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card. |
model_card_processing_status | string | The processing status of model card deletion. The ModelCardProcessingStatus updates throughout the different deletion steps. |
tags | array | Key-value pairs used to manage metadata for model cards. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ModelCardName, Content, ModelCardStatus, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.model_cards (
ModelCardName,
ModelCardStatus,
Content,
region
)
SELECT
'{{ ModelCardName }}',
'{{ ModelCardStatus }}',
'{{ Content }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.model_cards (
ModelCardName,
SecurityConfig,
ModelCardStatus,
Content,
CreatedBy,
LastModifiedBy,
Tags,
region
)
SELECT
'{{ ModelCardName }}',
'{{ SecurityConfig }}',
'{{ ModelCardStatus }}',
'{{ Content }}',
'{{ CreatedBy }}',
'{{ LastModifiedBy }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: model_card
props:
- name: ModelCardName
value: '{{ ModelCardName }}'
- name: SecurityConfig
value:
KmsKeyId: '{{ KmsKeyId }}'
- name: ModelCardStatus
value: '{{ ModelCardStatus }}'
- name: Content
value:
ModelOverview:
ModelDescription: '{{ ModelDescription }}'
ModelOwner: '{{ ModelOwner }}'
ModelCreator: '{{ ModelCreator }}'
ProblemType: '{{ ProblemType }}'
AlgorithmType: '{{ AlgorithmType }}'
ModelId: '{{ ModelId }}'
ModelArtifact:
- '{{ ModelArtifact[0] }}'
ModelName: '{{ ModelName }}'
ModelVersion: null
InferenceEnvironment:
ContainerImage:
- '{{ ContainerImage[0] }}'
ModelPackageDetails:
ModelPackageDescription: '{{ ModelPackageDescription }}'
ModelPackageArn: '{{ ModelPackageArn }}'
CreatedBy:
UserProfileName: '{{ UserProfileName }}'
ModelPackageStatus: '{{ ModelPackageStatus }}'
ModelApprovalStatus: '{{ ModelApprovalStatus }}'
ApprovalDescription: '{{ ApprovalDescription }}'
ModelPackageGroupName: '{{ ModelPackageGroupName }}'
ModelPackageName: '{{ ModelPackageName }}'
ModelPackageVersion: null
Domain: '{{ Domain }}'
Task: '{{ Task }}'
SourceAlgorithms:
- AlgorithmName: '{{ AlgorithmName }}'
ModelDataUrl: '{{ ModelDataUrl }}'
InferenceSpecification:
Containers:
- ContainerHostname: '{{ ContainerHostname }}'
Environment: {}
ModelInput:
DataInputConfig: '{{ DataInputConfig }}'
Image: '{{ Image }}'
ImageDigest: '{{ ImageDigest }}'
ModelDataUrl: '{{ ModelDataUrl }}'
Framework: '{{ Framework }}'
FrameworkVersion: '{{ FrameworkVersion }}'
NearestModelName: '{{ NearestModelName }}'
SupportedContentTypes:
- '{{ SupportedContentTypes[0] }}'
SupportedRealtimeInferenceInstanceTypes:
- '{{ SupportedRealtimeInferenceInstanceTypes[0] }}'
SupportedResponseMIMETypes:
- '{{ SupportedResponseMIMETypes[0] }}'
SupportedTransformInstanceTypes:
- '{{ SupportedTransformInstanceTypes[0] }}'
IntendedUses:
PurposeOfModel: '{{ PurposeOfModel }}'
IntendedUses: '{{ IntendedUses }}'
FactorsAffectingModelEfficiency: '{{ FactorsAffectingModelEfficiency }}'
RiskRating: '{{ RiskRating }}'
ExplanationsForRiskRating: '{{ ExplanationsForRiskRating }}'
BusinessDetails:
BusinessProblem: '{{ BusinessProblem }}'
BusinessStakeholders: '{{ BusinessStakeholders }}'
LineOfBusiness: '{{ LineOfBusiness }}'
TrainingDetails:
ObjectiveFunction:
Function:
Function: '{{ Function }}'
Facet: '{{ Facet }}'
Condition: '{{ Condition }}'
Notes: '{{ Notes }}'
TrainingObservations: '{{ TrainingObservations }}'
TrainingJobDetails:
TrainingArn: '{{ TrainingArn }}'
TrainingDatasets:
- '{{ TrainingDatasets[0] }}'
TrainingEnvironment:
ContainerImage:
- '{{ ContainerImage[0] }}'
TrainingMetrics:
- Name: '{{ Name }}'
Notes: '{{ Notes }}'
Value: null
UserProvidedTrainingMetrics:
- null
HyperParameters:
- Name: '{{ Name }}'
Value: '{{ Value }}'
UserProvidedHyperParameters:
- null
EvaluationDetails:
- Name: '{{ Name }}'
EvaluationObservation: '{{ EvaluationObservation }}'
EvaluationJobArn: '{{ EvaluationJobArn }}'
Datasets:
- '{{ Datasets[0] }}'
Metadata: {}
MetricGroups:
- Name: '{{ Name }}'
MetricData:
- null
AdditionalInformation:
EthicalConsiderations: '{{ EthicalConsiderations }}'
CaveatsAndRecommendations: '{{ CaveatsAndRecommendations }}'
CustomDetails: {}
- name: CreatedBy
value:
UserProfileArn: '{{ UserProfileArn }}'
UserProfileName: '{{ UserProfileName }}'
DomainId: '{{ DomainId }}'
- name: LastModifiedBy
value: null
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
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