aws_sdk_iotfleetwise/client/
put_encryption_configuration.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 [`PutEncryptionConfiguration`](crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>The ID of the KMS key that is used for encryption.</p><br>
7    ///   - [`encryption_type(EncryptionType)`](crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder::encryption_type) / [`set_encryption_type(Option<EncryptionType>)`](crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder::set_encryption_type):<br>required: **true**<br><p>The type of encryption. Choose <code>KMS_BASED_ENCRYPTION</code> to use a KMS key or <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key.</p><br>
8    /// - On success, responds with [`PutEncryptionConfigurationOutput`](crate::operation::put_encryption_configuration::PutEncryptionConfigurationOutput) with field(s):
9    ///   - [`kms_key_id(Option<String>)`](crate::operation::put_encryption_configuration::PutEncryptionConfigurationOutput::kms_key_id): <p>The ID of the KMS key that is used for encryption.</p>
10    ///   - [`encryption_status(EncryptionStatus)`](crate::operation::put_encryption_configuration::PutEncryptionConfigurationOutput::encryption_status): <p>The encryption status.</p>
11    ///   - [`encryption_type(EncryptionType)`](crate::operation::put_encryption_configuration::PutEncryptionConfigurationOutput::encryption_type): <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use an KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
12    /// - On failure, responds with [`SdkError<PutEncryptionConfigurationError>`](crate::operation::put_encryption_configuration::PutEncryptionConfigurationError)
13    pub fn put_encryption_configuration(&self) -> crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder {
14        crate::operation::put_encryption_configuration::builders::PutEncryptionConfigurationFluentBuilder::new(self.handle.clone())
15    }
16}