aws_sdk_rds/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 events related to DB instances, DB clusters, DB parameter groups, DB security groups, DB snapshots, DB cluster snapshots, and RDS Proxies for the past 14 days. Events specific to a particular DB instance, DB cluster, DB parameter group, DB security group, DB snapshot, DB cluster snapshot group, or RDS Proxy can be obtained by providing the name as a parameter.</p>
26/// <p>For more information on working with events, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-events.html">Monitoring Amazon RDS events</a> in the <i>Amazon RDS User Guide</i> and <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/working-with-events.html">Monitoring Amazon Aurora events</a> in the <i>Amazon Aurora User Guide</i>.</p><note>
27/// <p>By default, RDS returns events that were generated in the past hour.</p>
28/// </note>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct DescribeEventsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::describe_events::builders::DescribeEventsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::describe_events::DescribeEventsOutput,
38 crate::operation::describe_events::DescribeEventsError,
39 > for DescribeEventsFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::describe_events::DescribeEventsOutput,
47 crate::operation::describe_events::DescribeEventsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl DescribeEventsFluentBuilder {
54 /// Creates a new `DescribeEventsFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the DescribeEvents as a reference.
63 pub fn as_input(&self) -> &crate::operation::describe_events::builders::DescribeEventsInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::describe_events::DescribeEventsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::describe_events::DescribeEventsError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::describe_events::DescribeEvents::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::describe_events::DescribeEvents::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::describe_events::DescribeEventsOutput,
100 crate::operation::describe_events::DescribeEventsError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// Create a paginator for this request
115 ///
116 /// 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).
117 pub fn into_paginator(self) -> crate::operation::describe_events::paginator::DescribeEventsPaginator {
118 crate::operation::describe_events::paginator::DescribeEventsPaginator::new(self.handle, self.inner)
119 }
120 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
121 /// <p>Constraints:</p>
122 /// <ul>
123 /// <li>
124 /// <p>If <code>SourceIdentifier</code> is supplied, <code>SourceType</code> must also be provided.</p></li>
125 /// <li>
126 /// <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p></li>
127 /// <li>
128 /// <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p></li>
129 /// <li>
130 /// <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p></li>
131 /// <li>
132 /// <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p></li>
133 /// <li>
134 /// <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p></li>
135 /// <li>
136 /// <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p></li>
137 /// <li>
138 /// <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p></li>
139 /// <li>
140 /// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
141 /// </ul>
142 pub fn source_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.inner = self.inner.source_identifier(input.into());
144 self
145 }
146 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
147 /// <p>Constraints:</p>
148 /// <ul>
149 /// <li>
150 /// <p>If <code>SourceIdentifier</code> is supplied, <code>SourceType</code> must also be provided.</p></li>
151 /// <li>
152 /// <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p></li>
153 /// <li>
154 /// <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p></li>
155 /// <li>
156 /// <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p></li>
157 /// <li>
158 /// <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p></li>
159 /// <li>
160 /// <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p></li>
161 /// <li>
162 /// <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p></li>
163 /// <li>
164 /// <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p></li>
165 /// <li>
166 /// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
167 /// </ul>
168 pub fn set_source_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.inner = self.inner.set_source_identifier(input);
170 self
171 }
172 /// <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p>
173 /// <p>Constraints:</p>
174 /// <ul>
175 /// <li>
176 /// <p>If <code>SourceIdentifier</code> is supplied, <code>SourceType</code> must also be provided.</p></li>
177 /// <li>
178 /// <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p></li>
179 /// <li>
180 /// <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p></li>
181 /// <li>
182 /// <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p></li>
183 /// <li>
184 /// <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p></li>
185 /// <li>
186 /// <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p></li>
187 /// <li>
188 /// <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p></li>
189 /// <li>
190 /// <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p></li>
191 /// <li>
192 /// <p>Can't end with a hyphen or contain two consecutive hyphens.</p></li>
193 /// </ul>
194 pub fn get_source_identifier(&self) -> &::std::option::Option<::std::string::String> {
195 self.inner.get_source_identifier()
196 }
197 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
198 pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
199 self.inner = self.inner.source_type(input);
200 self
201 }
202 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
203 pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
204 self.inner = self.inner.set_source_type(input);
205 self
206 }
207 /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
208 pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
209 self.inner.get_source_type()
210 }
211 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
212 /// <p>Example: 2009-07-08T18:00Z</p>
213 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
214 self.inner = self.inner.start_time(input);
215 self
216 }
217 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
218 /// <p>Example: 2009-07-08T18:00Z</p>
219 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
220 self.inner = self.inner.set_start_time(input);
221 self
222 }
223 /// <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
224 /// <p>Example: 2009-07-08T18:00Z</p>
225 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
226 self.inner.get_start_time()
227 }
228 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
229 /// <p>Example: 2009-07-08T18:00Z</p>
230 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
231 self.inner = self.inner.end_time(input);
232 self
233 }
234 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
235 /// <p>Example: 2009-07-08T18:00Z</p>
236 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
237 self.inner = self.inner.set_end_time(input);
238 self
239 }
240 /// <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a></p>
241 /// <p>Example: 2009-07-08T18:00Z</p>
242 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
243 self.inner.get_end_time()
244 }
245 /// <p>The number of minutes to retrieve events for.</p>
246 /// <p>Default: 60</p>
247 pub fn duration(mut self, input: i32) -> Self {
248 self.inner = self.inner.duration(input);
249 self
250 }
251 /// <p>The number of minutes to retrieve events for.</p>
252 /// <p>Default: 60</p>
253 pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
254 self.inner = self.inner.set_duration(input);
255 self
256 }
257 /// <p>The number of minutes to retrieve events for.</p>
258 /// <p>Default: 60</p>
259 pub fn get_duration(&self) -> &::std::option::Option<i32> {
260 self.inner.get_duration()
261 }
262 ///
263 /// Appends an item to `EventCategories`.
264 ///
265 /// To override the contents of this collection use [`set_event_categories`](Self::set_event_categories).
266 ///
267 /// <p>A list of event categories that trigger notifications for a event notification subscription.</p>
268 pub fn event_categories(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
269 self.inner = self.inner.event_categories(input.into());
270 self
271 }
272 /// <p>A list of event categories that trigger notifications for a event notification subscription.</p>
273 pub fn set_event_categories(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
274 self.inner = self.inner.set_event_categories(input);
275 self
276 }
277 /// <p>A list of event categories that trigger notifications for a event notification subscription.</p>
278 pub fn get_event_categories(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
279 self.inner.get_event_categories()
280 }
281 ///
282 /// Appends an item to `Filters`.
283 ///
284 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
285 ///
286 /// <p>This parameter isn't currently supported.</p>
287 pub fn filters(mut self, input: crate::types::Filter) -> Self {
288 self.inner = self.inner.filters(input);
289 self
290 }
291 /// <p>This parameter isn't currently supported.</p>
292 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
293 self.inner = self.inner.set_filters(input);
294 self
295 }
296 /// <p>This parameter isn't currently supported.</p>
297 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
298 self.inner.get_filters()
299 }
300 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
301 /// <p>Default: 100</p>
302 /// <p>Constraints: Minimum 20, maximum 100.</p>
303 pub fn max_records(mut self, input: i32) -> Self {
304 self.inner = self.inner.max_records(input);
305 self
306 }
307 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
308 /// <p>Default: 100</p>
309 /// <p>Constraints: Minimum 20, maximum 100.</p>
310 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
311 self.inner = self.inner.set_max_records(input);
312 self
313 }
314 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
315 /// <p>Default: 100</p>
316 /// <p>Constraints: Minimum 20, maximum 100.</p>
317 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
318 self.inner.get_max_records()
319 }
320 /// <p>An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
321 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322 self.inner = self.inner.marker(input.into());
323 self
324 }
325 /// <p>An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
326 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.inner = self.inner.set_marker(input);
328 self
329 }
330 /// <p>An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
331 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
332 self.inner.get_marker()
333 }
334}