aws_sdk_swf/operation/start_workflow_execution/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_workflow_execution::_start_workflow_execution_output::StartWorkflowExecutionOutputBuilder;
3
4pub use crate::operation::start_workflow_execution::_start_workflow_execution_input::StartWorkflowExecutionInputBuilder;
5
6impl crate::operation::start_workflow_execution::builders::StartWorkflowExecutionInputBuilder {
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_workflow_execution::StartWorkflowExecutionOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::start_workflow_execution::StartWorkflowExecutionError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.start_workflow_execution();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `StartWorkflowExecution`.
24///
25/// <p>Starts an execution of the workflow type in the specified domain using the provided <code>workflowId</code> and input data.</p>
26/// <p>This action returns the newly started workflow execution.</p>
27/// <p><b>Access Control</b></p>
28/// <p>You can use IAM policies to control this action's access to Amazon SWF resources as follows:</p>
29/// <ul>
30/// <li>
31/// <p>Use a <code>Resource</code> element with the domain name to limit the action to only specified domains.</p></li>
32/// <li>
33/// <p>Use an <code>Action</code> element to allow or deny permission to call this action.</p></li>
34/// <li>
35/// <p>Constrain the following parameters by using a <code>Condition</code> element with the appropriate keys.</p>
36/// <ul>
37/// <li>
38/// <p><code>tagList.member.0</code>: The key is <code>swf:tagList.member.0</code>.</p></li>
39/// <li>
40/// <p><code>tagList.member.1</code>: The key is <code>swf:tagList.member.1</code>.</p></li>
41/// <li>
42/// <p><code>tagList.member.2</code>: The key is <code>swf:tagList.member.2</code>.</p></li>
43/// <li>
44/// <p><code>tagList.member.3</code>: The key is <code>swf:tagList.member.3</code>.</p></li>
45/// <li>
46/// <p><code>tagList.member.4</code>: The key is <code>swf:tagList.member.4</code>.</p></li>
47/// <li>
48/// <p><code>taskList</code>: String constraint. The key is <code>swf:taskList.name</code>.</p></li>
49/// <li>
50/// <p><code>workflowType.name</code>: String constraint. The key is <code>swf:workflowType.name</code>.</p></li>
51/// <li>
52/// <p><code>workflowType.version</code>: String constraint. The key is <code>swf:workflowType.version</code>.</p></li>
53/// </ul></li>
54/// </ul>
55/// <p>If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's <code>cause</code> parameter is set to <code>OPERATION_NOT_PERMITTED</code>. For details and example IAM policies, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html">Using IAM to Manage Access to Amazon SWF Workflows</a> in the <i>Amazon SWF Developer Guide</i>.</p>
56#[derive(::std::clone::Clone, ::std::fmt::Debug)]
57pub struct StartWorkflowExecutionFluentBuilder {
58 handle: ::std::sync::Arc<crate::client::Handle>,
59 inner: crate::operation::start_workflow_execution::builders::StartWorkflowExecutionInputBuilder,
60 config_override: ::std::option::Option<crate::config::Builder>,
61}
62impl
63 crate::client::customize::internal::CustomizableSend<
64 crate::operation::start_workflow_execution::StartWorkflowExecutionOutput,
65 crate::operation::start_workflow_execution::StartWorkflowExecutionError,
66 > for StartWorkflowExecutionFluentBuilder
67{
68 fn send(
69 self,
70 config_override: crate::config::Builder,
71 ) -> crate::client::customize::internal::BoxFuture<
72 crate::client::customize::internal::SendResult<
73 crate::operation::start_workflow_execution::StartWorkflowExecutionOutput,
74 crate::operation::start_workflow_execution::StartWorkflowExecutionError,
75 >,
76 > {
77 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
78 }
79}
80impl StartWorkflowExecutionFluentBuilder {
81 /// Creates a new `StartWorkflowExecutionFluentBuilder`.
82 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
83 Self {
84 handle,
85 inner: ::std::default::Default::default(),
86 config_override: ::std::option::Option::None,
87 }
88 }
89 /// Access the StartWorkflowExecution as a reference.
90 pub fn as_input(&self) -> &crate::operation::start_workflow_execution::builders::StartWorkflowExecutionInputBuilder {
91 &self.inner
92 }
93 /// Sends the request and returns the response.
94 ///
95 /// If an error occurs, an `SdkError` will be returned with additional details that
96 /// can be matched against.
97 ///
98 /// By default, any retryable failures will be retried twice. Retry behavior
99 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
100 /// set when configuring the client.
101 pub async fn send(
102 self,
103 ) -> ::std::result::Result<
104 crate::operation::start_workflow_execution::StartWorkflowExecutionOutput,
105 ::aws_smithy_runtime_api::client::result::SdkError<
106 crate::operation::start_workflow_execution::StartWorkflowExecutionError,
107 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
108 >,
109 > {
110 let input = self
111 .inner
112 .build()
113 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
114 let runtime_plugins = crate::operation::start_workflow_execution::StartWorkflowExecution::operation_runtime_plugins(
115 self.handle.runtime_plugins.clone(),
116 &self.handle.conf,
117 self.config_override,
118 );
119 crate::operation::start_workflow_execution::StartWorkflowExecution::orchestrate(&runtime_plugins, input).await
120 }
121
122 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
123 pub fn customize(
124 self,
125 ) -> crate::client::customize::CustomizableOperation<
126 crate::operation::start_workflow_execution::StartWorkflowExecutionOutput,
127 crate::operation::start_workflow_execution::StartWorkflowExecutionError,
128 Self,
129 > {
130 crate::client::customize::CustomizableOperation::new(self)
131 }
132 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
133 self.set_config_override(::std::option::Option::Some(config_override.into()));
134 self
135 }
136
137 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
138 self.config_override = config_override;
139 self
140 }
141 /// <p>The name of the domain in which the workflow execution is created.</p>
142 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
143 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.inner = self.inner.domain(input.into());
145 self
146 }
147 /// <p>The name of the domain in which the workflow execution is created.</p>
148 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
149 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.inner = self.inner.set_domain(input);
151 self
152 }
153 /// <p>The name of the domain in which the workflow execution is created.</p>
154 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
155 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
156 self.inner.get_domain()
157 }
158 /// <p>The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a <i>restart</i> of a previous execution. You cannot have two open workflow executions with the same <code>workflowId</code> at the same time within the same domain.</p>
159 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
160 pub fn workflow_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.workflow_id(input.into());
162 self
163 }
164 /// <p>The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a <i>restart</i> of a previous execution. You cannot have two open workflow executions with the same <code>workflowId</code> at the same time within the same domain.</p>
165 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
166 pub fn set_workflow_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.inner = self.inner.set_workflow_id(input);
168 self
169 }
170 /// <p>The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a <i>restart</i> of a previous execution. You cannot have two open workflow executions with the same <code>workflowId</code> at the same time within the same domain.</p>
171 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
172 pub fn get_workflow_id(&self) -> &::std::option::Option<::std::string::String> {
173 self.inner.get_workflow_id()
174 }
175 /// <p>The type of the workflow to start.</p>
176 pub fn workflow_type(mut self, input: crate::types::WorkflowType) -> Self {
177 self.inner = self.inner.workflow_type(input);
178 self
179 }
180 /// <p>The type of the workflow to start.</p>
181 pub fn set_workflow_type(mut self, input: ::std::option::Option<crate::types::WorkflowType>) -> Self {
182 self.inner = self.inner.set_workflow_type(input);
183 self
184 }
185 /// <p>The type of the workflow to start.</p>
186 pub fn get_workflow_type(&self) -> &::std::option::Option<crate::types::WorkflowType> {
187 self.inner.get_workflow_type()
188 }
189 /// <p>The task list to use for the decision tasks generated for this workflow execution. This overrides the <code>defaultTaskList</code> specified when registering the workflow type.</p><note>
190 /// <p>A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault is returned.</p>
191 /// </note>
192 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
193 pub fn task_list(mut self, input: crate::types::TaskList) -> Self {
194 self.inner = self.inner.task_list(input);
195 self
196 }
197 /// <p>The task list to use for the decision tasks generated for this workflow execution. This overrides the <code>defaultTaskList</code> specified when registering the workflow type.</p><note>
198 /// <p>A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault is returned.</p>
199 /// </note>
200 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
201 pub fn set_task_list(mut self, input: ::std::option::Option<crate::types::TaskList>) -> Self {
202 self.inner = self.inner.set_task_list(input);
203 self
204 }
205 /// <p>The task list to use for the decision tasks generated for this workflow execution. This overrides the <code>defaultTaskList</code> specified when registering the workflow type.</p><note>
206 /// <p>A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault is returned.</p>
207 /// </note>
208 /// <p>The specified string must not contain a <code>:</code> (colon), <code>/</code> (slash), <code>|</code> (vertical bar), or any control characters (<code>\u0000-\u001f</code> | <code>\u007f-\u009f</code>). Also, it must <i>not</i> be the literal string <code>arn</code>.</p>
209 pub fn get_task_list(&self) -> &::std::option::Option<crate::types::TaskList> {
210 self.inner.get_task_list()
211 }
212 /// <p>The task priority to use for this workflow execution. This overrides any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type is used. Valid values are integers that range from Java's <code>Integer.MIN_VALUE</code> (-2147483648) to <code>Integer.MAX_VALUE</code> (2147483647). Higher numbers indicate higher priority.</p>
213 /// <p>For more information about setting task priority, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html">Setting Task Priority</a> in the <i>Amazon SWF Developer Guide</i>.</p>
214 pub fn task_priority(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.inner = self.inner.task_priority(input.into());
216 self
217 }
218 /// <p>The task priority to use for this workflow execution. This overrides any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type is used. Valid values are integers that range from Java's <code>Integer.MIN_VALUE</code> (-2147483648) to <code>Integer.MAX_VALUE</code> (2147483647). Higher numbers indicate higher priority.</p>
219 /// <p>For more information about setting task priority, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html">Setting Task Priority</a> in the <i>Amazon SWF Developer Guide</i>.</p>
220 pub fn set_task_priority(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_task_priority(input);
222 self
223 }
224 /// <p>The task priority to use for this workflow execution. This overrides any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type is used. Valid values are integers that range from Java's <code>Integer.MIN_VALUE</code> (-2147483648) to <code>Integer.MAX_VALUE</code> (2147483647). Higher numbers indicate higher priority.</p>
225 /// <p>For more information about setting task priority, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/programming-priority.html">Setting Task Priority</a> in the <i>Amazon SWF Developer Guide</i>.</p>
226 pub fn get_task_priority(&self) -> &::std::option::Option<::std::string::String> {
227 self.inner.get_task_priority()
228 }
229 /// <p>The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This <code>input</code> is made available to the new workflow execution in the <code>WorkflowExecutionStarted</code> history event.</p>
230 pub fn input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231 self.inner = self.inner.input(input.into());
232 self
233 }
234 /// <p>The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This <code>input</code> is made available to the new workflow execution in the <code>WorkflowExecutionStarted</code> history event.</p>
235 pub fn set_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236 self.inner = self.inner.set_input(input);
237 self
238 }
239 /// <p>The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This <code>input</code> is made available to the new workflow execution in the <code>WorkflowExecutionStarted</code> history event.</p>
240 pub fn get_input(&self) -> &::std::option::Option<::std::string::String> {
241 self.inner.get_input()
242 }
243 /// <p>The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.</p>
244 /// <p>The duration is specified in seconds; an integer greater than or equal to <code>0</code>. Exceeding this limit causes the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.</p><note>
245 /// <p>An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.</p>
246 /// </note>
247 pub fn execution_start_to_close_timeout(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.inner = self.inner.execution_start_to_close_timeout(input.into());
249 self
250 }
251 /// <p>The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.</p>
252 /// <p>The duration is specified in seconds; an integer greater than or equal to <code>0</code>. Exceeding this limit causes the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.</p><note>
253 /// <p>An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.</p>
254 /// </note>
255 pub fn set_execution_start_to_close_timeout(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256 self.inner = self.inner.set_execution_start_to_close_timeout(input);
257 self
258 }
259 /// <p>The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type.</p>
260 /// <p>The duration is specified in seconds; an integer greater than or equal to <code>0</code>. Exceeding this limit causes the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.</p><note>
261 /// <p>An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.</p>
262 /// </note>
263 pub fn get_execution_start_to_close_timeout(&self) -> &::std::option::Option<::std::string::String> {
264 self.inner.get_execution_start_to_close_timeout()
265 }
266 ///
267 /// Appends an item to `tagList`.
268 ///
269 /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
270 ///
271 /// <p>The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>.</p>
272 pub fn tag_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.inner = self.inner.tag_list(input.into());
274 self
275 }
276 /// <p>The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>.</p>
277 pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
278 self.inner = self.inner.set_tag_list(input);
279 self
280 }
281 /// <p>The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling <code>ListOpenWorkflowExecutions</code> or <code>ListClosedWorkflowExecutions</code> and specifying a <code>TagFilter</code>.</p>
282 pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
283 self.inner.get_tag_list()
284 }
285 /// <p>Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
286 /// <p>The duration is specified in seconds, an integer greater than or equal to <code>0</code>. You can use <code>NONE</code> to specify unlimited duration.</p><note>
287 /// <p>A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault is returned.</p>
288 /// </note>
289 pub fn task_start_to_close_timeout(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.inner = self.inner.task_start_to_close_timeout(input.into());
291 self
292 }
293 /// <p>Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
294 /// <p>The duration is specified in seconds, an integer greater than or equal to <code>0</code>. You can use <code>NONE</code> to specify unlimited duration.</p><note>
295 /// <p>A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault is returned.</p>
296 /// </note>
297 pub fn set_task_start_to_close_timeout(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
298 self.inner = self.inner.set_task_start_to_close_timeout(input);
299 self
300 }
301 /// <p>Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the <code>defaultTaskStartToCloseTimout</code> specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
302 /// <p>The duration is specified in seconds, an integer greater than or equal to <code>0</code>. You can use <code>NONE</code> to specify unlimited duration.</p><note>
303 /// <p>A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault is returned.</p>
304 /// </note>
305 pub fn get_task_start_to_close_timeout(&self) -> &::std::option::Option<::std::string::String> {
306 self.inner.get_task_start_to_close_timeout()
307 }
308 /// <p>If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
309 /// <p>The supported child policies are:</p>
310 /// <ul>
311 /// <li>
312 /// <p><code>TERMINATE</code> – The child executions are terminated.</p></li>
313 /// <li>
314 /// <p><code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p></li>
315 /// <li>
316 /// <p><code>ABANDON</code> – No action is taken. The child executions continue to run.</p></li>
317 /// </ul><note>
318 /// <p>A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.</p>
319 /// </note>
320 pub fn child_policy(mut self, input: crate::types::ChildPolicy) -> Self {
321 self.inner = self.inner.child_policy(input);
322 self
323 }
324 /// <p>If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
325 /// <p>The supported child policies are:</p>
326 /// <ul>
327 /// <li>
328 /// <p><code>TERMINATE</code> – The child executions are terminated.</p></li>
329 /// <li>
330 /// <p><code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p></li>
331 /// <li>
332 /// <p><code>ABANDON</code> – No action is taken. The child executions continue to run.</p></li>
333 /// </ul><note>
334 /// <p>A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.</p>
335 /// </note>
336 pub fn set_child_policy(mut self, input: ::std::option::Option<crate::types::ChildPolicy>) -> Self {
337 self.inner = self.inner.set_child_policy(input);
338 self
339 }
340 /// <p>If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the <code>TerminateWorkflowExecution</code> action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using <code>RegisterWorkflowType</code>.</p>
341 /// <p>The supported child policies are:</p>
342 /// <ul>
343 /// <li>
344 /// <p><code>TERMINATE</code> – The child executions are terminated.</p></li>
345 /// <li>
346 /// <p><code>REQUEST_CANCEL</code> – A request to cancel is attempted for each child execution by recording a <code>WorkflowExecutionCancelRequested</code> event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.</p></li>
347 /// <li>
348 /// <p><code>ABANDON</code> – No action is taken. The child executions continue to run.</p></li>
349 /// </ul><note>
350 /// <p>A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.</p>
351 /// </note>
352 pub fn get_child_policy(&self) -> &::std::option::Option<crate::types::ChildPolicy> {
353 self.inner.get_child_policy()
354 }
355 /// <p>The IAM role to attach to this workflow execution.</p><note>
356 /// <p>Executions of this workflow type need IAM roles to invoke Lambda functions. If you don't attach an IAM role, any attempt to schedule a Lambda task fails. This results in a <code>ScheduleLambdaFunctionFailed</code> history event. For more information, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html">https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html</a> in the <i>Amazon SWF Developer Guide</i>.</p>
357 /// </note>
358 pub fn lambda_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
359 self.inner = self.inner.lambda_role(input.into());
360 self
361 }
362 /// <p>The IAM role to attach to this workflow execution.</p><note>
363 /// <p>Executions of this workflow type need IAM roles to invoke Lambda functions. If you don't attach an IAM role, any attempt to schedule a Lambda task fails. This results in a <code>ScheduleLambdaFunctionFailed</code> history event. For more information, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html">https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html</a> in the <i>Amazon SWF Developer Guide</i>.</p>
364 /// </note>
365 pub fn set_lambda_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
366 self.inner = self.inner.set_lambda_role(input);
367 self
368 }
369 /// <p>The IAM role to attach to this workflow execution.</p><note>
370 /// <p>Executions of this workflow type need IAM roles to invoke Lambda functions. If you don't attach an IAM role, any attempt to schedule a Lambda task fails. This results in a <code>ScheduleLambdaFunctionFailed</code> history event. For more information, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html">https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html</a> in the <i>Amazon SWF Developer Guide</i>.</p>
371 /// </note>
372 pub fn get_lambda_role(&self) -> &::std::option::Option<::std::string::String> {
373 self.inner.get_lambda_role()
374 }
375}