aws-sdk-sagemaker 1.189.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateInferenceExperimentInput {
    /// <p>The name for the inference experiment.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <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>
    pub r#type: ::std::option::Option<crate::types::InferenceExperimentType>,
    /// <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>
    pub schedule: ::std::option::Option<crate::types::InferenceExperimentSchedule>,
    /// <p>A description for the inference experiment.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <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>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p>
    pub endpoint_name: ::std::option::Option<::std::string::String>,
    /// <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>
    pub model_variants: ::std::option::Option<::std::vec::Vec<crate::types::ModelVariantConfig>>,
    /// <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>
    pub data_storage_config: ::std::option::Option<crate::types::InferenceExperimentDataStorageConfig>,
    /// <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>
    pub shadow_mode_config: ::std::option::Option<crate::types::ShadowModeConfig>,
    /// <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>
    pub kms_key: ::std::option::Option<::std::string::String>,
    /// <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>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInferenceExperimentInput {
    /// <p>The name for the inference experiment.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <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>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::InferenceExperimentType> {
        self.r#type.as_ref()
    }
    /// <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>
    pub fn schedule(&self) -> ::std::option::Option<&crate::types::InferenceExperimentSchedule> {
        self.schedule.as_ref()
    }
    /// <p>A description for the inference experiment.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <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>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p>
    pub fn endpoint_name(&self) -> ::std::option::Option<&str> {
        self.endpoint_name.as_deref()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.model_variants.is_none()`.
    pub fn model_variants(&self) -> &[crate::types::ModelVariantConfig] {
        self.model_variants.as_deref().unwrap_or_default()
    }
    /// <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>
    pub fn data_storage_config(&self) -> ::std::option::Option<&crate::types::InferenceExperimentDataStorageConfig> {
        self.data_storage_config.as_ref()
    }
    /// <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>
    pub fn shadow_mode_config(&self) -> ::std::option::Option<&crate::types::ShadowModeConfig> {
        self.shadow_mode_config.as_ref()
    }
    /// <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>
    pub fn kms_key(&self) -> ::std::option::Option<&str> {
        self.kms_key.as_deref()
    }
    /// <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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateInferenceExperimentInput {
    /// Creates a new builder-style object to manufacture [`CreateInferenceExperimentInput`](crate::operation::create_inference_experiment::CreateInferenceExperimentInput).
    pub fn builder() -> crate::operation::create_inference_experiment::builders::CreateInferenceExperimentInputBuilder {
        crate::operation::create_inference_experiment::builders::CreateInferenceExperimentInputBuilder::default()
    }
}

/// A builder for [`CreateInferenceExperimentInput`](crate::operation::create_inference_experiment::CreateInferenceExperimentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateInferenceExperimentInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::InferenceExperimentType>,
    pub(crate) schedule: ::std::option::Option<crate::types::InferenceExperimentSchedule>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) endpoint_name: ::std::option::Option<::std::string::String>,
    pub(crate) model_variants: ::std::option::Option<::std::vec::Vec<crate::types::ModelVariantConfig>>,
    pub(crate) data_storage_config: ::std::option::Option<crate::types::InferenceExperimentDataStorageConfig>,
    pub(crate) shadow_mode_config: ::std::option::Option<crate::types::ShadowModeConfig>,
    pub(crate) kms_key: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInferenceExperimentInputBuilder {
    /// <p>The name for the inference experiment.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name for the inference experiment.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name for the inference experiment.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <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>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::InferenceExperimentType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::InferenceExperimentType>) -> Self {
        self.r#type = input;
        self
    }
    /// <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>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::InferenceExperimentType> {
        &self.r#type
    }
    /// <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>
    pub fn schedule(mut self, input: crate::types::InferenceExperimentSchedule) -> Self {
        self.schedule = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::InferenceExperimentSchedule>) -> Self {
        self.schedule = input;
        self
    }
    /// <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>
    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::InferenceExperimentSchedule> {
        &self.schedule
    }
    /// <p>A description for the inference experiment.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description for the inference experiment.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the inference experiment.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <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>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <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>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p>
    /// This field is required.
    pub fn endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p>
    pub fn set_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint_name = input;
        self
    }
    /// <p>The name of the Amazon SageMaker endpoint on which you want to run the inference experiment.</p>
    pub fn get_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_name
    }
    /// Appends an item to `model_variants`.
    ///
    /// To override the contents of this collection use [`set_model_variants`](Self::set_model_variants).
    ///
    /// <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>
    pub fn model_variants(mut self, input: crate::types::ModelVariantConfig) -> Self {
        let mut v = self.model_variants.unwrap_or_default();
        v.push(input);
        self.model_variants = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_model_variants(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ModelVariantConfig>>) -> Self {
        self.model_variants = input;
        self
    }
    /// <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>
    pub fn get_model_variants(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ModelVariantConfig>> {
        &self.model_variants
    }
    /// <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>
    pub fn data_storage_config(mut self, input: crate::types::InferenceExperimentDataStorageConfig) -> Self {
        self.data_storage_config = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_data_storage_config(mut self, input: ::std::option::Option<crate::types::InferenceExperimentDataStorageConfig>) -> Self {
        self.data_storage_config = input;
        self
    }
    /// <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>
    pub fn get_data_storage_config(&self) -> &::std::option::Option<crate::types::InferenceExperimentDataStorageConfig> {
        &self.data_storage_config
    }
    /// <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>
    /// This field is required.
    pub fn shadow_mode_config(mut self, input: crate::types::ShadowModeConfig) -> Self {
        self.shadow_mode_config = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_shadow_mode_config(mut self, input: ::std::option::Option<crate::types::ShadowModeConfig>) -> Self {
        self.shadow_mode_config = input;
        self
    }
    /// <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>
    pub fn get_shadow_mode_config(&self) -> &::std::option::Option<crate::types::ShadowModeConfig> {
        &self.shadow_mode_config
    }
    /// <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>
    pub fn kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key = input;
        self
    }
    /// <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>
    pub fn get_kms_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <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>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <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>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateInferenceExperimentInput`](crate::operation::create_inference_experiment::CreateInferenceExperimentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_inference_experiment::CreateInferenceExperimentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_inference_experiment::CreateInferenceExperimentInput {
            name: self.name,
            r#type: self.r#type,
            schedule: self.schedule,
            description: self.description,
            role_arn: self.role_arn,
            endpoint_name: self.endpoint_name,
            model_variants: self.model_variants,
            data_storage_config: self.data_storage_config,
            shadow_mode_config: self.shadow_mode_config,
            kms_key: self.kms_key,
            tags: self.tags,
        })
    }
}