aws_sdk_ssm/operation/describe_instance_patches/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_instance_patches::_describe_instance_patches_output::DescribeInstancePatchesOutputBuilder;
3
4pub use crate::operation::describe_instance_patches::_describe_instance_patches_input::DescribeInstancePatchesInputBuilder;
5
6impl crate::operation::describe_instance_patches::builders::DescribeInstancePatchesInputBuilder {
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_instance_patches::DescribeInstancePatchesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_instance_patches::DescribeInstancePatchesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_instance_patches();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeInstancePatches`.
24///
25/// <p>Retrieves information about the patches on the specified managed node and their state relative to the patch baseline being used for the node.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeInstancePatchesFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_instance_patches::builders::DescribeInstancePatchesInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_instance_patches::DescribeInstancePatchesOutput,
35        crate::operation::describe_instance_patches::DescribeInstancePatchesError,
36    > for DescribeInstancePatchesFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::describe_instance_patches::DescribeInstancePatchesOutput,
44            crate::operation::describe_instance_patches::DescribeInstancePatchesError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeInstancePatchesFluentBuilder {
51    /// Creates a new `DescribeInstancePatchesFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the DescribeInstancePatches as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_instance_patches::builders::DescribeInstancePatchesInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::describe_instance_patches::DescribeInstancePatchesOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_instance_patches::DescribeInstancePatchesError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::describe_instance_patches::DescribeInstancePatches::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::describe_instance_patches::DescribeInstancePatches::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::describe_instance_patches::DescribeInstancePatchesOutput,
97        crate::operation::describe_instance_patches::DescribeInstancePatchesError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::describe_instance_patches::paginator::DescribeInstancePatchesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::describe_instance_patches::paginator::DescribeInstancePatchesPaginator {
115        crate::operation::describe_instance_patches::paginator::DescribeInstancePatchesPaginator::new(self.handle, self.inner)
116    }
117    /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
118    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.instance_id(input.into());
120        self
121    }
122    /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
123    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_instance_id(input);
125        self
126    }
127    /// <p>The ID of the managed node whose patch state information should be retrieved.</p>
128    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_instance_id()
130    }
131    ///
132    /// Appends an item to `Filters`.
133    ///
134    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
135    ///
136    /// <p>Each element in the array is a structure containing a key-value pair.</p>
137    /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
138    /// <ul>
139    /// <li>
140    /// <p><b> <code>Classification</code> </b></p>
141    /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
142    /// <li>
143    /// <p><b> <code>KBId</code> </b></p>
144    /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
145    /// <li>
146    /// <p><b> <code>Severity</code> </b></p>
147    /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
148    /// <li>
149    /// <p><b> <code>State</code> </b></p>
150    /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
151    /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
152    /// </ul>
153    pub fn filters(mut self, input: crate::types::PatchOrchestratorFilter) -> Self {
154        self.inner = self.inner.filters(input);
155        self
156    }
157    /// <p>Each element in the array is a structure containing a key-value pair.</p>
158    /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
159    /// <ul>
160    /// <li>
161    /// <p><b> <code>Classification</code> </b></p>
162    /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
163    /// <li>
164    /// <p><b> <code>KBId</code> </b></p>
165    /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
166    /// <li>
167    /// <p><b> <code>Severity</code> </b></p>
168    /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
169    /// <li>
170    /// <p><b> <code>State</code> </b></p>
171    /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
172    /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
173    /// </ul>
174    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>) -> Self {
175        self.inner = self.inner.set_filters(input);
176        self
177    }
178    /// <p>Each element in the array is a structure containing a key-value pair.</p>
179    /// <p>Supported keys for <code>DescribeInstancePatches</code>include the following:</p>
180    /// <ul>
181    /// <li>
182    /// <p><b> <code>Classification</code> </b></p>
183    /// <p>Sample values: <code>Security</code> | <code>SecurityUpdates</code></p></li>
184    /// <li>
185    /// <p><b> <code>KBId</code> </b></p>
186    /// <p>Sample values: <code>KB4480056</code> | <code>java-1.7.0-openjdk.x86_64</code></p></li>
187    /// <li>
188    /// <p><b> <code>Severity</code> </b></p>
189    /// <p>Sample values: <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
190    /// <li>
191    /// <p><b> <code>State</code> </b></p>
192    /// <p>Sample values: <code>Installed</code> | <code>InstalledOther</code> | <code>InstalledPendingReboot</code></p>
193    /// <p>For lists of all <code>State</code> values, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html">Patch compliance state values</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p></li>
194    /// </ul>
195    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>> {
196        self.inner.get_filters()
197    }
198    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
199    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.inner = self.inner.next_token(input.into());
201        self
202    }
203    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
204    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.inner = self.inner.set_next_token(input);
206        self
207    }
208    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
209    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
210        self.inner.get_next_token()
211    }
212    /// <p>The maximum number of patches to return (per page).</p>
213    pub fn max_results(mut self, input: i32) -> Self {
214        self.inner = self.inner.max_results(input);
215        self
216    }
217    /// <p>The maximum number of patches to return (per page).</p>
218    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
219        self.inner = self.inner.set_max_results(input);
220        self
221    }
222    /// <p>The maximum number of patches to return (per page).</p>
223    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
224        self.inner.get_max_results()
225    }
226}