aws_sdk_ssm/operation/describe_ops_items/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_ops_items::_describe_ops_items_output::DescribeOpsItemsOutputBuilder;
3
4pub use crate::operation::describe_ops_items::_describe_ops_items_input::DescribeOpsItemsInputBuilder;
5
6impl crate::operation::describe_ops_items::builders::DescribeOpsItemsInputBuilder {
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_ops_items::DescribeOpsItemsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_ops_items::DescribeOpsItemsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_ops_items();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeOpsItems`.
24///
25/// <p>Query a set of OpsItems. You must have permission in Identity and Access Management (IAM) to query a list of OpsItems. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-setup.html">Set up OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
26/// <p>Operations engineers and IT professionals use Amazon Web Services Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their Amazon Web Services resources. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter.html">Amazon Web Services Systems Manager OpsCenter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeOpsItemsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::describe_ops_items::builders::DescribeOpsItemsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::describe_ops_items::DescribeOpsItemsOutput,
36        crate::operation::describe_ops_items::DescribeOpsItemsError,
37    > for DescribeOpsItemsFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::describe_ops_items::DescribeOpsItemsOutput,
45            crate::operation::describe_ops_items::DescribeOpsItemsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl DescribeOpsItemsFluentBuilder {
52    /// Creates a new `DescribeOpsItemsFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the DescribeOpsItems as a reference.
61    pub fn as_input(&self) -> &crate::operation::describe_ops_items::builders::DescribeOpsItemsInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::describe_ops_items::DescribeOpsItemsOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::describe_ops_items::DescribeOpsItemsError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::describe_ops_items::DescribeOpsItems::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::describe_ops_items::DescribeOpsItems::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::describe_ops_items::DescribeOpsItemsOutput,
98        crate::operation::describe_ops_items::DescribeOpsItemsError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// Create a paginator for this request
113    ///
114    /// Paginators are used by calling [`send().await`](crate::operation::describe_ops_items::paginator::DescribeOpsItemsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115    pub fn into_paginator(self) -> crate::operation::describe_ops_items::paginator::DescribeOpsItemsPaginator {
116        crate::operation::describe_ops_items::paginator::DescribeOpsItemsPaginator::new(self.handle, self.inner)
117    }
118    ///
119    /// Appends an item to `OpsItemFilters`.
120    ///
121    /// To override the contents of this collection use [`set_ops_item_filters`](Self::set_ops_item_filters).
122    ///
123    /// <p>One or more filters to limit the response.</p>
124    /// <ul>
125    /// <li>
126    /// <p>Key: CreatedTime</p>
127    /// <p>Operations: GreaterThan, LessThan</p></li>
128    /// <li>
129    /// <p>Key: LastModifiedBy</p>
130    /// <p>Operations: Contains, Equals</p></li>
131    /// <li>
132    /// <p>Key: LastModifiedTime</p>
133    /// <p>Operations: GreaterThan, LessThan</p></li>
134    /// <li>
135    /// <p>Key: Priority</p>
136    /// <p>Operations: Equals</p></li>
137    /// <li>
138    /// <p>Key: Source</p>
139    /// <p>Operations: Contains, Equals</p></li>
140    /// <li>
141    /// <p>Key: Status</p>
142    /// <p>Operations: Equals</p></li>
143    /// <li>
144    /// <p>Key: Title*</p>
145    /// <p>Operations: Equals,Contains</p></li>
146    /// <li>
147    /// <p>Key: OperationalData**</p>
148    /// <p>Operations: Equals</p></li>
149    /// <li>
150    /// <p>Key: OperationalDataKey</p>
151    /// <p>Operations: Equals</p></li>
152    /// <li>
153    /// <p>Key: OperationalDataValue</p>
154    /// <p>Operations: Equals, Contains</p></li>
155    /// <li>
156    /// <p>Key: OpsItemId</p>
157    /// <p>Operations: Equals</p></li>
158    /// <li>
159    /// <p>Key: ResourceId</p>
160    /// <p>Operations: Contains</p></li>
161    /// <li>
162    /// <p>Key: AutomationId</p>
163    /// <p>Operations: Equals</p></li>
164    /// <li>
165    /// <p>Key: AccountId</p>
166    /// <p>Operations: Equals</p></li>
167    /// </ul>
168    /// <p>*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.</p>
169    /// <p>**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}</p>
170    pub fn ops_item_filters(mut self, input: crate::types::OpsItemFilter) -> Self {
171        self.inner = self.inner.ops_item_filters(input);
172        self
173    }
174    /// <p>One or more filters to limit the response.</p>
175    /// <ul>
176    /// <li>
177    /// <p>Key: CreatedTime</p>
178    /// <p>Operations: GreaterThan, LessThan</p></li>
179    /// <li>
180    /// <p>Key: LastModifiedBy</p>
181    /// <p>Operations: Contains, Equals</p></li>
182    /// <li>
183    /// <p>Key: LastModifiedTime</p>
184    /// <p>Operations: GreaterThan, LessThan</p></li>
185    /// <li>
186    /// <p>Key: Priority</p>
187    /// <p>Operations: Equals</p></li>
188    /// <li>
189    /// <p>Key: Source</p>
190    /// <p>Operations: Contains, Equals</p></li>
191    /// <li>
192    /// <p>Key: Status</p>
193    /// <p>Operations: Equals</p></li>
194    /// <li>
195    /// <p>Key: Title*</p>
196    /// <p>Operations: Equals,Contains</p></li>
197    /// <li>
198    /// <p>Key: OperationalData**</p>
199    /// <p>Operations: Equals</p></li>
200    /// <li>
201    /// <p>Key: OperationalDataKey</p>
202    /// <p>Operations: Equals</p></li>
203    /// <li>
204    /// <p>Key: OperationalDataValue</p>
205    /// <p>Operations: Equals, Contains</p></li>
206    /// <li>
207    /// <p>Key: OpsItemId</p>
208    /// <p>Operations: Equals</p></li>
209    /// <li>
210    /// <p>Key: ResourceId</p>
211    /// <p>Operations: Contains</p></li>
212    /// <li>
213    /// <p>Key: AutomationId</p>
214    /// <p>Operations: Equals</p></li>
215    /// <li>
216    /// <p>Key: AccountId</p>
217    /// <p>Operations: Equals</p></li>
218    /// </ul>
219    /// <p>*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.</p>
220    /// <p>**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}</p>
221    pub fn set_ops_item_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemFilter>>) -> Self {
222        self.inner = self.inner.set_ops_item_filters(input);
223        self
224    }
225    /// <p>One or more filters to limit the response.</p>
226    /// <ul>
227    /// <li>
228    /// <p>Key: CreatedTime</p>
229    /// <p>Operations: GreaterThan, LessThan</p></li>
230    /// <li>
231    /// <p>Key: LastModifiedBy</p>
232    /// <p>Operations: Contains, Equals</p></li>
233    /// <li>
234    /// <p>Key: LastModifiedTime</p>
235    /// <p>Operations: GreaterThan, LessThan</p></li>
236    /// <li>
237    /// <p>Key: Priority</p>
238    /// <p>Operations: Equals</p></li>
239    /// <li>
240    /// <p>Key: Source</p>
241    /// <p>Operations: Contains, Equals</p></li>
242    /// <li>
243    /// <p>Key: Status</p>
244    /// <p>Operations: Equals</p></li>
245    /// <li>
246    /// <p>Key: Title*</p>
247    /// <p>Operations: Equals,Contains</p></li>
248    /// <li>
249    /// <p>Key: OperationalData**</p>
250    /// <p>Operations: Equals</p></li>
251    /// <li>
252    /// <p>Key: OperationalDataKey</p>
253    /// <p>Operations: Equals</p></li>
254    /// <li>
255    /// <p>Key: OperationalDataValue</p>
256    /// <p>Operations: Equals, Contains</p></li>
257    /// <li>
258    /// <p>Key: OpsItemId</p>
259    /// <p>Operations: Equals</p></li>
260    /// <li>
261    /// <p>Key: ResourceId</p>
262    /// <p>Operations: Contains</p></li>
263    /// <li>
264    /// <p>Key: AutomationId</p>
265    /// <p>Operations: Equals</p></li>
266    /// <li>
267    /// <p>Key: AccountId</p>
268    /// <p>Operations: Equals</p></li>
269    /// </ul>
270    /// <p>*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.</p>
271    /// <p>**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}</p>
272    pub fn get_ops_item_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemFilter>> {
273        self.inner.get_ops_item_filters()
274    }
275    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
276    pub fn max_results(mut self, input: i32) -> Self {
277        self.inner = self.inner.max_results(input);
278        self
279    }
280    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
281    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
282        self.inner = self.inner.set_max_results(input);
283        self
284    }
285    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
286    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
287        self.inner.get_max_results()
288    }
289    /// <p>A token to start the list. Use this token to get the next set of results.</p>
290    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.inner = self.inner.next_token(input.into());
292        self
293    }
294    /// <p>A token to start the list. Use this token to get the next set of results.</p>
295    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.inner = self.inner.set_next_token(input);
297        self
298    }
299    /// <p>A token to start the list. Use this token to get the next set of results.</p>
300    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
301        self.inner.get_next_token()
302    }
303}