Skip to main content

aws_sdk_sagemaker/client/
describe_model_card.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`DescribeModelCard`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`model_card_name(impl Into<String>)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::model_card_name) / [`set_model_card_name(Option<String>)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::set_model_card_name):<br>required: **true**<br><p>The name or Amazon Resource Name (ARN) of the model card to describe.</p><br>
7    ///   - [`model_card_version(i32)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::model_card_version) / [`set_model_card_version(Option<i32>)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::set_model_card_version):<br>required: **false**<br><p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p><br>
8    ///   - [`included_data(IncludedData)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::included_data) / [`set_included_data(Option<IncludedData>)`](crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::set_included_data):<br>required: **false**<br><p>Specifies the level of model card data to include in the response. Use this parameter to call <code>DescribeModelCard</code> without requiring <code>kms:Decrypt</code> permission on the customer-managed Amazon Web Services KMS key.</p> <ul>  <li>   <p><code>AllData</code>: Returns the full model card <code>Content</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the model card. This is the default.</p></li>  <li>   <p><code>MetadataOnly</code>: Returns the model card with sanitized <code>Content</code> that includes only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. For the list of fields preserved in the response, see <code>Content</code>.</p></li> </ul> <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p><br>
9    /// - On success, responds with [`DescribeModelCardOutput`](crate::operation::describe_model_card::DescribeModelCardOutput) with field(s):
10    ///   - [`model_card_arn(Option<String>)`](crate::operation::describe_model_card::DescribeModelCardOutput::model_card_arn): <p>The Amazon Resource Name (ARN) of the model card.</p>
11    ///   - [`model_card_name(Option<String>)`](crate::operation::describe_model_card::DescribeModelCardOutput::model_card_name): <p>The name of the model card.</p>
12    ///   - [`model_card_version(Option<i32>)`](crate::operation::describe_model_card::DescribeModelCardOutput::model_card_version): <p>The version of the model card.</p>
13    ///   - [`content(Option<String>)`](crate::operation::describe_model_card::DescribeModelCardOutput::content): <p>The content of the model card. Content is provided as a string in the <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a>.</p> <p>When you set <code>IncludedData</code> to <code>MetadataOnly</code> in the request, SageMaker returns a sanitized version of <code>Content</code> that includes only the following JSON paths, when present in the model card:</p> <ul>  <li>   <p><code>model_overview.model_id</code></p></li>  <li>   <p><code>model_overview.model_name</code></p></li>  <li>   <p><code>intended_uses.risk_rating</code></p></li>  <li>   <p><code>model_package_details.model_package_group_name</code></p></li>  <li>   <p><code>model_package_details.model_package_arn</code></p></li> </ul> <p>All other fields are removed from <code>Content</code> when <code>IncludedData</code> is <code>MetadataOnly</code>, including model description, training details, evaluation details, business details, and additional information. To retrieve the complete <code>Content</code>, set <code>IncludedData</code> to <code>AllData</code> or omit the parameter.</p>
14    ///   - [`model_card_status(Option<ModelCardStatus>)`](crate::operation::describe_model_card::DescribeModelCardOutput::model_card_status): <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p> <ul>  <li>   <p><code>Draft</code>: The model card is a work in progress.</p></li>  <li>   <p><code>PendingReview</code>: The model card is pending review.</p></li>  <li>   <p><code>Approved</code>: The model card is approved.</p></li>  <li>   <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li> </ul>
15    ///   - [`security_config(Option<ModelCardSecurityConfig>)`](crate::operation::describe_model_card::DescribeModelCardOutput::security_config): <p>The security configuration used to protect model card content.</p>
16    ///   - [`creation_time(Option<DateTime>)`](crate::operation::describe_model_card::DescribeModelCardOutput::creation_time): <p>The date and time the model card was created.</p>
17    ///   - [`created_by(Option<UserContext>)`](crate::operation::describe_model_card::DescribeModelCardOutput::created_by): <p>Information about the user who created or modified a SageMaker resource.</p>
18    ///   - [`last_modified_time(Option<DateTime>)`](crate::operation::describe_model_card::DescribeModelCardOutput::last_modified_time): <p>The date and time the model card was last modified.</p>
19    ///   - [`last_modified_by(Option<UserContext>)`](crate::operation::describe_model_card::DescribeModelCardOutput::last_modified_by): <p>Information about the user who created or modified a SageMaker resource.</p>
20    ///   - [`model_card_processing_status(Option<ModelCardProcessingStatus>)`](crate::operation::describe_model_card::DescribeModelCardOutput::model_card_processing_status): <p>The processing status of model card deletion. The <code>ModelCardProcessingStatus</code> updates throughout the different deletion steps.</p> <ul>  <li>   <p><code>DeletePending</code>: Model card deletion request received.</p></li>  <li>   <p><code>DeleteInProgress</code>: Model card deletion is in progress.</p></li>  <li>   <p><code>ContentDeleted</code>: Deleted model card content.</p></li>  <li>   <p><code>ExportJobsDeleted</code>: Deleted all export jobs associated with the model card.</p></li>  <li>   <p><code>DeleteCompleted</code>: Successfully deleted the model card.</p></li>  <li>   <p><code>DeleteFailed</code>: The model card failed to delete.</p></li> </ul>
21    /// - On failure, responds with [`SdkError<DescribeModelCardError>`](crate::operation::describe_model_card::DescribeModelCardError)
22    pub fn describe_model_card(&self) -> crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder {
23        crate::operation::describe_model_card::builders::DescribeModelCardFluentBuilder::new(self.handle.clone())
24    }
25}