aws-sdk-firehose 1.102.0

AWS SDK for Amazon Kinesis Firehose
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::stop_delivery_stream_encryption::_stop_delivery_stream_encryption_output::StopDeliveryStreamEncryptionOutputBuilder;

pub use crate::operation::stop_delivery_stream_encryption::_stop_delivery_stream_encryption_input::StopDeliveryStreamEncryptionInputBuilder;

impl crate::operation::stop_delivery_stream_encryption::builders::StopDeliveryStreamEncryptionInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.stop_delivery_stream_encryption();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StopDeliveryStreamEncryption`.
///
/// <p>Disables server-side encryption (SSE) for the Firehose stream.</p>
/// <p>This operation is asynchronous. It returns immediately. When you invoke it, Firehose first sets the encryption status of the stream to <code>DISABLING</code>, and then to <code>DISABLED</code>. You can continue to read and write data to your stream while its status is <code>DISABLING</code>. It can take up to 5 seconds after the encryption status changes to <code>DISABLED</code> before all records written to the Firehose stream are no longer subject to encryption. To find out whether a record or a batch of records was encrypted, check the response elements <code>PutRecordOutput$Encrypted</code> and <code>PutRecordBatchOutput$Encrypted</code>, respectively.</p>
/// <p>To check the encryption state of a Firehose stream, use <code>DescribeDeliveryStream</code>.</p>
/// <p>If SSE is enabled using a customer managed CMK and then you invoke <code>StopDeliveryStreamEncryption</code>, Firehose schedules the related KMS grant for retirement and then retires it after it ensures that it is finished delivering records to the destination.</p>
/// <p>The <code>StartDeliveryStreamEncryption</code> and <code>StopDeliveryStreamEncryption</code> operations have a combined limit of 25 calls per Firehose stream per 24 hours. For example, you reach the limit if you call <code>StartDeliveryStreamEncryption</code> 13 times and <code>StopDeliveryStreamEncryption</code> 12 times for the same Firehose stream in a 24-hour period.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StopDeliveryStreamEncryptionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::stop_delivery_stream_encryption::builders::StopDeliveryStreamEncryptionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionOutput,
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionError,
    > for StopDeliveryStreamEncryptionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionOutput,
            crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StopDeliveryStreamEncryptionFluentBuilder {
    /// Creates a new `StopDeliveryStreamEncryptionFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the StopDeliveryStreamEncryption as a reference.
    pub fn as_input(&self) -> &crate::operation::stop_delivery_stream_encryption::builders::StopDeliveryStreamEncryptionInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryption::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryption::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionOutput,
        crate::operation::stop_delivery_stream_encryption::StopDeliveryStreamEncryptionError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name of the Firehose stream for which you want to disable server-side encryption (SSE).</p>
    pub fn delivery_stream_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.delivery_stream_name(input.into());
        self
    }
    /// <p>The name of the Firehose stream for which you want to disable server-side encryption (SSE).</p>
    pub fn set_delivery_stream_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_delivery_stream_name(input);
        self
    }
    /// <p>The name of the Firehose stream for which you want to disable server-side encryption (SSE).</p>
    pub fn get_delivery_stream_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_delivery_stream_name()
    }
}