aws_sdk_ssm/operation/update_patch_baseline/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_patch_baseline::_update_patch_baseline_output::UpdatePatchBaselineOutputBuilder;
3
4pub use crate::operation::update_patch_baseline::_update_patch_baseline_input::UpdatePatchBaselineInputBuilder;
5
6impl crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder {
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::update_patch_baseline::UpdatePatchBaselineOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_patch_baseline::UpdatePatchBaselineError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_patch_baseline();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdatePatchBaseline`.
24///
25/// <p>Modifies an existing patch baseline. Fields not specified in the request are left unchanged.</p><note>
26/// <p>For information about valid key-value pairs in <code>PatchFilters</code> for each supported operating system type, see <code>PatchFilter</code>.</p>
27/// </note>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdatePatchBaselineFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::update_patch_baseline::UpdatePatchBaselineOutput,
37 crate::operation::update_patch_baseline::UpdatePatchBaselineError,
38 > for UpdatePatchBaselineFluentBuilder
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::update_patch_baseline::UpdatePatchBaselineOutput,
46 crate::operation::update_patch_baseline::UpdatePatchBaselineError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl UpdatePatchBaselineFluentBuilder {
53 /// Creates a new `UpdatePatchBaselineFluentBuilder`.
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 UpdatePatchBaseline as a reference.
62 pub fn as_input(&self) -> &crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder {
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::update_patch_baseline::UpdatePatchBaselineOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::update_patch_baseline::UpdatePatchBaselineError,
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::update_patch_baseline::UpdatePatchBaseline::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::update_patch_baseline::UpdatePatchBaseline::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::update_patch_baseline::UpdatePatchBaselineOutput,
99 crate::operation::update_patch_baseline::UpdatePatchBaselineError,
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 /// <p>The ID of the patch baseline to update.</p>
114 pub fn baseline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.baseline_id(input.into());
116 self
117 }
118 /// <p>The ID of the patch baseline to update.</p>
119 pub fn set_baseline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_baseline_id(input);
121 self
122 }
123 /// <p>The ID of the patch baseline to update.</p>
124 pub fn get_baseline_id(&self) -> &::std::option::Option<::std::string::String> {
125 self.inner.get_baseline_id()
126 }
127 /// <p>The name of the patch baseline.</p>
128 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.name(input.into());
130 self
131 }
132 /// <p>The name of the patch baseline.</p>
133 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_name(input);
135 self
136 }
137 /// <p>The name of the patch baseline.</p>
138 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
139 self.inner.get_name()
140 }
141 /// <p>A set of global filters used to include patches in the baseline.</p><important>
142 /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
143 /// </important>
144 pub fn global_filters(mut self, input: crate::types::PatchFilterGroup) -> Self {
145 self.inner = self.inner.global_filters(input);
146 self
147 }
148 /// <p>A set of global filters used to include patches in the baseline.</p><important>
149 /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
150 /// </important>
151 pub fn set_global_filters(mut self, input: ::std::option::Option<crate::types::PatchFilterGroup>) -> Self {
152 self.inner = self.inner.set_global_filters(input);
153 self
154 }
155 /// <p>A set of global filters used to include patches in the baseline.</p><important>
156 /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
157 /// </important>
158 pub fn get_global_filters(&self) -> &::std::option::Option<crate::types::PatchFilterGroup> {
159 self.inner.get_global_filters()
160 }
161 /// <p>A set of rules used to include patches in the baseline.</p>
162 pub fn approval_rules(mut self, input: crate::types::PatchRuleGroup) -> Self {
163 self.inner = self.inner.approval_rules(input);
164 self
165 }
166 /// <p>A set of rules used to include patches in the baseline.</p>
167 pub fn set_approval_rules(mut self, input: ::std::option::Option<crate::types::PatchRuleGroup>) -> Self {
168 self.inner = self.inner.set_approval_rules(input);
169 self
170 }
171 /// <p>A set of rules used to include patches in the baseline.</p>
172 pub fn get_approval_rules(&self) -> &::std::option::Option<crate::types::PatchRuleGroup> {
173 self.inner.get_approval_rules()
174 }
175 ///
176 /// Appends an item to `ApprovedPatches`.
177 ///
178 /// To override the contents of this collection use [`set_approved_patches`](Self::set_approved_patches).
179 ///
180 /// <p>A list of explicitly approved patches for the baseline.</p>
181 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
182 pub fn approved_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.inner = self.inner.approved_patches(input.into());
184 self
185 }
186 /// <p>A list of explicitly approved patches for the baseline.</p>
187 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
188 pub fn set_approved_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
189 self.inner = self.inner.set_approved_patches(input);
190 self
191 }
192 /// <p>A list of explicitly approved patches for the baseline.</p>
193 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
194 pub fn get_approved_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
195 self.inner.get_approved_patches()
196 }
197 /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
198 pub fn approved_patches_compliance_level(mut self, input: crate::types::PatchComplianceLevel) -> Self {
199 self.inner = self.inner.approved_patches_compliance_level(input);
200 self
201 }
202 /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
203 pub fn set_approved_patches_compliance_level(mut self, input: ::std::option::Option<crate::types::PatchComplianceLevel>) -> Self {
204 self.inner = self.inner.set_approved_patches_compliance_level(input);
205 self
206 }
207 /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
208 pub fn get_approved_patches_compliance_level(&self) -> &::std::option::Option<crate::types::PatchComplianceLevel> {
209 self.inner.get_approved_patches_compliance_level()
210 }
211 /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
212 pub fn approved_patches_enable_non_security(mut self, input: bool) -> Self {
213 self.inner = self.inner.approved_patches_enable_non_security(input);
214 self
215 }
216 /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
217 pub fn set_approved_patches_enable_non_security(mut self, input: ::std::option::Option<bool>) -> Self {
218 self.inner = self.inner.set_approved_patches_enable_non_security(input);
219 self
220 }
221 /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
222 pub fn get_approved_patches_enable_non_security(&self) -> &::std::option::Option<bool> {
223 self.inner.get_approved_patches_enable_non_security()
224 }
225 ///
226 /// Appends an item to `RejectedPatches`.
227 ///
228 /// To override the contents of this collection use [`set_rejected_patches`](Self::set_rejected_patches).
229 ///
230 /// <p>A list of explicitly rejected patches for the baseline.</p>
231 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
232 pub fn rejected_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233 self.inner = self.inner.rejected_patches(input.into());
234 self
235 }
236 /// <p>A list of explicitly rejected patches for the baseline.</p>
237 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
238 pub fn set_rejected_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
239 self.inner = self.inner.set_rejected_patches(input);
240 self
241 }
242 /// <p>A list of explicitly rejected patches for the baseline.</p>
243 /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
244 pub fn get_rejected_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
245 self.inner.get_rejected_patches()
246 }
247 /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
248 /// <dl>
249 /// <dt>
250 /// ALLOW_AS_DEPENDENCY
251 /// </dt>
252 /// <dd>
253 /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
254 /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
255 /// </dd>
256 /// <dt>
257 /// BLOCK
258 /// </dt>
259 /// <dd>
260 /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
261 /// <p>State value assignment for patch compliance:</p>
262 /// <ul>
263 /// <li>
264 /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
265 /// <li>
266 /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
267 /// </ul>
268 /// </dd>
269 /// </dl>
270 pub fn rejected_patches_action(mut self, input: crate::types::PatchAction) -> Self {
271 self.inner = self.inner.rejected_patches_action(input);
272 self
273 }
274 /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
275 /// <dl>
276 /// <dt>
277 /// ALLOW_AS_DEPENDENCY
278 /// </dt>
279 /// <dd>
280 /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
281 /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
282 /// </dd>
283 /// <dt>
284 /// BLOCK
285 /// </dt>
286 /// <dd>
287 /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
288 /// <p>State value assignment for patch compliance:</p>
289 /// <ul>
290 /// <li>
291 /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
292 /// <li>
293 /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
294 /// </ul>
295 /// </dd>
296 /// </dl>
297 pub fn set_rejected_patches_action(mut self, input: ::std::option::Option<crate::types::PatchAction>) -> Self {
298 self.inner = self.inner.set_rejected_patches_action(input);
299 self
300 }
301 /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
302 /// <dl>
303 /// <dt>
304 /// ALLOW_AS_DEPENDENCY
305 /// </dt>
306 /// <dd>
307 /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
308 /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
309 /// </dd>
310 /// <dt>
311 /// BLOCK
312 /// </dt>
313 /// <dd>
314 /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
315 /// <p>State value assignment for patch compliance:</p>
316 /// <ul>
317 /// <li>
318 /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
319 /// <li>
320 /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
321 /// </ul>
322 /// </dd>
323 /// </dl>
324 pub fn get_rejected_patches_action(&self) -> &::std::option::Option<crate::types::PatchAction> {
325 self.inner.get_rejected_patches_action()
326 }
327 /// <p>A description of the patch baseline.</p>
328 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
329 self.inner = self.inner.description(input.into());
330 self
331 }
332 /// <p>A description of the patch baseline.</p>
333 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
334 self.inner = self.inner.set_description(input);
335 self
336 }
337 /// <p>A description of the patch baseline.</p>
338 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
339 self.inner.get_description()
340 }
341 ///
342 /// Appends an item to `Sources`.
343 ///
344 /// To override the contents of this collection use [`set_sources`](Self::set_sources).
345 ///
346 /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
347 pub fn sources(mut self, input: crate::types::PatchSource) -> Self {
348 self.inner = self.inner.sources(input);
349 self
350 }
351 /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
352 pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>) -> Self {
353 self.inner = self.inner.set_sources(input);
354 self
355 }
356 /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
357 pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchSource>> {
358 self.inner.get_sources()
359 }
360 /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
361 /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
362 /// <p>Supported for Windows Server managed nodes only.</p>
363 pub fn available_security_updates_compliance_status(mut self, input: crate::types::PatchComplianceStatus) -> Self {
364 self.inner = self.inner.available_security_updates_compliance_status(input);
365 self
366 }
367 /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
368 /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
369 /// <p>Supported for Windows Server managed nodes only.</p>
370 pub fn set_available_security_updates_compliance_status(mut self, input: ::std::option::Option<crate::types::PatchComplianceStatus>) -> Self {
371 self.inner = self.inner.set_available_security_updates_compliance_status(input);
372 self
373 }
374 /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
375 /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
376 /// <p>Supported for Windows Server managed nodes only.</p>
377 pub fn get_available_security_updates_compliance_status(&self) -> &::std::option::Option<crate::types::PatchComplianceStatus> {
378 self.inner.get_available_security_updates_compliance_status()
379 }
380 /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
381 pub fn replace(mut self, input: bool) -> Self {
382 self.inner = self.inner.replace(input);
383 self
384 }
385 /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
386 pub fn set_replace(mut self, input: ::std::option::Option<bool>) -> Self {
387 self.inner = self.inner.set_replace(input);
388 self
389 }
390 /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
391 pub fn get_replace(&self) -> &::std::option::Option<bool> {
392 self.inner.get_replace()
393 }
394}