aws_sdk_sagemaker/client/
create_inference_experiment.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 [`CreateInferenceExperiment`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_name):<br>required: **true**<br><p>The name for the inference experiment.</p><br>
7    ///   - [`r#type(InferenceExperimentType)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::type) / [`set_type(Option<InferenceExperimentType>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_type):<br>required: **true**<br><p>The type of the inference experiment that you want to run. The following types of experiments are possible:</p> <ul>  <li>   <p><code>ShadowMode</code>: You can use this type to validate a shadow variant. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/shadow-tests.html">Shadow tests</a>.</p></li> </ul><br>
8    ///   - [`schedule(InferenceExperimentSchedule)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::schedule) / [`set_schedule(Option<InferenceExperimentSchedule>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_schedule):<br>required: **false**<br><p>The duration for which you want the inference experiment to run. If you don't specify this field, the experiment automatically starts immediately upon creation and concludes after 7 days.</p><br>
9    ///   - [`description(impl Into<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_description):<br>required: **false**<br><p>A description for the inference experiment.</p><br>
10    ///   - [`role_arn(impl Into<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_role_arn):<br>required: **true**<br><p>The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.</p><br>
11    ///   - [`endpoint_name(impl Into<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::endpoint_name) / [`set_endpoint_name(Option<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_endpoint_name):<br>required: **true**<br><p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p><br>
12    ///   - [`model_variants(ModelVariantConfig)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::model_variants) / [`set_model_variants(Option<Vec::<ModelVariantConfig>>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_model_variants):<br>required: **true**<br><p>An array of <code>ModelVariantConfig</code> objects. There is one for each variant in the inference experiment. Each <code>ModelVariantConfig</code> object in the array describes the infrastructure configuration for the corresponding variant.</p><br>
13    ///   - [`data_storage_config(InferenceExperimentDataStorageConfig)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::data_storage_config) / [`set_data_storage_config(Option<InferenceExperimentDataStorageConfig>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_data_storage_config):<br>required: **false**<br><p>The Amazon S3 location and configuration for storing inference request and response data.</p> <p>This is an optional parameter that you can use for data capture. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html">Capture data</a>.</p><br>
14    ///   - [`shadow_mode_config(ShadowModeConfig)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::shadow_mode_config) / [`set_shadow_mode_config(Option<ShadowModeConfig>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_shadow_mode_config):<br>required: **true**<br><p>The configuration of <code>ShadowMode</code> inference experiment type. Use this field to specify a production variant which takes all the inference requests, and a shadow variant to which Amazon SageMaker replicates a percentage of the inference requests. For the shadow variant also specify the percentage of requests that Amazon SageMaker replicates.</p><br>
15    ///   - [`kms_key(impl Into<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::kms_key) / [`set_kms_key(Option<String>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_kms_key):<br>required: **false**<br><p>The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The <code>KmsKey</code> can be any of the following formats:</p> <ul>  <li>   <p>KMS key ID</p>   <p><code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code></p></li>  <li>   <p>Amazon Resource Name (ARN) of a KMS key</p>   <p><code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code></p></li>  <li>   <p>KMS key Alias</p>   <p><code>"alias/ExampleAlias"</code></p></li>  <li>   <p>Amazon Resource Name (ARN) of a KMS key Alias</p>   <p><code>"arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"</code></p></li> </ul> <p>If you use a KMS key ID or an alias of your KMS key, the Amazon SageMaker execution role must include permissions to call <code>kms:Encrypt</code>. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS managed keys for <code>OutputDataConfig</code>. If you use a bucket policy with an <code>s3:PutObject</code> permission that only allows objects with server-side encryption, set the condition key of <code>s3:x-amz-server-side-encryption</code> to <code>"aws:kms"</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html">KMS managed Encryption Keys</a> in the <i>Amazon Simple Storage Service Developer Guide.</i></p> <p>The KMS key policy must grant permission to the IAM role that you specify in your <code>CreateEndpoint</code> and <code>UpdateEndpoint</code> requests. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">Using Key Policies in Amazon Web Services KMS</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p><br>
16    ///   - [`tags(Tag)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::set_tags):<br>required: **false**<br><p>Array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/ARG/latest/userguide/tagging.html">Tagging your Amazon Web Services Resources</a>.</p><br>
17    /// - On success, responds with [`CreateInferenceExperimentOutput`](crate::operation::create_inference_experiment::CreateInferenceExperimentOutput) with field(s):
18    ///   - [`inference_experiment_arn(Option<String>)`](crate::operation::create_inference_experiment::CreateInferenceExperimentOutput::inference_experiment_arn): <p>The ARN for your inference experiment.</p>
19    /// - On failure, responds with [`SdkError<CreateInferenceExperimentError>`](crate::operation::create_inference_experiment::CreateInferenceExperimentError)
20    pub fn create_inference_experiment(&self) -> crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder {
21        crate::operation::create_inference_experiment::builders::CreateInferenceExperimentFluentBuilder::new(self.handle.clone())
22    }
23}