aws_sdk_ssm/operation/start_change_request_execution/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_change_request_execution::_start_change_request_execution_output::StartChangeRequestExecutionOutputBuilder;
3
4pub use crate::operation::start_change_request_execution::_start_change_request_execution_input::StartChangeRequestExecutionInputBuilder;
5
6impl crate::operation::start_change_request_execution::builders::StartChangeRequestExecutionInputBuilder {
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::start_change_request_execution::StartChangeRequestExecutionOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.start_change_request_execution();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `StartChangeRequestExecution`.
24///
25/// <important>
26/// <p>Amazon Web Services Systems Manager Change Manager will no longer be open to new customers starting November 7, 2025. If you would like to use Change Manager, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/change-manager-availability-change.html">Amazon Web Services Systems Manager Change Manager availability change</a>.</p>
27/// </important>
28/// <p>Creates a change request for Change Manager. The Automation runbooks specified in the change request run only after all required approvals for the change request have been received.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct StartChangeRequestExecutionFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::start_change_request_execution::builders::StartChangeRequestExecutionInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput,
38        crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
39    > for StartChangeRequestExecutionFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput,
47            crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl StartChangeRequestExecutionFluentBuilder {
54    /// Creates a new `StartChangeRequestExecutionFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the StartChangeRequestExecution as a reference.
63    pub fn as_input(&self) -> &crate::operation::start_change_request_execution::builders::StartChangeRequestExecutionInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::start_change_request_execution::StartChangeRequestExecution::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::start_change_request_execution::StartChangeRequestExecution::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput,
100        crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>The date and time specified in the change request to run the Automation runbooks.</p><note>
115    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
116    /// </note>
117    pub fn scheduled_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
118        self.inner = self.inner.scheduled_time(input);
119        self
120    }
121    /// <p>The date and time specified in the change request to run the Automation runbooks.</p><note>
122    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
123    /// </note>
124    pub fn set_scheduled_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
125        self.inner = self.inner.set_scheduled_time(input);
126        self
127    }
128    /// <p>The date and time specified in the change request to run the Automation runbooks.</p><note>
129    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
130    /// </note>
131    pub fn get_scheduled_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        self.inner.get_scheduled_time()
133    }
134    /// <p>The name of the change template document to run during the runbook workflow.</p>
135    pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.inner = self.inner.document_name(input.into());
137        self
138    }
139    /// <p>The name of the change template document to run during the runbook workflow.</p>
140    pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.inner = self.inner.set_document_name(input);
142        self
143    }
144    /// <p>The name of the change template document to run during the runbook workflow.</p>
145    pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
146        self.inner.get_document_name()
147    }
148    /// <p>The version of the change template document to run during the runbook workflow.</p>
149    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.inner = self.inner.document_version(input.into());
151        self
152    }
153    /// <p>The version of the change template document to run during the runbook workflow.</p>
154    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.inner = self.inner.set_document_version(input);
156        self
157    }
158    /// <p>The version of the change template document to run during the runbook workflow.</p>
159    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
160        self.inner.get_document_version()
161    }
162    ///
163    /// Adds a key-value pair to `Parameters`.
164    ///
165    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
166    ///
167    /// <p>A key-value map of parameters that match the declared parameters in the change template document.</p>
168    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
169        self.inner = self.inner.parameters(k.into(), v);
170        self
171    }
172    /// <p>A key-value map of parameters that match the declared parameters in the change template document.</p>
173    pub fn set_parameters(
174        mut self,
175        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
176    ) -> Self {
177        self.inner = self.inner.set_parameters(input);
178        self
179    }
180    /// <p>A key-value map of parameters that match the declared parameters in the change template document.</p>
181    pub fn get_parameters(
182        &self,
183    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
184        self.inner.get_parameters()
185    }
186    /// <p>The name of the change request associated with the runbook workflow to be run.</p>
187    pub fn change_request_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.inner = self.inner.change_request_name(input.into());
189        self
190    }
191    /// <p>The name of the change request associated with the runbook workflow to be run.</p>
192    pub fn set_change_request_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_change_request_name(input);
194        self
195    }
196    /// <p>The name of the change request associated with the runbook workflow to be run.</p>
197    pub fn get_change_request_name(&self) -> &::std::option::Option<::std::string::String> {
198        self.inner.get_change_request_name()
199    }
200    /// <p>The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
201    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.inner = self.inner.client_token(input.into());
203        self
204    }
205    /// <p>The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
206    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.inner = self.inner.set_client_token(input);
208        self
209    }
210    /// <p>The user-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.</p>
211    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
212        self.inner.get_client_token()
213    }
214    /// <p>Indicates whether the change request can be approved automatically without the need for manual approvals.</p>
215    /// <p>If <code>AutoApprovable</code> is enabled in a change template, then setting <code>AutoApprove</code> to <code>true</code> in <code>StartChangeRequestExecution</code> creates a change request that bypasses approver review.</p><note>
216    /// <p>Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is <code>CLOSED</code>, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again <code>OPEN</code>.</p>
217    /// </note>
218    pub fn auto_approve(mut self, input: bool) -> Self {
219        self.inner = self.inner.auto_approve(input);
220        self
221    }
222    /// <p>Indicates whether the change request can be approved automatically without the need for manual approvals.</p>
223    /// <p>If <code>AutoApprovable</code> is enabled in a change template, then setting <code>AutoApprove</code> to <code>true</code> in <code>StartChangeRequestExecution</code> creates a change request that bypasses approver review.</p><note>
224    /// <p>Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is <code>CLOSED</code>, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again <code>OPEN</code>.</p>
225    /// </note>
226    pub fn set_auto_approve(mut self, input: ::std::option::Option<bool>) -> Self {
227        self.inner = self.inner.set_auto_approve(input);
228        self
229    }
230    /// <p>Indicates whether the change request can be approved automatically without the need for manual approvals.</p>
231    /// <p>If <code>AutoApprovable</code> is enabled in a change template, then setting <code>AutoApprove</code> to <code>true</code> in <code>StartChangeRequestExecution</code> creates a change request that bypasses approver review.</p><note>
232    /// <p>Change Calendar restrictions are not bypassed in this scenario. If the state of an associated calendar is <code>CLOSED</code>, change freeze approvers must still grant permission for this change request to run. If they don't, the change won't be processed until the calendar state is again <code>OPEN</code>.</p>
233    /// </note>
234    pub fn get_auto_approve(&self) -> &::std::option::Option<bool> {
235        self.inner.get_auto_approve()
236    }
237    ///
238    /// Appends an item to `Runbooks`.
239    ///
240    /// To override the contents of this collection use [`set_runbooks`](Self::set_runbooks).
241    ///
242    /// <p>Information about the Automation runbooks that are run during the runbook workflow.</p><note>
243    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
244    /// </note>
245    pub fn runbooks(mut self, input: crate::types::Runbook) -> Self {
246        self.inner = self.inner.runbooks(input);
247        self
248    }
249    /// <p>Information about the Automation runbooks that are run during the runbook workflow.</p><note>
250    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
251    /// </note>
252    pub fn set_runbooks(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Runbook>>) -> Self {
253        self.inner = self.inner.set_runbooks(input);
254        self
255    }
256    /// <p>Information about the Automation runbooks that are run during the runbook workflow.</p><note>
257    /// <p>The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.</p>
258    /// </note>
259    pub fn get_runbooks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Runbook>> {
260        self.inner.get_runbooks()
261    }
262    ///
263    /// Appends an item to `Tags`.
264    ///
265    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
266    ///
267    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
268    /// <ul>
269    /// <li>
270    /// <p><code>Key=Environment,Value=Production</code></p></li>
271    /// <li>
272    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
273    /// </ul><note>
274    /// <p>The <code>Array Members</code> maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the <code>StartChangeRequestExecution</code> action, you can specify a maximum of 5 tags. You can, however, use the <code>AddTagsToResource</code> action to add up to a total of 50 tags to an existing change request configuration.</p>
275    /// </note>
276    pub fn tags(mut self, input: crate::types::Tag) -> Self {
277        self.inner = self.inner.tags(input);
278        self
279    }
280    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
281    /// <ul>
282    /// <li>
283    /// <p><code>Key=Environment,Value=Production</code></p></li>
284    /// <li>
285    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
286    /// </ul><note>
287    /// <p>The <code>Array Members</code> maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the <code>StartChangeRequestExecution</code> action, you can specify a maximum of 5 tags. You can, however, use the <code>AddTagsToResource</code> action to add up to a total of 50 tags to an existing change request configuration.</p>
288    /// </note>
289    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
290        self.inner = self.inner.set_tags(input);
291        self
292    }
293    /// <p>Optional metadata that you assign to a resource. You can specify a maximum of five tags for a change request. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a change request to identify an environment or target Amazon Web Services Region. In this case, you could specify the following key-value pairs:</p>
294    /// <ul>
295    /// <li>
296    /// <p><code>Key=Environment,Value=Production</code></p></li>
297    /// <li>
298    /// <p><code>Key=Region,Value=us-east-2</code></p></li>
299    /// </ul><note>
300    /// <p>The <code>Array Members</code> maximum value is reported as 1000. This number includes capacity reserved for internal operations. When calling the <code>StartChangeRequestExecution</code> action, you can specify a maximum of 5 tags. You can, however, use the <code>AddTagsToResource</code> action to add up to a total of 50 tags to an existing change request configuration.</p>
301    /// </note>
302    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
303        self.inner.get_tags()
304    }
305    /// <p>The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.</p>
306    pub fn scheduled_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
307        self.inner = self.inner.scheduled_end_time(input);
308        self
309    }
310    /// <p>The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.</p>
311    pub fn set_scheduled_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
312        self.inner = self.inner.set_scheduled_end_time(input);
313        self
314    }
315    /// <p>The time that the requester expects the runbook workflow related to the change request to complete. The time is an estimate only that the requester provides for reviewers.</p>
316    pub fn get_scheduled_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
317        self.inner.get_scheduled_end_time()
318    }
319    /// <p>User-provided details about the change. If no details are provided, content specified in the <b>Template information</b> section of the associated change template is added.</p>
320    pub fn change_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
321        self.inner = self.inner.change_details(input.into());
322        self
323    }
324    /// <p>User-provided details about the change. If no details are provided, content specified in the <b>Template information</b> section of the associated change template is added.</p>
325    pub fn set_change_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326        self.inner = self.inner.set_change_details(input);
327        self
328    }
329    /// <p>User-provided details about the change. If no details are provided, content specified in the <b>Template information</b> section of the associated change template is added.</p>
330    pub fn get_change_details(&self) -> &::std::option::Option<::std::string::String> {
331        self.inner.get_change_details()
332    }
333}