aws_sdk_ssm/operation/describe_available_patches/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_available_patches::_describe_available_patches_output::DescribeAvailablePatchesOutputBuilder;
3
4pub use crate::operation::describe_available_patches::_describe_available_patches_input::DescribeAvailablePatchesInputBuilder;
5
6impl crate::operation::describe_available_patches::builders::DescribeAvailablePatchesInputBuilder {
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_available_patches::DescribeAvailablePatchesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_available_patches::DescribeAvailablePatchesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_available_patches();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeAvailablePatches`.
24///
25/// <p>Lists all patches eligible to be included in a patch baseline.</p><note>
26/// <p>Currently, <code>DescribeAvailablePatches</code> supports only the Amazon Linux 1, Amazon Linux 2, and Windows Server operating systems.</p>
27/// </note>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct DescribeAvailablePatchesFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::describe_available_patches::builders::DescribeAvailablePatchesInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::describe_available_patches::DescribeAvailablePatchesOutput,
37        crate::operation::describe_available_patches::DescribeAvailablePatchesError,
38    > for DescribeAvailablePatchesFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::describe_available_patches::DescribeAvailablePatchesOutput,
46            crate::operation::describe_available_patches::DescribeAvailablePatchesError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl DescribeAvailablePatchesFluentBuilder {
53    /// Creates a new `DescribeAvailablePatchesFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the DescribeAvailablePatches as a reference.
62    pub fn as_input(&self) -> &crate::operation::describe_available_patches::builders::DescribeAvailablePatchesInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::describe_available_patches::DescribeAvailablePatchesOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::describe_available_patches::DescribeAvailablePatchesError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::describe_available_patches::DescribeAvailablePatches::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::describe_available_patches::DescribeAvailablePatches::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::describe_available_patches::DescribeAvailablePatchesOutput,
99        crate::operation::describe_available_patches::DescribeAvailablePatchesError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// Create a paginator for this request
114    ///
115    /// Paginators are used by calling [`send().await`](crate::operation::describe_available_patches::paginator::DescribeAvailablePatchesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
116    pub fn into_paginator(self) -> crate::operation::describe_available_patches::paginator::DescribeAvailablePatchesPaginator {
117        crate::operation::describe_available_patches::paginator::DescribeAvailablePatchesPaginator::new(self.handle, self.inner)
118    }
119    ///
120    /// Appends an item to `Filters`.
121    ///
122    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
123    ///
124    /// <p>Each element in the array is a structure containing a key-value pair.</p>
125    /// <p><b>Windows Server</b></p>
126    /// <p>Supported keys for Windows Server managed node patches include the following:</p>
127    /// <ul>
128    /// <li>
129    /// <p><b> <code>PATCH_SET</code> </b></p>
130    /// <p>Sample values: <code>OS</code> | <code>APPLICATION</code></p></li>
131    /// <li>
132    /// <p><b> <code>PRODUCT</code> </b></p>
133    /// <p>Sample values: <code>WindowsServer2012</code> | <code>Office 2010</code> | <code>MicrosoftDefenderAntivirus</code></p></li>
134    /// <li>
135    /// <p><b> <code>PRODUCT_FAMILY</code> </b></p>
136    /// <p>Sample values: <code>Windows</code> | <code>Office</code></p></li>
137    /// <li>
138    /// <p><b> <code>MSRC_SEVERITY</code> </b></p>
139    /// <p>Sample values: <code>ServicePacks</code> | <code>Important</code> | <code>Moderate</code></p></li>
140    /// <li>
141    /// <p><b> <code>CLASSIFICATION</code> </b></p>
142    /// <p>Sample values: <code>ServicePacks</code> | <code>SecurityUpdates</code> | <code>DefinitionUpdates</code></p></li>
143    /// <li>
144    /// <p><b> <code>PATCH_ID</code> </b></p>
145    /// <p>Sample values: <code>KB123456</code> | <code>KB4516046</code></p></li>
146    /// </ul>
147    /// <p><b>Linux</b></p><important>
148    /// <p>When specifying filters for Linux patches, you must specify a key-pair for <code>PRODUCT</code>. For example, using the Command Line Interface (CLI), the following command fails:</p>
149    /// <p><code>aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615</code></p>
150    /// <p>However, the following command succeeds:</p>
151    /// <p><code>aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 Key=CVE_ID,Values=CVE-2018-3615</code></p>
152    /// </important>
153    /// <p>Supported keys for Linux managed node patches include the following:</p>
154    /// <ul>
155    /// <li>
156    /// <p><b> <code>PRODUCT</code> </b></p>
157    /// <p>Sample values: <code>AmazonLinux2018.03</code> | <code>AmazonLinux2.0</code></p></li>
158    /// <li>
159    /// <p><b> <code>NAME</code> </b></p>
160    /// <p>Sample values: <code>kernel-headers</code> | <code>samba-python</code> | <code>php</code></p></li>
161    /// <li>
162    /// <p><b> <code>SEVERITY</code> </b></p>
163    /// <p>Sample values: <code>Critical</code> | <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
164    /// <li>
165    /// <p><b> <code>EPOCH</code> </b></p>
166    /// <p>Sample values: <code>0</code> | <code>1</code></p></li>
167    /// <li>
168    /// <p><b> <code>VERSION</code> </b></p>
169    /// <p>Sample values: <code>78.6.1</code> | <code>4.10.16</code></p></li>
170    /// <li>
171    /// <p><b> <code>RELEASE</code> </b></p>
172    /// <p>Sample values: <code>9.56.amzn1</code> | <code>1.amzn2</code></p></li>
173    /// <li>
174    /// <p><b> <code>ARCH</code> </b></p>
175    /// <p>Sample values: <code>i686</code> | <code>x86_64</code></p></li>
176    /// <li>
177    /// <p><b> <code>REPOSITORY</code> </b></p>
178    /// <p>Sample values: <code>Core</code> | <code>Updates</code></p></li>
179    /// <li>
180    /// <p><b> <code>ADVISORY_ID</code> </b></p>
181    /// <p>Sample values: <code>ALAS-2018-1058</code> | <code>ALAS2-2021-1594</code></p></li>
182    /// <li>
183    /// <p><b> <code>CVE_ID</code> </b></p>
184    /// <p>Sample values: <code>CVE-2018-3615</code> | <code>CVE-2020-1472</code></p></li>
185    /// <li>
186    /// <p><b> <code>BUGZILLA_ID</code> </b></p>
187    /// <p>Sample values: <code>1463241</code></p></li>
188    /// </ul>
189    pub fn filters(mut self, input: crate::types::PatchOrchestratorFilter) -> Self {
190        self.inner = self.inner.filters(input);
191        self
192    }
193    /// <p>Each element in the array is a structure containing a key-value pair.</p>
194    /// <p><b>Windows Server</b></p>
195    /// <p>Supported keys for Windows Server managed node patches include the following:</p>
196    /// <ul>
197    /// <li>
198    /// <p><b> <code>PATCH_SET</code> </b></p>
199    /// <p>Sample values: <code>OS</code> | <code>APPLICATION</code></p></li>
200    /// <li>
201    /// <p><b> <code>PRODUCT</code> </b></p>
202    /// <p>Sample values: <code>WindowsServer2012</code> | <code>Office 2010</code> | <code>MicrosoftDefenderAntivirus</code></p></li>
203    /// <li>
204    /// <p><b> <code>PRODUCT_FAMILY</code> </b></p>
205    /// <p>Sample values: <code>Windows</code> | <code>Office</code></p></li>
206    /// <li>
207    /// <p><b> <code>MSRC_SEVERITY</code> </b></p>
208    /// <p>Sample values: <code>ServicePacks</code> | <code>Important</code> | <code>Moderate</code></p></li>
209    /// <li>
210    /// <p><b> <code>CLASSIFICATION</code> </b></p>
211    /// <p>Sample values: <code>ServicePacks</code> | <code>SecurityUpdates</code> | <code>DefinitionUpdates</code></p></li>
212    /// <li>
213    /// <p><b> <code>PATCH_ID</code> </b></p>
214    /// <p>Sample values: <code>KB123456</code> | <code>KB4516046</code></p></li>
215    /// </ul>
216    /// <p><b>Linux</b></p><important>
217    /// <p>When specifying filters for Linux patches, you must specify a key-pair for <code>PRODUCT</code>. For example, using the Command Line Interface (CLI), the following command fails:</p>
218    /// <p><code>aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615</code></p>
219    /// <p>However, the following command succeeds:</p>
220    /// <p><code>aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 Key=CVE_ID,Values=CVE-2018-3615</code></p>
221    /// </important>
222    /// <p>Supported keys for Linux managed node patches include the following:</p>
223    /// <ul>
224    /// <li>
225    /// <p><b> <code>PRODUCT</code> </b></p>
226    /// <p>Sample values: <code>AmazonLinux2018.03</code> | <code>AmazonLinux2.0</code></p></li>
227    /// <li>
228    /// <p><b> <code>NAME</code> </b></p>
229    /// <p>Sample values: <code>kernel-headers</code> | <code>samba-python</code> | <code>php</code></p></li>
230    /// <li>
231    /// <p><b> <code>SEVERITY</code> </b></p>
232    /// <p>Sample values: <code>Critical</code> | <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
233    /// <li>
234    /// <p><b> <code>EPOCH</code> </b></p>
235    /// <p>Sample values: <code>0</code> | <code>1</code></p></li>
236    /// <li>
237    /// <p><b> <code>VERSION</code> </b></p>
238    /// <p>Sample values: <code>78.6.1</code> | <code>4.10.16</code></p></li>
239    /// <li>
240    /// <p><b> <code>RELEASE</code> </b></p>
241    /// <p>Sample values: <code>9.56.amzn1</code> | <code>1.amzn2</code></p></li>
242    /// <li>
243    /// <p><b> <code>ARCH</code> </b></p>
244    /// <p>Sample values: <code>i686</code> | <code>x86_64</code></p></li>
245    /// <li>
246    /// <p><b> <code>REPOSITORY</code> </b></p>
247    /// <p>Sample values: <code>Core</code> | <code>Updates</code></p></li>
248    /// <li>
249    /// <p><b> <code>ADVISORY_ID</code> </b></p>
250    /// <p>Sample values: <code>ALAS-2018-1058</code> | <code>ALAS2-2021-1594</code></p></li>
251    /// <li>
252    /// <p><b> <code>CVE_ID</code> </b></p>
253    /// <p>Sample values: <code>CVE-2018-3615</code> | <code>CVE-2020-1472</code></p></li>
254    /// <li>
255    /// <p><b> <code>BUGZILLA_ID</code> </b></p>
256    /// <p>Sample values: <code>1463241</code></p></li>
257    /// </ul>
258    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>>) -> Self {
259        self.inner = self.inner.set_filters(input);
260        self
261    }
262    /// <p>Each element in the array is a structure containing a key-value pair.</p>
263    /// <p><b>Windows Server</b></p>
264    /// <p>Supported keys for Windows Server managed node patches include the following:</p>
265    /// <ul>
266    /// <li>
267    /// <p><b> <code>PATCH_SET</code> </b></p>
268    /// <p>Sample values: <code>OS</code> | <code>APPLICATION</code></p></li>
269    /// <li>
270    /// <p><b> <code>PRODUCT</code> </b></p>
271    /// <p>Sample values: <code>WindowsServer2012</code> | <code>Office 2010</code> | <code>MicrosoftDefenderAntivirus</code></p></li>
272    /// <li>
273    /// <p><b> <code>PRODUCT_FAMILY</code> </b></p>
274    /// <p>Sample values: <code>Windows</code> | <code>Office</code></p></li>
275    /// <li>
276    /// <p><b> <code>MSRC_SEVERITY</code> </b></p>
277    /// <p>Sample values: <code>ServicePacks</code> | <code>Important</code> | <code>Moderate</code></p></li>
278    /// <li>
279    /// <p><b> <code>CLASSIFICATION</code> </b></p>
280    /// <p>Sample values: <code>ServicePacks</code> | <code>SecurityUpdates</code> | <code>DefinitionUpdates</code></p></li>
281    /// <li>
282    /// <p><b> <code>PATCH_ID</code> </b></p>
283    /// <p>Sample values: <code>KB123456</code> | <code>KB4516046</code></p></li>
284    /// </ul>
285    /// <p><b>Linux</b></p><important>
286    /// <p>When specifying filters for Linux patches, you must specify a key-pair for <code>PRODUCT</code>. For example, using the Command Line Interface (CLI), the following command fails:</p>
287    /// <p><code>aws ssm describe-available-patches --filters Key=CVE_ID,Values=CVE-2018-3615</code></p>
288    /// <p>However, the following command succeeds:</p>
289    /// <p><code>aws ssm describe-available-patches --filters Key=PRODUCT,Values=AmazonLinux2018.03 Key=CVE_ID,Values=CVE-2018-3615</code></p>
290    /// </important>
291    /// <p>Supported keys for Linux managed node patches include the following:</p>
292    /// <ul>
293    /// <li>
294    /// <p><b> <code>PRODUCT</code> </b></p>
295    /// <p>Sample values: <code>AmazonLinux2018.03</code> | <code>AmazonLinux2.0</code></p></li>
296    /// <li>
297    /// <p><b> <code>NAME</code> </b></p>
298    /// <p>Sample values: <code>kernel-headers</code> | <code>samba-python</code> | <code>php</code></p></li>
299    /// <li>
300    /// <p><b> <code>SEVERITY</code> </b></p>
301    /// <p>Sample values: <code>Critical</code> | <code>Important</code> | <code>Medium</code> | <code>Low</code></p></li>
302    /// <li>
303    /// <p><b> <code>EPOCH</code> </b></p>
304    /// <p>Sample values: <code>0</code> | <code>1</code></p></li>
305    /// <li>
306    /// <p><b> <code>VERSION</code> </b></p>
307    /// <p>Sample values: <code>78.6.1</code> | <code>4.10.16</code></p></li>
308    /// <li>
309    /// <p><b> <code>RELEASE</code> </b></p>
310    /// <p>Sample values: <code>9.56.amzn1</code> | <code>1.amzn2</code></p></li>
311    /// <li>
312    /// <p><b> <code>ARCH</code> </b></p>
313    /// <p>Sample values: <code>i686</code> | <code>x86_64</code></p></li>
314    /// <li>
315    /// <p><b> <code>REPOSITORY</code> </b></p>
316    /// <p>Sample values: <code>Core</code> | <code>Updates</code></p></li>
317    /// <li>
318    /// <p><b> <code>ADVISORY_ID</code> </b></p>
319    /// <p>Sample values: <code>ALAS-2018-1058</code> | <code>ALAS2-2021-1594</code></p></li>
320    /// <li>
321    /// <p><b> <code>CVE_ID</code> </b></p>
322    /// <p>Sample values: <code>CVE-2018-3615</code> | <code>CVE-2020-1472</code></p></li>
323    /// <li>
324    /// <p><b> <code>BUGZILLA_ID</code> </b></p>
325    /// <p>Sample values: <code>1463241</code></p></li>
326    /// </ul>
327    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchOrchestratorFilter>> {
328        self.inner.get_filters()
329    }
330    /// <p>The maximum number of patches to return (per page).</p>
331    pub fn max_results(mut self, input: i32) -> Self {
332        self.inner = self.inner.max_results(input);
333        self
334    }
335    /// <p>The maximum number of patches to return (per page).</p>
336    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
337        self.inner = self.inner.set_max_results(input);
338        self
339    }
340    /// <p>The maximum number of patches to return (per page).</p>
341    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
342        self.inner.get_max_results()
343    }
344    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
345    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
346        self.inner = self.inner.next_token(input.into());
347        self
348    }
349    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
350    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
351        self.inner = self.inner.set_next_token(input);
352        self
353    }
354    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
355    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
356        self.inner.get_next_token()
357    }
358}