aws_sdk_cloudformation/operation/describe_events/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_events::_describe_events_output::DescribeEventsOutputBuilder;
3
4pub use crate::operation::describe_events::_describe_events_input::DescribeEventsInputBuilder;
5
6impl crate::operation::describe_events::builders::DescribeEventsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::describe_events::DescribeEventsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_events::DescribeEventsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_events();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeEvents`.
24///
25/// <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>
26/// <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>
27/// <p>Returns different types of events including:</p>
28/// <ul>
29/// <li>
30/// <p><b>Progress events</b> - Status updates during stack operation execution.</p></li>
31/// <li>
32/// <p><b>Validation errors</b> - Failures from CloudFormation Early Validations.</p></li>
33/// <li>
34/// <p><b>Provisioning errors</b> - Resource creation and update failures.</p></li>
35/// <li>
36/// <p><b>Hook invocation errors</b> - Failures from CloudFormation Hook during stack operations.</p></li>
37/// </ul><note>
38/// <p>One of <code>ChangeSetName</code>, <code>OperationId</code> or <code>StackName</code> must be specified as input.</p>
39/// </note>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct DescribeEventsFluentBuilder {
42    handle: ::std::sync::Arc<crate::client::Handle>,
43    inner: crate::operation::describe_events::builders::DescribeEventsInputBuilder,
44    config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47    crate::client::customize::internal::CustomizableSend<
48        crate::operation::describe_events::DescribeEventsOutput,
49        crate::operation::describe_events::DescribeEventsError,
50    > for DescribeEventsFluentBuilder
51{
52    fn send(
53        self,
54        config_override: crate::config::Builder,
55    ) -> crate::client::customize::internal::BoxFuture<
56        crate::client::customize::internal::SendResult<
57            crate::operation::describe_events::DescribeEventsOutput,
58            crate::operation::describe_events::DescribeEventsError,
59        >,
60    > {
61        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62    }
63}
64impl DescribeEventsFluentBuilder {
65    /// Creates a new `DescribeEventsFluentBuilder`.
66    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67        Self {
68            handle,
69            inner: ::std::default::Default::default(),
70            config_override: ::std::option::Option::None,
71        }
72    }
73    /// Access the DescribeEvents as a reference.
74    pub fn as_input(&self) -> &crate::operation::describe_events::builders::DescribeEventsInputBuilder {
75        &self.inner
76    }
77    /// Sends the request and returns the response.
78    ///
79    /// If an error occurs, an `SdkError` will be returned with additional details that
80    /// can be matched against.
81    ///
82    /// By default, any retryable failures will be retried twice. Retry behavior
83    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84    /// set when configuring the client.
85    pub async fn send(
86        self,
87    ) -> ::std::result::Result<
88        crate::operation::describe_events::DescribeEventsOutput,
89        ::aws_smithy_runtime_api::client::result::SdkError<
90            crate::operation::describe_events::DescribeEventsError,
91            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92        >,
93    > {
94        let input = self
95            .inner
96            .build()
97            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98        let runtime_plugins = crate::operation::describe_events::DescribeEvents::operation_runtime_plugins(
99            self.handle.runtime_plugins.clone(),
100            &self.handle.conf,
101            self.config_override,
102        );
103        crate::operation::describe_events::DescribeEvents::orchestrate(&runtime_plugins, input).await
104    }
105
106    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107    pub fn customize(
108        self,
109    ) -> crate::client::customize::CustomizableOperation<
110        crate::operation::describe_events::DescribeEventsOutput,
111        crate::operation::describe_events::DescribeEventsError,
112        Self,
113    > {
114        crate::client::customize::CustomizableOperation::new(self)
115    }
116    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117        self.set_config_override(::std::option::Option::Some(config_override.into()));
118        self
119    }
120
121    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122        self.config_override = config_override;
123        self
124    }
125    /// Create a paginator for this request
126    ///
127    /// 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).
128    pub fn into_paginator(self) -> crate::operation::describe_events::paginator::DescribeEventsPaginator {
129        crate::operation::describe_events::paginator::DescribeEventsPaginator::new(self.handle, self.inner)
130    }
131    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
132    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.stack_name(input.into());
134        self
135    }
136    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
137    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.inner = self.inner.set_stack_name(input);
139        self
140    }
141    /// <p>The name or unique stack ID for which you want to retrieve events.</p>
142    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_stack_name()
144    }
145    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
146    pub fn change_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.change_set_name(input.into());
148        self
149    }
150    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
151    pub fn set_change_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_change_set_name(input);
153        self
154    }
155    /// <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
156    pub fn get_change_set_name(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_change_set_name()
158    }
159    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
160    pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.inner = self.inner.operation_id(input.into());
162        self
163    }
164    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
165    pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_operation_id(input);
167        self
168    }
169    /// <p>The unique identifier of the operation for which you want to retrieve events.</p>
170    pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
171        self.inner.get_operation_id()
172    }
173    /// <p>Filters to apply when retrieving events.</p>
174    pub fn filters(mut self, input: crate::types::EventFilter) -> Self {
175        self.inner = self.inner.filters(input);
176        self
177    }
178    /// <p>Filters to apply when retrieving events.</p>
179    pub fn set_filters(mut self, input: ::std::option::Option<crate::types::EventFilter>) -> Self {
180        self.inner = self.inner.set_filters(input);
181        self
182    }
183    /// <p>Filters to apply when retrieving events.</p>
184    pub fn get_filters(&self) -> &::std::option::Option<crate::types::EventFilter> {
185        self.inner.get_filters()
186    }
187    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
188    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.next_token(input.into());
190        self
191    }
192    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
193    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.inner = self.inner.set_next_token(input);
195        self
196    }
197    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
198    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
199        self.inner.get_next_token()
200    }
201}