aws_sdk_redshift/operation/describe_events/
_describe_events_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeEventsInput {
7    /// <p>The identifier of the event source for which events will be returned. If this parameter is not specified, then all sources are included in the response.</p>
8    /// <p>Constraints:</p>
9    /// <p>If <i>SourceIdentifier</i> is supplied, <i>SourceType</i> must also be provided.</p>
10    /// <ul>
11    /// <li>
12    /// <p>Specify a cluster identifier when <i>SourceType</i> is <code>cluster</code>.</p></li>
13    /// <li>
14    /// <p>Specify a cluster security group name when <i>SourceType</i> is <code>cluster-security-group</code>.</p></li>
15    /// <li>
16    /// <p>Specify a cluster parameter group name when <i>SourceType</i> is <code>cluster-parameter-group</code>.</p></li>
17    /// <li>
18    /// <p>Specify a cluster snapshot identifier when <i>SourceType</i> is <code>cluster-snapshot</code>.</p></li>
19    /// </ul>
20    pub source_identifier: ::std::option::Option<::std::string::String>,
21    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
22    /// <p>Constraints:</p>
23    /// <p>If <i>SourceType</i> is supplied, <i>SourceIdentifier</i> must also be provided.</p>
24    /// <ul>
25    /// <li>
26    /// <p>Specify <code>cluster</code> when <i>SourceIdentifier</i> is a cluster identifier.</p></li>
27    /// <li>
28    /// <p>Specify <code>cluster-security-group</code> when <i>SourceIdentifier</i> is a cluster security group name.</p></li>
29    /// <li>
30    /// <p>Specify <code>cluster-parameter-group</code> when <i>SourceIdentifier</i> is a cluster parameter group name.</p></li>
31    /// <li>
32    /// <p>Specify <code>cluster-snapshot</code> when <i>SourceIdentifier</i> is a cluster snapshot identifier.</p></li>
33    /// </ul>
34    pub source_type: ::std::option::Option<crate::types::SourceType>,
35    /// <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>
36    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
37    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
38    /// <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>
39    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
40    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
41    /// <p>The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.</p>
42    /// <p>Default: <code>60</code></p>
43    pub duration: ::std::option::Option<i32>,
44    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
45    /// <p>Default: <code>100</code></p>
46    /// <p>Constraints: minimum 20, maximum 100.</p>
47    pub max_records: ::std::option::Option<i32>,
48    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeEvents</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
49    pub marker: ::std::option::Option<::std::string::String>,
50}
51impl DescribeEventsInput {
52    /// <p>The identifier of the event source for which events will be returned. If this parameter is not specified, then all sources are included in the response.</p>
53    /// <p>Constraints:</p>
54    /// <p>If <i>SourceIdentifier</i> is supplied, <i>SourceType</i> must also be provided.</p>
55    /// <ul>
56    /// <li>
57    /// <p>Specify a cluster identifier when <i>SourceType</i> is <code>cluster</code>.</p></li>
58    /// <li>
59    /// <p>Specify a cluster security group name when <i>SourceType</i> is <code>cluster-security-group</code>.</p></li>
60    /// <li>
61    /// <p>Specify a cluster parameter group name when <i>SourceType</i> is <code>cluster-parameter-group</code>.</p></li>
62    /// <li>
63    /// <p>Specify a cluster snapshot identifier when <i>SourceType</i> is <code>cluster-snapshot</code>.</p></li>
64    /// </ul>
65    pub fn source_identifier(&self) -> ::std::option::Option<&str> {
66        self.source_identifier.as_deref()
67    }
68    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
69    /// <p>Constraints:</p>
70    /// <p>If <i>SourceType</i> is supplied, <i>SourceIdentifier</i> must also be provided.</p>
71    /// <ul>
72    /// <li>
73    /// <p>Specify <code>cluster</code> when <i>SourceIdentifier</i> is a cluster identifier.</p></li>
74    /// <li>
75    /// <p>Specify <code>cluster-security-group</code> when <i>SourceIdentifier</i> is a cluster security group name.</p></li>
76    /// <li>
77    /// <p>Specify <code>cluster-parameter-group</code> when <i>SourceIdentifier</i> is a cluster parameter group name.</p></li>
78    /// <li>
79    /// <p>Specify <code>cluster-snapshot</code> when <i>SourceIdentifier</i> is a cluster snapshot identifier.</p></li>
80    /// </ul>
81    pub fn source_type(&self) -> ::std::option::Option<&crate::types::SourceType> {
82        self.source_type.as_ref()
83    }
84    /// <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>
85    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
86    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
87        self.start_time.as_ref()
88    }
89    /// <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>
90    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
91    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
92        self.end_time.as_ref()
93    }
94    /// <p>The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.</p>
95    /// <p>Default: <code>60</code></p>
96    pub fn duration(&self) -> ::std::option::Option<i32> {
97        self.duration
98    }
99    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
100    /// <p>Default: <code>100</code></p>
101    /// <p>Constraints: minimum 20, maximum 100.</p>
102    pub fn max_records(&self) -> ::std::option::Option<i32> {
103        self.max_records
104    }
105    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeEvents</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
106    pub fn marker(&self) -> ::std::option::Option<&str> {
107        self.marker.as_deref()
108    }
109}
110impl DescribeEventsInput {
111    /// Creates a new builder-style object to manufacture [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
112    pub fn builder() -> crate::operation::describe_events::builders::DescribeEventsInputBuilder {
113        crate::operation::describe_events::builders::DescribeEventsInputBuilder::default()
114    }
115}
116
117/// A builder for [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
118#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
119#[non_exhaustive]
120pub struct DescribeEventsInputBuilder {
121    pub(crate) source_identifier: ::std::option::Option<::std::string::String>,
122    pub(crate) source_type: ::std::option::Option<crate::types::SourceType>,
123    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
124    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
125    pub(crate) duration: ::std::option::Option<i32>,
126    pub(crate) max_records: ::std::option::Option<i32>,
127    pub(crate) marker: ::std::option::Option<::std::string::String>,
128}
129impl DescribeEventsInputBuilder {
130    /// <p>The identifier of the event source for which events will be returned. If this parameter is not specified, then all sources are included in the response.</p>
131    /// <p>Constraints:</p>
132    /// <p>If <i>SourceIdentifier</i> is supplied, <i>SourceType</i> must also be provided.</p>
133    /// <ul>
134    /// <li>
135    /// <p>Specify a cluster identifier when <i>SourceType</i> is <code>cluster</code>.</p></li>
136    /// <li>
137    /// <p>Specify a cluster security group name when <i>SourceType</i> is <code>cluster-security-group</code>.</p></li>
138    /// <li>
139    /// <p>Specify a cluster parameter group name when <i>SourceType</i> is <code>cluster-parameter-group</code>.</p></li>
140    /// <li>
141    /// <p>Specify a cluster snapshot identifier when <i>SourceType</i> is <code>cluster-snapshot</code>.</p></li>
142    /// </ul>
143    pub fn source_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.source_identifier = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The identifier of the event source for which events will be returned. If this parameter is not specified, then all sources are included in the response.</p>
148    /// <p>Constraints:</p>
149    /// <p>If <i>SourceIdentifier</i> is supplied, <i>SourceType</i> must also be provided.</p>
150    /// <ul>
151    /// <li>
152    /// <p>Specify a cluster identifier when <i>SourceType</i> is <code>cluster</code>.</p></li>
153    /// <li>
154    /// <p>Specify a cluster security group name when <i>SourceType</i> is <code>cluster-security-group</code>.</p></li>
155    /// <li>
156    /// <p>Specify a cluster parameter group name when <i>SourceType</i> is <code>cluster-parameter-group</code>.</p></li>
157    /// <li>
158    /// <p>Specify a cluster snapshot identifier when <i>SourceType</i> is <code>cluster-snapshot</code>.</p></li>
159    /// </ul>
160    pub fn set_source_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.source_identifier = input;
162        self
163    }
164    /// <p>The identifier of the event source for which events will be returned. If this parameter is not specified, then all sources are included in the response.</p>
165    /// <p>Constraints:</p>
166    /// <p>If <i>SourceIdentifier</i> is supplied, <i>SourceType</i> must also be provided.</p>
167    /// <ul>
168    /// <li>
169    /// <p>Specify a cluster identifier when <i>SourceType</i> is <code>cluster</code>.</p></li>
170    /// <li>
171    /// <p>Specify a cluster security group name when <i>SourceType</i> is <code>cluster-security-group</code>.</p></li>
172    /// <li>
173    /// <p>Specify a cluster parameter group name when <i>SourceType</i> is <code>cluster-parameter-group</code>.</p></li>
174    /// <li>
175    /// <p>Specify a cluster snapshot identifier when <i>SourceType</i> is <code>cluster-snapshot</code>.</p></li>
176    /// </ul>
177    pub fn get_source_identifier(&self) -> &::std::option::Option<::std::string::String> {
178        &self.source_identifier
179    }
180    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
181    /// <p>Constraints:</p>
182    /// <p>If <i>SourceType</i> is supplied, <i>SourceIdentifier</i> must also be provided.</p>
183    /// <ul>
184    /// <li>
185    /// <p>Specify <code>cluster</code> when <i>SourceIdentifier</i> is a cluster identifier.</p></li>
186    /// <li>
187    /// <p>Specify <code>cluster-security-group</code> when <i>SourceIdentifier</i> is a cluster security group name.</p></li>
188    /// <li>
189    /// <p>Specify <code>cluster-parameter-group</code> when <i>SourceIdentifier</i> is a cluster parameter group name.</p></li>
190    /// <li>
191    /// <p>Specify <code>cluster-snapshot</code> when <i>SourceIdentifier</i> is a cluster snapshot identifier.</p></li>
192    /// </ul>
193    pub fn source_type(mut self, input: crate::types::SourceType) -> Self {
194        self.source_type = ::std::option::Option::Some(input);
195        self
196    }
197    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
198    /// <p>Constraints:</p>
199    /// <p>If <i>SourceType</i> is supplied, <i>SourceIdentifier</i> must also be provided.</p>
200    /// <ul>
201    /// <li>
202    /// <p>Specify <code>cluster</code> when <i>SourceIdentifier</i> is a cluster identifier.</p></li>
203    /// <li>
204    /// <p>Specify <code>cluster-security-group</code> when <i>SourceIdentifier</i> is a cluster security group name.</p></li>
205    /// <li>
206    /// <p>Specify <code>cluster-parameter-group</code> when <i>SourceIdentifier</i> is a cluster parameter group name.</p></li>
207    /// <li>
208    /// <p>Specify <code>cluster-snapshot</code> when <i>SourceIdentifier</i> is a cluster snapshot identifier.</p></li>
209    /// </ul>
210    pub fn set_source_type(mut self, input: ::std::option::Option<crate::types::SourceType>) -> Self {
211        self.source_type = input;
212        self
213    }
214    /// <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
215    /// <p>Constraints:</p>
216    /// <p>If <i>SourceType</i> is supplied, <i>SourceIdentifier</i> must also be provided.</p>
217    /// <ul>
218    /// <li>
219    /// <p>Specify <code>cluster</code> when <i>SourceIdentifier</i> is a cluster identifier.</p></li>
220    /// <li>
221    /// <p>Specify <code>cluster-security-group</code> when <i>SourceIdentifier</i> is a cluster security group name.</p></li>
222    /// <li>
223    /// <p>Specify <code>cluster-parameter-group</code> when <i>SourceIdentifier</i> is a cluster parameter group name.</p></li>
224    /// <li>
225    /// <p>Specify <code>cluster-snapshot</code> when <i>SourceIdentifier</i> is a cluster snapshot identifier.</p></li>
226    /// </ul>
227    pub fn get_source_type(&self) -> &::std::option::Option<crate::types::SourceType> {
228        &self.source_type
229    }
230    /// <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>
231    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
232    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
233        self.start_time = ::std::option::Option::Some(input);
234        self
235    }
236    /// <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>
237    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
238    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
239        self.start_time = input;
240        self
241    }
242    /// <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>
243    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
244    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
245        &self.start_time
246    }
247    /// <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>
248    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
249    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
250        self.end_time = ::std::option::Option::Some(input);
251        self
252    }
253    /// <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>
254    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
255    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
256        self.end_time = input;
257        self
258    }
259    /// <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>
260    /// <p>Example: <code>2009-07-08T18:00Z</code></p>
261    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
262        &self.end_time
263    }
264    /// <p>The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.</p>
265    /// <p>Default: <code>60</code></p>
266    pub fn duration(mut self, input: i32) -> Self {
267        self.duration = ::std::option::Option::Some(input);
268        self
269    }
270    /// <p>The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.</p>
271    /// <p>Default: <code>60</code></p>
272    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
273        self.duration = input;
274        self
275    }
276    /// <p>The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.</p>
277    /// <p>Default: <code>60</code></p>
278    pub fn get_duration(&self) -> &::std::option::Option<i32> {
279        &self.duration
280    }
281    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
282    /// <p>Default: <code>100</code></p>
283    /// <p>Constraints: minimum 20, maximum 100.</p>
284    pub fn max_records(mut self, input: i32) -> Self {
285        self.max_records = ::std::option::Option::Some(input);
286        self
287    }
288    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
289    /// <p>Default: <code>100</code></p>
290    /// <p>Constraints: minimum 20, maximum 100.</p>
291    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
292        self.max_records = input;
293        self
294    }
295    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
296    /// <p>Default: <code>100</code></p>
297    /// <p>Constraints: minimum 20, maximum 100.</p>
298    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
299        &self.max_records
300    }
301    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeEvents</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
302    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303        self.marker = ::std::option::Option::Some(input.into());
304        self
305    }
306    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeEvents</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
307    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308        self.marker = input;
309        self
310    }
311    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeEvents</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
312    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
313        &self.marker
314    }
315    /// Consumes the builder and constructs a [`DescribeEventsInput`](crate::operation::describe_events::DescribeEventsInput).
316    pub fn build(
317        self,
318    ) -> ::std::result::Result<crate::operation::describe_events::DescribeEventsInput, ::aws_smithy_types::error::operation::BuildError> {
319        ::std::result::Result::Ok(crate::operation::describe_events::DescribeEventsInput {
320            source_identifier: self.source_identifier,
321            source_type: self.source_type,
322            start_time: self.start_time,
323            end_time: self.end_time,
324            duration: self.duration,
325            max_records: self.max_records,
326            marker: self.marker,
327        })
328    }
329}