aws-sdk-cloudformation 1.111.0

AWS SDK for AWS CloudFormation
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::describe_events::_describe_events_input::DescribeEventsInputBuilder;

pub use crate::operation::describe_events::_describe_events_output::DescribeEventsOutputBuilder;

impl crate::operation::describe_events::builders::DescribeEventsInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::describe_events::DescribeEventsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_events::DescribeEventsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.describe_events();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DescribeEvents`.
///
/// <p>Returns CloudFormation events based on flexible query criteria. Groups events by operation ID, enabling you to focus on individual stack operations during deployment.</p>
/// <p>An operation is any action performed on a stack, including stack lifecycle actions (Create, Update, Delete, Rollback), change set creation, nested stack creation, and automatic rollbacks triggered by failures. Each operation has a unique identifier (Operation ID) and represents a discrete change attempt on the stack.</p>
/// <p>Returns different types of events including:</p>
/// <ul>
/// <li>
/// <p><b>Progress events</b> - Status updates during stack operation execution.</p></li>
/// <li>
/// <p><b>Validation errors</b> - Failures from CloudFormation Early Validations.</p></li>
/// <li>
/// <p><b>Provisioning errors</b> - Resource creation and update failures.</p></li>
/// <li>
/// <p><b>Hook invocation errors</b> - Failures from CloudFormation Hook during stack operations.</p></li>
/// </ul><note>
/// <p>One of <code>ChangeSetName</code>, <code>OperationId</code> or <code>StackName</code> must be specified as input.</p>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DescribeEventsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::describe_events::builders::DescribeEventsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::describe_events::DescribeEventsOutput,
        crate::operation::describe_events::DescribeEventsError,
    > for DescribeEventsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::describe_events::DescribeEventsOutput,
            crate::operation::describe_events::DescribeEventsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DescribeEventsFluentBuilder {
    /// Creates a new `DescribeEventsFluentBuilder`.
    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 DescribeEvents as a reference.
    pub fn as_input(&self) -> &crate::operation::describe_events::builders::DescribeEventsInputBuilder {
        &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::describe_events::DescribeEventsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_events::DescribeEventsError,
            ::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::describe_events::DescribeEvents::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::describe_events::DescribeEvents::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::describe_events::DescribeEventsOutput,
        crate::operation::describe_events::DescribeEventsError,
        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
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::describe_events::paginator::DescribeEventsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::describe_events::paginator::DescribeEventsPaginator {
        crate::operation::describe_events::paginator::DescribeEventsPaginator::new(self.handle, self.inner)
    }
    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.stack_name(input.into());
        self
    }
    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_stack_name(input);
        self
    }
    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_stack_name()
    }
    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
    pub fn change_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.change_set_name(input.into());
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
    pub fn set_change_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_change_set_name(input);
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
    pub fn get_change_set_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_change_set_name()
    }
    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
    pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.operation_id(input.into());
        self
    }
    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
    pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_operation_id(input);
        self
    }
    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
    pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_operation_id()
    }
    /// <p>Filters to apply when retrieving events.</p>
    pub fn filters(mut self, input: crate::types::EventFilter) -> Self {
        self.inner = self.inner.filters(input);
        self
    }
    /// <p>Filters to apply when retrieving events.</p>
    pub fn set_filters(mut self, input: ::std::option::Option<crate::types::EventFilter>) -> Self {
        self.inner = self.inner.set_filters(input);
        self
    }
    /// <p>Filters to apply when retrieving events.</p>
    pub fn get_filters(&self) -> &::std::option::Option<crate::types::EventFilter> {
        self.inner.get_filters()
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
}