View a markdown version of this page

DescribeModelCard - Amazon SageMaker

DescribeModelCard

Describes the content, creation time, and security configuration of an Amazon SageMaker Model Card.

Important

To retrieve only metadata about a model card without requiring kms:Decrypt permission on the associated customer-managed AWS 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.

Request Syntax

{ "IncludedData": "string", "ModelCardName": "string", "ModelCardVersion": number }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

IncludedData

Specifies the level of model card data to include in the response. Use this parameter to call DescribeModelCard without requiring kms:Decrypt permission on the customer-managed AWS KMS key.

  • AllData: Returns the full model card Content. This option requires kms:Decrypt permission on the customer-managed key, if one is associated with the model card. This is the default.

  • MetadataOnly: Returns the model card with sanitized Content that includes only a small set of unencrypted metadata fields. This option does not require kms:Decrypt permission. For the list of fields preserved in the response, see Content.

If you don't specify a value, SageMaker returns AllData.

Type: String

Valid Values: AllData | MetadataOnly

Required: No

ModelCardName

The name or Amazon Resource Name (ARN) of the model card to describe.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: (arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:model-card/.*)?([a-zA-Z0-9](-*[a-zA-Z0-9]){0,62})

Required: Yes

ModelCardVersion

The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.

Type: Integer

Required: No

Response Syntax

{ "Content": "string", "CreatedBy": { "DomainId": "string", "IamIdentity": { "Arn": "string", "PrincipalId": "string", "SourceIdentity": "string" }, "UserProfileArn": "string", "UserProfileName": "string" }, "CreationTime": number, "LastModifiedBy": { "DomainId": "string", "IamIdentity": { "Arn": "string", "PrincipalId": "string", "SourceIdentity": "string" }, "UserProfileArn": "string", "UserProfileName": "string" }, "LastModifiedTime": number, "ModelCardArn": "string", "ModelCardName": "string", "ModelCardProcessingStatus": "string", "ModelCardStatus": "string", "ModelCardVersion": number, "SecurityConfig": { "KmsKeyId": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Content

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.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 100000.

Pattern: .*

CreatedBy

Information about the user who created or modified a SageMaker resource.

Type: UserContext object

CreationTime

The date and time the model card was created.

Type: Timestamp

LastModifiedBy

Information about the user who created or modified a SageMaker resource.

Type: UserContext object

LastModifiedTime

The date and time the model card was last modified.

Type: Timestamp

ModelCardArn

The Amazon Resource Name (ARN) of the model card.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: 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}

ModelCardName

The name of the model card.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}

ModelCardProcessingStatus

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.

Type: String

Valid Values: DeleteInProgress | DeletePending | ContentDeleted | ExportJobsDeleted | DeleteCompleted | DeleteFailed

ModelCardStatus

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.

Type: String

Valid Values: Draft | PendingReview | Approved | Archived

ModelCardVersion

The version of the model card.

Type: Integer

SecurityConfig

The security configuration used to protect model card content.

Type: ModelCardSecurityConfig object

Errors

For information about the errors that are common to all actions, see Common Error Types.

ResourceNotFound

Resource being access is not found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: