aws-sdk-firehose 1.100.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::update_destination::_update_destination_output::UpdateDestinationOutputBuilder;

pub use crate::operation::update_destination::_update_destination_input::UpdateDestinationInputBuilder;

impl crate::operation::update_destination::builders::UpdateDestinationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_destination::UpdateDestinationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_destination::UpdateDestinationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_destination();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateDestination`.
///
/// <p>Updates the specified destination of the specified Firehose stream.</p>
/// <p>Use this operation to change the destination type (for example, to replace the Amazon S3 destination with Amazon Redshift) or change the parameters associated with a destination (for example, to change the bucket name of the Amazon S3 destination). The update might not occur immediately. The target Firehose stream remains active while the configurations are updated, so data writes to the Firehose stream can continue during this process. The updated configurations are usually effective within a few minutes.</p>
/// <p>Switching between Amazon OpenSearch Service and other services is not supported. For an Amazon OpenSearch Service destination, you can only update to another Amazon OpenSearch Service destination.</p>
/// <p>If the destination type is the same, Firehose merges the configuration parameters specified with the destination configuration that already exists on the delivery stream. If any of the parameters are not specified in the call, the existing values are retained. For example, in the Amazon S3 destination, if <code>EncryptionConfiguration</code> is not specified, then the existing <code>EncryptionConfiguration</code> is maintained on the destination.</p>
/// <p>If the destination type is not the same, for example, changing the destination from Amazon S3 to Amazon Redshift, Firehose does not merge any parameters. In this case, all parameters must be specified.</p>
/// <p>Firehose uses <code>CurrentDeliveryStreamVersionId</code> to avoid race conditions and conflicting merges. This is a required field, and the service updates the configuration only if the existing configuration has a version ID that matches. After the update is applied successfully, the version ID is updated, and can be retrieved using <code>DescribeDeliveryStream</code>. Use the new version ID to set <code>CurrentDeliveryStreamVersionId</code> in the next call.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateDestinationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_destination::builders::UpdateDestinationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_destination::UpdateDestinationOutput,
        crate::operation::update_destination::UpdateDestinationError,
    > for UpdateDestinationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_destination::UpdateDestinationOutput,
            crate::operation::update_destination::UpdateDestinationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateDestinationFluentBuilder {
    /// Creates a new `UpdateDestinationFluentBuilder`.
    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 UpdateDestination as a reference.
    pub fn as_input(&self) -> &crate::operation::update_destination::builders::UpdateDestinationInputBuilder {
        &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::update_destination::UpdateDestinationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_destination::UpdateDestinationError,
            ::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::update_destination::UpdateDestination::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_destination::UpdateDestination::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::update_destination::UpdateDestinationOutput,
        crate::operation::update_destination::UpdateDestinationError,
        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.</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.</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.</p>
    pub fn get_delivery_stream_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_delivery_stream_name()
    }
    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
    pub fn current_delivery_stream_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.current_delivery_stream_version_id(input.into());
        self
    }
    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
    pub fn set_current_delivery_stream_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_current_delivery_stream_version_id(input);
        self
    }
    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
    pub fn get_current_delivery_stream_version_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_current_delivery_stream_version_id()
    }
    /// <p>The ID of the destination.</p>
    pub fn destination_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.destination_id(input.into());
        self
    }
    /// <p>The ID of the destination.</p>
    pub fn set_destination_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_destination_id(input);
        self
    }
    /// <p>The ID of the destination.</p>
    pub fn get_destination_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_destination_id()
    }
    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
    #[deprecated]
    pub fn s3_destination_update(mut self, input: crate::types::S3DestinationUpdate) -> Self {
        self.inner = self.inner.s3_destination_update(input);
        self
    }
    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
    #[deprecated]
    pub fn set_s3_destination_update(mut self, input: ::std::option::Option<crate::types::S3DestinationUpdate>) -> Self {
        self.inner = self.inner.set_s3_destination_update(input);
        self
    }
    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
    #[deprecated]
    pub fn get_s3_destination_update(&self) -> &::std::option::Option<crate::types::S3DestinationUpdate> {
        self.inner.get_s3_destination_update()
    }
    /// <p>Describes an update for a destination in Amazon S3.</p>
    pub fn extended_s3_destination_update(mut self, input: crate::types::ExtendedS3DestinationUpdate) -> Self {
        self.inner = self.inner.extended_s3_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon S3.</p>
    pub fn set_extended_s3_destination_update(mut self, input: ::std::option::Option<crate::types::ExtendedS3DestinationUpdate>) -> Self {
        self.inner = self.inner.set_extended_s3_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon S3.</p>
    pub fn get_extended_s3_destination_update(&self) -> &::std::option::Option<crate::types::ExtendedS3DestinationUpdate> {
        self.inner.get_extended_s3_destination_update()
    }
    /// <p>Describes an update for a destination in Amazon Redshift.</p>
    pub fn redshift_destination_update(mut self, input: crate::types::RedshiftDestinationUpdate) -> Self {
        self.inner = self.inner.redshift_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon Redshift.</p>
    pub fn set_redshift_destination_update(mut self, input: ::std::option::Option<crate::types::RedshiftDestinationUpdate>) -> Self {
        self.inner = self.inner.set_redshift_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon Redshift.</p>
    pub fn get_redshift_destination_update(&self) -> &::std::option::Option<crate::types::RedshiftDestinationUpdate> {
        self.inner.get_redshift_destination_update()
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn elasticsearch_destination_update(mut self, input: crate::types::ElasticsearchDestinationUpdate) -> Self {
        self.inner = self.inner.elasticsearch_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn set_elasticsearch_destination_update(mut self, input: ::std::option::Option<crate::types::ElasticsearchDestinationUpdate>) -> Self {
        self.inner = self.inner.set_elasticsearch_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn get_elasticsearch_destination_update(&self) -> &::std::option::Option<crate::types::ElasticsearchDestinationUpdate> {
        self.inner.get_elasticsearch_destination_update()
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn amazonopensearchservice_destination_update(mut self, input: crate::types::AmazonopensearchserviceDestinationUpdate) -> Self {
        self.inner = self.inner.amazonopensearchservice_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn set_amazonopensearchservice_destination_update(
        mut self,
        input: ::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate>,
    ) -> Self {
        self.inner = self.inner.set_amazonopensearchservice_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
    pub fn get_amazonopensearchservice_destination_update(&self) -> &::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate> {
        self.inner.get_amazonopensearchservice_destination_update()
    }
    /// <p>Describes an update for a destination in Splunk.</p>
    pub fn splunk_destination_update(mut self, input: crate::types::SplunkDestinationUpdate) -> Self {
        self.inner = self.inner.splunk_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Splunk.</p>
    pub fn set_splunk_destination_update(mut self, input: ::std::option::Option<crate::types::SplunkDestinationUpdate>) -> Self {
        self.inner = self.inner.set_splunk_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Splunk.</p>
    pub fn get_splunk_destination_update(&self) -> &::std::option::Option<crate::types::SplunkDestinationUpdate> {
        self.inner.get_splunk_destination_update()
    }
    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
    pub fn http_endpoint_destination_update(mut self, input: crate::types::HttpEndpointDestinationUpdate) -> Self {
        self.inner = self.inner.http_endpoint_destination_update(input);
        self
    }
    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
    pub fn set_http_endpoint_destination_update(mut self, input: ::std::option::Option<crate::types::HttpEndpointDestinationUpdate>) -> Self {
        self.inner = self.inner.set_http_endpoint_destination_update(input);
        self
    }
    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
    pub fn get_http_endpoint_destination_update(&self) -> &::std::option::Option<crate::types::HttpEndpointDestinationUpdate> {
        self.inner.get_http_endpoint_destination_update()
    }
    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
    pub fn amazon_open_search_serverless_destination_update(mut self, input: crate::types::AmazonOpenSearchServerlessDestinationUpdate) -> Self {
        self.inner = self.inner.amazon_open_search_serverless_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
    pub fn set_amazon_open_search_serverless_destination_update(
        mut self,
        input: ::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate>,
    ) -> Self {
        self.inner = self.inner.set_amazon_open_search_serverless_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
    pub fn get_amazon_open_search_serverless_destination_update(
        &self,
    ) -> &::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate> {
        self.inner.get_amazon_open_search_serverless_destination_update()
    }
    /// <p>Update to the Snowflake destination configuration settings.</p>
    pub fn snowflake_destination_update(mut self, input: crate::types::SnowflakeDestinationUpdate) -> Self {
        self.inner = self.inner.snowflake_destination_update(input);
        self
    }
    /// <p>Update to the Snowflake destination configuration settings.</p>
    pub fn set_snowflake_destination_update(mut self, input: ::std::option::Option<crate::types::SnowflakeDestinationUpdate>) -> Self {
        self.inner = self.inner.set_snowflake_destination_update(input);
        self
    }
    /// <p>Update to the Snowflake destination configuration settings.</p>
    pub fn get_snowflake_destination_update(&self) -> &::std::option::Option<crate::types::SnowflakeDestinationUpdate> {
        self.inner.get_snowflake_destination_update()
    }
    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
    pub fn iceberg_destination_update(mut self, input: crate::types::IcebergDestinationUpdate) -> Self {
        self.inner = self.inner.iceberg_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
    pub fn set_iceberg_destination_update(mut self, input: ::std::option::Option<crate::types::IcebergDestinationUpdate>) -> Self {
        self.inner = self.inner.set_iceberg_destination_update(input);
        self
    }
    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
    pub fn get_iceberg_destination_update(&self) -> &::std::option::Option<crate::types::IcebergDestinationUpdate> {
        self.inner.get_iceberg_destination_update()
    }
}