aws_sdk_sagemaker/client/describe_model_package.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 [`DescribeModelPackage`](crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`model_package_name(impl Into<String>)`](crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder::model_package_name) / [`set_model_package_name(Option<String>)`](crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder::set_model_package_name):<br>required: **true**<br><p>The name or Amazon Resource Name (ARN) of the model package to describe.</p> <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p><br>
7 /// - [`included_data(IncludedData)`](crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder::included_data) / [`set_included_data(Option<IncludedData>)`](crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder::set_included_data):<br>required: **false**<br><p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p> <ul> <li> <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li> <li> <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li> </ul> <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p><br>
8 /// - On success, responds with [`DescribeModelPackageOutput`](crate::operation::describe_model_package::DescribeModelPackageOutput) with field(s):
9 /// - [`model_package_name(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_name): <p>The name of the model package being described.</p>
10 /// - [`model_package_group_name(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_group_name): <p>If the model is a versioned model, the name of the model group that the versioned model belongs to.</p>
11 /// - [`model_package_version(Option<i32>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_version): <p>The version of the model package.</p>
12 /// - [`model_package_registration_type(Option<ModelPackageRegistrationType>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_registration_type): <p>The package registration type of the model package output.</p>
13 /// - [`model_package_arn(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_arn): <p>The Amazon Resource Name (ARN) of the model package.</p>
14 /// - [`model_package_description(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_description): <p>A brief summary of the model package.</p>
15 /// - [`creation_time(Option<DateTime>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::creation_time): <p>A timestamp specifying when the model package was created.</p>
16 /// - [`inference_specification(Option<InferenceSpecification>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::inference_specification): <p>Details about inference jobs that you can run with models based on this model package.</p>
17 /// - [`source_algorithm_specification(Option<SourceAlgorithmSpecification>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::source_algorithm_specification): <p>Details about the algorithm that was used to create the model package.</p>
18 /// - [`validation_specification(Option<ModelPackageValidationSpecification>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::validation_specification): <p>Configurations for one or more transform jobs that SageMaker runs to test the model package.</p>
19 /// - [`model_package_status(Option<ModelPackageStatus>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_status): <p>The current status of the model package.</p>
20 /// - [`model_package_status_details(Option<ModelPackageStatusDetails>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_package_status_details): <p>Details about the current status of the model package.</p>
21 /// - [`certify_for_marketplace(Option<bool>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::certify_for_marketplace): <p>Whether the model package is certified for listing on Amazon Web Services Marketplace.</p>
22 /// - [`model_approval_status(Option<ModelApprovalStatus>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_approval_status): <p>The approval status of the model package.</p>
23 /// - [`created_by(Option<UserContext>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::created_by): <p>Information about the user who created or modified a SageMaker resource.</p>
24 /// - [`metadata_properties(Option<MetadataProperties>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::metadata_properties): <p>Metadata properties of the tracking entity, trial, or trial component.</p>
25 /// - [`model_metrics(Option<ModelMetrics>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_metrics): <p>Metrics for the model.</p>
26 /// - [`last_modified_time(Option<DateTime>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::last_modified_time): <p>The last time that the model package was modified.</p>
27 /// - [`last_modified_by(Option<UserContext>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::last_modified_by): <p>Information about the user who created or modified a SageMaker resource.</p>
28 /// - [`approval_description(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::approval_description): <p>A description provided for the model approval.</p>
29 /// - [`domain(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::domain): <p>The machine learning domain of the model package you specified. Common machine learning domains include computer vision and natural language processing.</p>
30 /// - [`task(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::task): <p>The machine learning task you specified that your model package accomplishes. Common machine learning tasks include object detection and image classification.</p>
31 /// - [`sample_payload_url(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::sample_payload_url): <p>The Amazon Simple Storage Service (Amazon S3) path where the sample payload are stored. This path points to a single gzip compressed tar archive (.tar.gz suffix).</p>
32 /// - [`customer_metadata_properties(Option<HashMap::<String, String>>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::customer_metadata_properties): <p>The metadata properties associated with the model package versions.</p>
33 /// - [`drift_check_baselines(Option<DriftCheckBaselines>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::drift_check_baselines): <p>Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html#pipelines-quality-clarify-baseline-drift-detection">Drift Detection against Previous Baselines in SageMaker Pipelines</a> in the <i>Amazon SageMaker Developer Guide</i>.</p>
34 /// - [`additional_inference_specifications(Option<Vec::<AdditionalInferenceSpecificationDefinition>>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::additional_inference_specifications): <p>An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.</p>
35 /// - [`skip_model_validation(Option<SkipModelValidation>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::skip_model_validation): <p>Indicates if you want to skip model validation.</p>
36 /// - [`source_uri(Option<String>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::source_uri): <p>The URI of the source for the model package.</p>
37 /// - [`security_config(Option<ModelPackageSecurityConfig>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::security_config): <p>The KMS Key ID (<code>KMSKeyId</code>) used for encryption of model package information.</p>
38 /// - [`model_card(Option<ModelPackageModelCard>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_card): <p>The model card associated with the model package. Since <code>ModelPackageModelCard</code> is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of <code>ModelCard</code>. The <code>ModelPackageModelCard</code> schema does not include <code>model_package_details</code>, and <code>model_overview</code> is composed of the <code>model_creator</code> and <code>model_artifact</code> properties. For more information about the model package model card schema, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html#model-card-schema">Model package model card schema</a>. For more information about the model card associated with the model package, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html">View the Details of a Model Version</a>.</p> <p>When you set <code>IncludedData</code> to <code>MetadataOnly</code> in the request, <code>ModelCardStatus</code> is preserved and <code>ModelCardContent</code> is sanitized to include 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>Because the <code>ModelPackageModelCard</code> schema does not include <code>model_package_details</code> and limits <code>model_overview</code> to <code>model_creator</code> and <code>model_artifact</code>, the sanitized <code>ModelCardContent</code> for a model package typically contains only <code>intended_uses.risk_rating</code> if it was provided when the model card was created. To retrieve the complete <code>ModelCardContent</code>, set <code>IncludedData</code> to <code>AllData</code> or omit the parameter.</p>
39 /// - [`model_life_cycle(Option<ModelLifeCycle>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::model_life_cycle): <p>A structure describing the current state of the model in its life cycle.</p>
40 /// - [`managed_storage_type(Option<ManagedStorageType>)`](crate::operation::describe_model_package::DescribeModelPackageOutput::managed_storage_type): <p>The storage type of the model package.</p>
41 /// - On failure, responds with [`SdkError<DescribeModelPackageError>`](crate::operation::describe_model_package::DescribeModelPackageError)
42 pub fn describe_model_package(&self) -> crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder {
43 crate::operation::describe_model_package::builders::DescribeModelPackageFluentBuilder::new(self.handle.clone())
44 }
45}