rusoto_stepfunctions/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl StepFunctionsClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "states", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.0".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53/// <p>Contains details about an activity that failed during an execution.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct ActivityFailedEventDetails {
57    /// <p>A more detailed explanation of the cause of the failure.</p>
58    #[serde(rename = "cause")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub cause: Option<String>,
61    /// <p>The error code of the failure.</p>
62    #[serde(rename = "error")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub error: Option<String>,
65}
66
67/// <p>Contains details about an activity.</p>
68#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
69#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
70pub struct ActivityListItem {
71    /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
72    #[serde(rename = "activityArn")]
73    pub activity_arn: String,
74    /// <p>The date the activity is created.</p>
75    #[serde(rename = "creationDate")]
76    pub creation_date: f64,
77    /// <p>The name of the activity.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
78    #[serde(rename = "name")]
79    pub name: String,
80}
81
82/// <p>Contains details about an activity schedule failure that occurred during an execution.</p>
83#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
84#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
85pub struct ActivityScheduleFailedEventDetails {
86    /// <p>A more detailed explanation of the cause of the failure.</p>
87    #[serde(rename = "cause")]
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub cause: Option<String>,
90    /// <p>The error code of the failure.</p>
91    #[serde(rename = "error")]
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub error: Option<String>,
94}
95
96/// <p>Contains details about an activity scheduled during an execution.</p>
97#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
98#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
99pub struct ActivityScheduledEventDetails {
100    /// <p>The maximum allowed duration between two heartbeats for the activity task.</p>
101    #[serde(rename = "heartbeatInSeconds")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub heartbeat_in_seconds: Option<i64>,
104    /// <p>The JSON data input to the activity task.</p>
105    #[serde(rename = "input")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub input: Option<String>,
108    /// <p>The Amazon Resource Name (ARN) of the scheduled activity.</p>
109    #[serde(rename = "resource")]
110    pub resource: String,
111    /// <p>The maximum allowed duration of the activity task.</p>
112    #[serde(rename = "timeoutInSeconds")]
113    #[serde(skip_serializing_if = "Option::is_none")]
114    pub timeout_in_seconds: Option<i64>,
115}
116
117/// <p>Contains details about the start of an activity during an execution.</p>
118#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
119#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
120pub struct ActivityStartedEventDetails {
121    /// <p>The name of the worker that the task is assigned to. These names are provided by the workers when calling <a>GetActivityTask</a>.</p>
122    #[serde(rename = "workerName")]
123    #[serde(skip_serializing_if = "Option::is_none")]
124    pub worker_name: Option<String>,
125}
126
127/// <p>Contains details about an activity that successfully terminated during an execution.</p>
128#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
129#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
130pub struct ActivitySucceededEventDetails {
131    /// <p>The JSON data output by the activity task.</p>
132    #[serde(rename = "output")]
133    #[serde(skip_serializing_if = "Option::is_none")]
134    pub output: Option<String>,
135}
136
137/// <p>Contains details about an activity timeout that occurred during an execution.</p>
138#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
139#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
140pub struct ActivityTimedOutEventDetails {
141    /// <p>A more detailed explanation of the cause of the timeout.</p>
142    #[serde(rename = "cause")]
143    #[serde(skip_serializing_if = "Option::is_none")]
144    pub cause: Option<String>,
145    /// <p>The error code of the failure.</p>
146    #[serde(rename = "error")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub error: Option<String>,
149}
150
151/// <p><p/></p>
152#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
153pub struct CloudWatchLogsLogGroup {
154    /// <p>The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with <code>:*</code> </p>
155    #[serde(rename = "logGroupArn")]
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub log_group_arn: Option<String>,
158}
159
160#[derive(Clone, Debug, Default, PartialEq, Serialize)]
161#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
162pub struct CreateActivityInput {
163    /// <p>The name of the activity to create. This name must be unique for your AWS account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>AWS Step Functions Developer Guide</i>.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
164    #[serde(rename = "name")]
165    pub name: String,
166    /// <p>The list of tags to add to a resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
167    #[serde(rename = "tags")]
168    #[serde(skip_serializing_if = "Option::is_none")]
169    pub tags: Option<Vec<Tag>>,
170}
171
172#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
173#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
174pub struct CreateActivityOutput {
175    /// <p>The Amazon Resource Name (ARN) that identifies the created activity.</p>
176    #[serde(rename = "activityArn")]
177    pub activity_arn: String,
178    /// <p>The date the activity is created.</p>
179    #[serde(rename = "creationDate")]
180    pub creation_date: f64,
181}
182
183#[derive(Clone, Debug, Default, PartialEq, Serialize)]
184#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
185pub struct CreateStateMachineInput {
186    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
187    #[serde(rename = "definition")]
188    pub definition: String,
189    /// <p><p>Defines what execution history events are logged and where they are logged.</p> <note> <p>By default, the <code>level</code> is set to <code>OFF</code>. For more information see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html">Log Levels</a> in the AWS Step Functions User Guide.</p> </note></p>
190    #[serde(rename = "loggingConfiguration")]
191    #[serde(skip_serializing_if = "Option::is_none")]
192    pub logging_configuration: Option<LoggingConfiguration>,
193    /// <p>The name of the state machine. </p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
194    #[serde(rename = "name")]
195    pub name: String,
196    /// <p>The Amazon Resource Name (ARN) of the IAM role to use for this state machine.</p>
197    #[serde(rename = "roleArn")]
198    pub role_arn: String,
199    /// <p>Tags to be added when creating a state machine.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
200    #[serde(rename = "tags")]
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub tags: Option<Vec<Tag>>,
203    /// <p>Determines whether a Standard or Express state machine is created. The default is <code>STANDARD</code>. You cannot update the <code>type</code> of a state machine once it has been created.</p>
204    #[serde(rename = "type")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub type_: Option<String>,
207}
208
209#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
210#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
211pub struct CreateStateMachineOutput {
212    /// <p>The date the state machine is created.</p>
213    #[serde(rename = "creationDate")]
214    pub creation_date: f64,
215    /// <p>The Amazon Resource Name (ARN) that identifies the created state machine.</p>
216    #[serde(rename = "stateMachineArn")]
217    pub state_machine_arn: String,
218}
219
220#[derive(Clone, Debug, Default, PartialEq, Serialize)]
221#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
222pub struct DeleteActivityInput {
223    /// <p>The Amazon Resource Name (ARN) of the activity to delete.</p>
224    #[serde(rename = "activityArn")]
225    pub activity_arn: String,
226}
227
228#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
229#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
230pub struct DeleteActivityOutput {}
231
232#[derive(Clone, Debug, Default, PartialEq, Serialize)]
233#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
234pub struct DeleteStateMachineInput {
235    /// <p>The Amazon Resource Name (ARN) of the state machine to delete.</p>
236    #[serde(rename = "stateMachineArn")]
237    pub state_machine_arn: String,
238}
239
240#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
241#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
242pub struct DeleteStateMachineOutput {}
243
244#[derive(Clone, Debug, Default, PartialEq, Serialize)]
245#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
246pub struct DescribeActivityInput {
247    /// <p>The Amazon Resource Name (ARN) of the activity to describe.</p>
248    #[serde(rename = "activityArn")]
249    pub activity_arn: String,
250}
251
252#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
253#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
254pub struct DescribeActivityOutput {
255    /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
256    #[serde(rename = "activityArn")]
257    pub activity_arn: String,
258    /// <p>The date the activity is created.</p>
259    #[serde(rename = "creationDate")]
260    pub creation_date: f64,
261    /// <p>The name of the activity.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
262    #[serde(rename = "name")]
263    pub name: String,
264}
265
266#[derive(Clone, Debug, Default, PartialEq, Serialize)]
267#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
268pub struct DescribeExecutionInput {
269    /// <p>The Amazon Resource Name (ARN) of the execution to describe.</p>
270    #[serde(rename = "executionArn")]
271    pub execution_arn: String,
272}
273
274#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
275#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
276pub struct DescribeExecutionOutput {
277    /// <p>The Amazon Resource Name (ARN) that id entifies the execution.</p>
278    #[serde(rename = "executionArn")]
279    pub execution_arn: String,
280    /// <p>The string that contains the JSON input data of the execution.</p>
281    #[serde(rename = "input")]
282    pub input: String,
283    /// <p>The name of the execution.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
284    #[serde(rename = "name")]
285    #[serde(skip_serializing_if = "Option::is_none")]
286    pub name: Option<String>,
287    /// <p><p>The JSON output data of the execution.</p> <note> <p>This field is set only if the execution succeeds. If the execution fails, this field is null.</p> </note></p>
288    #[serde(rename = "output")]
289    #[serde(skip_serializing_if = "Option::is_none")]
290    pub output: Option<String>,
291    /// <p>The date the execution is started.</p>
292    #[serde(rename = "startDate")]
293    pub start_date: f64,
294    /// <p>The Amazon Resource Name (ARN) of the executed stated machine.</p>
295    #[serde(rename = "stateMachineArn")]
296    pub state_machine_arn: String,
297    /// <p>The current status of the execution.</p>
298    #[serde(rename = "status")]
299    pub status: String,
300    /// <p>If the execution has already ended, the date the execution stopped.</p>
301    #[serde(rename = "stopDate")]
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub stop_date: Option<f64>,
304}
305
306#[derive(Clone, Debug, Default, PartialEq, Serialize)]
307#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
308pub struct DescribeStateMachineForExecutionInput {
309    /// <p>The Amazon Resource Name (ARN) of the execution you want state machine information for.</p>
310    #[serde(rename = "executionArn")]
311    pub execution_arn: String,
312}
313
314#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
315#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
316pub struct DescribeStateMachineForExecutionOutput {
317    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
318    #[serde(rename = "definition")]
319    pub definition: String,
320    #[serde(rename = "loggingConfiguration")]
321    #[serde(skip_serializing_if = "Option::is_none")]
322    pub logging_configuration: Option<LoggingConfiguration>,
323    /// <p>The name of the state machine associated with the execution.</p>
324    #[serde(rename = "name")]
325    pub name: String,
326    /// <p>The Amazon Resource Name (ARN) of the IAM role of the State Machine for the execution. </p>
327    #[serde(rename = "roleArn")]
328    pub role_arn: String,
329    /// <p>The Amazon Resource Name (ARN) of the state machine associated with the execution.</p>
330    #[serde(rename = "stateMachineArn")]
331    pub state_machine_arn: String,
332    /// <p>The date and time the state machine associated with an execution was updated. For a newly created state machine, this is the creation date.</p>
333    #[serde(rename = "updateDate")]
334    pub update_date: f64,
335}
336
337#[derive(Clone, Debug, Default, PartialEq, Serialize)]
338#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
339pub struct DescribeStateMachineInput {
340    /// <p>The Amazon Resource Name (ARN) of the state machine to describe.</p>
341    #[serde(rename = "stateMachineArn")]
342    pub state_machine_arn: String,
343}
344
345#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
346#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
347pub struct DescribeStateMachineOutput {
348    /// <p>The date the state machine is created.</p>
349    #[serde(rename = "creationDate")]
350    pub creation_date: f64,
351    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
352    #[serde(rename = "definition")]
353    pub definition: String,
354    #[serde(rename = "loggingConfiguration")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub logging_configuration: Option<LoggingConfiguration>,
357    /// <p>The name of the state machine.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
358    #[serde(rename = "name")]
359    pub name: String,
360    /// <p>The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains security by granting Step Functions access to AWS resources.)</p>
361    #[serde(rename = "roleArn")]
362    pub role_arn: String,
363    /// <p>The Amazon Resource Name (ARN) that identifies the state machine.</p>
364    #[serde(rename = "stateMachineArn")]
365    pub state_machine_arn: String,
366    /// <p>The current status of the state machine.</p>
367    #[serde(rename = "status")]
368    #[serde(skip_serializing_if = "Option::is_none")]
369    pub status: Option<String>,
370    /// <p>The <code>type</code> of the state machine (<code>STANDARD</code> or <code>EXPRESS</code>).</p>
371    #[serde(rename = "type")]
372    pub type_: String,
373}
374
375/// <p>Contains details about an abort of an execution.</p>
376#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
377#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
378pub struct ExecutionAbortedEventDetails {
379    /// <p>A more detailed explanation of the cause of the failure.</p>
380    #[serde(rename = "cause")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    pub cause: Option<String>,
383    /// <p>The error code of the failure.</p>
384    #[serde(rename = "error")]
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub error: Option<String>,
387}
388
389/// <p>Contains details about an execution failure event.</p>
390#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
391#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
392pub struct ExecutionFailedEventDetails {
393    /// <p>A more detailed explanation of the cause of the failure.</p>
394    #[serde(rename = "cause")]
395    #[serde(skip_serializing_if = "Option::is_none")]
396    pub cause: Option<String>,
397    /// <p>The error code of the failure.</p>
398    #[serde(rename = "error")]
399    #[serde(skip_serializing_if = "Option::is_none")]
400    pub error: Option<String>,
401}
402
403/// <p>Contains details about an execution.</p>
404#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
405#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
406pub struct ExecutionListItem {
407    /// <p>The Amazon Resource Name (ARN) that id entifies the execution.</p>
408    #[serde(rename = "executionArn")]
409    pub execution_arn: String,
410    /// <p>The name of the execution.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
411    #[serde(rename = "name")]
412    pub name: String,
413    /// <p>The date the execution started.</p>
414    #[serde(rename = "startDate")]
415    pub start_date: f64,
416    /// <p>The Amazon Resource Name (ARN) of the executed state machine.</p>
417    #[serde(rename = "stateMachineArn")]
418    pub state_machine_arn: String,
419    /// <p>The current status of the execution.</p>
420    #[serde(rename = "status")]
421    pub status: String,
422    /// <p>If the execution already ended, the date the execution stopped.</p>
423    #[serde(rename = "stopDate")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub stop_date: Option<f64>,
426}
427
428/// <p>Contains details about the start of the execution.</p>
429#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
430#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
431pub struct ExecutionStartedEventDetails {
432    /// <p>The JSON data input to the execution.</p>
433    #[serde(rename = "input")]
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub input: Option<String>,
436    /// <p>The Amazon Resource Name (ARN) of the IAM role used for executing AWS Lambda tasks.</p>
437    #[serde(rename = "roleArn")]
438    #[serde(skip_serializing_if = "Option::is_none")]
439    pub role_arn: Option<String>,
440}
441
442/// <p>Contains details about the successful termination of the execution.</p>
443#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
444#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
445pub struct ExecutionSucceededEventDetails {
446    /// <p>The JSON data output by the execution.</p>
447    #[serde(rename = "output")]
448    #[serde(skip_serializing_if = "Option::is_none")]
449    pub output: Option<String>,
450}
451
452/// <p>Contains details about the execution timeout that occurred during the execution.</p>
453#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
454#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
455pub struct ExecutionTimedOutEventDetails {
456    /// <p>A more detailed explanation of the cause of the timeout.</p>
457    #[serde(rename = "cause")]
458    #[serde(skip_serializing_if = "Option::is_none")]
459    pub cause: Option<String>,
460    /// <p>The error code of the failure.</p>
461    #[serde(rename = "error")]
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub error: Option<String>,
464}
465
466#[derive(Clone, Debug, Default, PartialEq, Serialize)]
467#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
468pub struct GetActivityTaskInput {
469    /// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <a>CreateActivity</a>.)</p>
470    #[serde(rename = "activityArn")]
471    pub activity_arn: String,
472    /// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
473    #[serde(rename = "workerName")]
474    #[serde(skip_serializing_if = "Option::is_none")]
475    pub worker_name: Option<String>,
476}
477
478#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
479#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
480pub struct GetActivityTaskOutput {
481    /// <p>The string that contains the JSON input data for the task.</p>
482    #[serde(rename = "input")]
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub input: Option<String>,
485    /// <p>A token that identifies the scheduled task. This token must be copied and included in subsequent calls to <a>SendTaskHeartbeat</a>, <a>SendTaskSuccess</a> or <a>SendTaskFailure</a> in order to report the progress or completion of the task.</p>
486    #[serde(rename = "taskToken")]
487    #[serde(skip_serializing_if = "Option::is_none")]
488    pub task_token: Option<String>,
489}
490
491#[derive(Clone, Debug, Default, PartialEq, Serialize)]
492#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
493pub struct GetExecutionHistoryInput {
494    /// <p>The Amazon Resource Name (ARN) of the execution.</p>
495    #[serde(rename = "executionArn")]
496    pub execution_arn: String,
497    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
498    #[serde(rename = "maxResults")]
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub max_results: Option<i64>,
501    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
502    #[serde(rename = "nextToken")]
503    #[serde(skip_serializing_if = "Option::is_none")]
504    pub next_token: Option<String>,
505    /// <p>Lists events in descending order of their <code>timeStamp</code>.</p>
506    #[serde(rename = "reverseOrder")]
507    #[serde(skip_serializing_if = "Option::is_none")]
508    pub reverse_order: Option<bool>,
509}
510
511#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
512#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
513pub struct GetExecutionHistoryOutput {
514    /// <p>The list of events that occurred in the execution.</p>
515    #[serde(rename = "events")]
516    pub events: Vec<HistoryEvent>,
517    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
518    #[serde(rename = "nextToken")]
519    #[serde(skip_serializing_if = "Option::is_none")]
520    pub next_token: Option<String>,
521}
522
523/// <p>Contains details about the events of an execution.</p>
524#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
525#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
526pub struct HistoryEvent {
527    #[serde(rename = "activityFailedEventDetails")]
528    #[serde(skip_serializing_if = "Option::is_none")]
529    pub activity_failed_event_details: Option<ActivityFailedEventDetails>,
530    /// <p>Contains details about an activity schedule event that failed during an execution.</p>
531    #[serde(rename = "activityScheduleFailedEventDetails")]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    pub activity_schedule_failed_event_details: Option<ActivityScheduleFailedEventDetails>,
534    #[serde(rename = "activityScheduledEventDetails")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub activity_scheduled_event_details: Option<ActivityScheduledEventDetails>,
537    #[serde(rename = "activityStartedEventDetails")]
538    #[serde(skip_serializing_if = "Option::is_none")]
539    pub activity_started_event_details: Option<ActivityStartedEventDetails>,
540    #[serde(rename = "activitySucceededEventDetails")]
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub activity_succeeded_event_details: Option<ActivitySucceededEventDetails>,
543    #[serde(rename = "activityTimedOutEventDetails")]
544    #[serde(skip_serializing_if = "Option::is_none")]
545    pub activity_timed_out_event_details: Option<ActivityTimedOutEventDetails>,
546    #[serde(rename = "executionAbortedEventDetails")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub execution_aborted_event_details: Option<ExecutionAbortedEventDetails>,
549    #[serde(rename = "executionFailedEventDetails")]
550    #[serde(skip_serializing_if = "Option::is_none")]
551    pub execution_failed_event_details: Option<ExecutionFailedEventDetails>,
552    #[serde(rename = "executionStartedEventDetails")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub execution_started_event_details: Option<ExecutionStartedEventDetails>,
555    #[serde(rename = "executionSucceededEventDetails")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub execution_succeeded_event_details: Option<ExecutionSucceededEventDetails>,
558    #[serde(rename = "executionTimedOutEventDetails")]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    pub execution_timed_out_event_details: Option<ExecutionTimedOutEventDetails>,
561    /// <p>The id of the event. Events are numbered sequentially, starting at one.</p>
562    #[serde(rename = "id")]
563    pub id: i64,
564    #[serde(rename = "lambdaFunctionFailedEventDetails")]
565    #[serde(skip_serializing_if = "Option::is_none")]
566    pub lambda_function_failed_event_details: Option<LambdaFunctionFailedEventDetails>,
567    #[serde(rename = "lambdaFunctionScheduleFailedEventDetails")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub lambda_function_schedule_failed_event_details:
570        Option<LambdaFunctionScheduleFailedEventDetails>,
571    #[serde(rename = "lambdaFunctionScheduledEventDetails")]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub lambda_function_scheduled_event_details: Option<LambdaFunctionScheduledEventDetails>,
574    /// <p>Contains details about a lambda function that failed to start during an execution.</p>
575    #[serde(rename = "lambdaFunctionStartFailedEventDetails")]
576    #[serde(skip_serializing_if = "Option::is_none")]
577    pub lambda_function_start_failed_event_details: Option<LambdaFunctionStartFailedEventDetails>,
578    /// <p>Contains details about a lambda function that terminated successfully during an execution.</p>
579    #[serde(rename = "lambdaFunctionSucceededEventDetails")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub lambda_function_succeeded_event_details: Option<LambdaFunctionSucceededEventDetails>,
582    #[serde(rename = "lambdaFunctionTimedOutEventDetails")]
583    #[serde(skip_serializing_if = "Option::is_none")]
584    pub lambda_function_timed_out_event_details: Option<LambdaFunctionTimedOutEventDetails>,
585    /// <p>Contains details about an iteration of a Map state that was aborted.</p>
586    #[serde(rename = "mapIterationAbortedEventDetails")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub map_iteration_aborted_event_details: Option<MapIterationEventDetails>,
589    /// <p>Contains details about an iteration of a Map state that failed.</p>
590    #[serde(rename = "mapIterationFailedEventDetails")]
591    #[serde(skip_serializing_if = "Option::is_none")]
592    pub map_iteration_failed_event_details: Option<MapIterationEventDetails>,
593    /// <p>Contains details about an iteration of a Map state that was started.</p>
594    #[serde(rename = "mapIterationStartedEventDetails")]
595    #[serde(skip_serializing_if = "Option::is_none")]
596    pub map_iteration_started_event_details: Option<MapIterationEventDetails>,
597    /// <p>Contains details about an iteration of a Map state that succeeded.</p>
598    #[serde(rename = "mapIterationSucceededEventDetails")]
599    #[serde(skip_serializing_if = "Option::is_none")]
600    pub map_iteration_succeeded_event_details: Option<MapIterationEventDetails>,
601    /// <p>Contains details about Map state that was started.</p>
602    #[serde(rename = "mapStateStartedEventDetails")]
603    #[serde(skip_serializing_if = "Option::is_none")]
604    pub map_state_started_event_details: Option<MapStateStartedEventDetails>,
605    /// <p>The id of the previous event.</p>
606    #[serde(rename = "previousEventId")]
607    #[serde(skip_serializing_if = "Option::is_none")]
608    pub previous_event_id: Option<i64>,
609    #[serde(rename = "stateEnteredEventDetails")]
610    #[serde(skip_serializing_if = "Option::is_none")]
611    pub state_entered_event_details: Option<StateEnteredEventDetails>,
612    #[serde(rename = "stateExitedEventDetails")]
613    #[serde(skip_serializing_if = "Option::is_none")]
614    pub state_exited_event_details: Option<StateExitedEventDetails>,
615    /// <p>Contains details about the failure of a task.</p>
616    #[serde(rename = "taskFailedEventDetails")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub task_failed_event_details: Option<TaskFailedEventDetails>,
619    /// <p>Contains details about a task that was scheduled.</p>
620    #[serde(rename = "taskScheduledEventDetails")]
621    #[serde(skip_serializing_if = "Option::is_none")]
622    pub task_scheduled_event_details: Option<TaskScheduledEventDetails>,
623    /// <p>Contains details about a task that failed to start.</p>
624    #[serde(rename = "taskStartFailedEventDetails")]
625    #[serde(skip_serializing_if = "Option::is_none")]
626    pub task_start_failed_event_details: Option<TaskStartFailedEventDetails>,
627    /// <p>Contains details about a task that was started.</p>
628    #[serde(rename = "taskStartedEventDetails")]
629    #[serde(skip_serializing_if = "Option::is_none")]
630    pub task_started_event_details: Option<TaskStartedEventDetails>,
631    /// <p>Contains details about a task that where the submit failed.</p>
632    #[serde(rename = "taskSubmitFailedEventDetails")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub task_submit_failed_event_details: Option<TaskSubmitFailedEventDetails>,
635    /// <p>Contains details about a submitted task.</p>
636    #[serde(rename = "taskSubmittedEventDetails")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub task_submitted_event_details: Option<TaskSubmittedEventDetails>,
639    /// <p>Contains details about a task that succeeded.</p>
640    #[serde(rename = "taskSucceededEventDetails")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub task_succeeded_event_details: Option<TaskSucceededEventDetails>,
643    /// <p>Contains details about a task that timed out.</p>
644    #[serde(rename = "taskTimedOutEventDetails")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub task_timed_out_event_details: Option<TaskTimedOutEventDetails>,
647    /// <p>The date and time the event occurred.</p>
648    #[serde(rename = "timestamp")]
649    pub timestamp: f64,
650    /// <p>The type of the event.</p>
651    #[serde(rename = "type")]
652    pub type_: String,
653}
654
655/// <p>Contains details about a lambda function that failed during an execution.</p>
656#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
657#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
658pub struct LambdaFunctionFailedEventDetails {
659    /// <p>A more detailed explanation of the cause of the failure.</p>
660    #[serde(rename = "cause")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub cause: Option<String>,
663    /// <p>The error code of the failure.</p>
664    #[serde(rename = "error")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub error: Option<String>,
667}
668
669/// <p>Contains details about a failed lambda function schedule event that occurred during an execution.</p>
670#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
671#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
672pub struct LambdaFunctionScheduleFailedEventDetails {
673    /// <p>A more detailed explanation of the cause of the failure.</p>
674    #[serde(rename = "cause")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub cause: Option<String>,
677    /// <p>The error code of the failure.</p>
678    #[serde(rename = "error")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub error: Option<String>,
681}
682
683/// <p>Contains details about a lambda function scheduled during an execution.</p>
684#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
685#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
686pub struct LambdaFunctionScheduledEventDetails {
687    /// <p>The JSON data input to the lambda function.</p>
688    #[serde(rename = "input")]
689    #[serde(skip_serializing_if = "Option::is_none")]
690    pub input: Option<String>,
691    /// <p>The Amazon Resource Name (ARN) of the scheduled lambda function.</p>
692    #[serde(rename = "resource")]
693    pub resource: String,
694    /// <p>The maximum allowed duration of the lambda function.</p>
695    #[serde(rename = "timeoutInSeconds")]
696    #[serde(skip_serializing_if = "Option::is_none")]
697    pub timeout_in_seconds: Option<i64>,
698}
699
700/// <p>Contains details about a lambda function that failed to start during an execution.</p>
701#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
702#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
703pub struct LambdaFunctionStartFailedEventDetails {
704    /// <p>A more detailed explanation of the cause of the failure.</p>
705    #[serde(rename = "cause")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    pub cause: Option<String>,
708    /// <p>The error code of the failure.</p>
709    #[serde(rename = "error")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub error: Option<String>,
712}
713
714/// <p>Contains details about a lambda function that successfully terminated during an execution.</p>
715#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
716#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
717pub struct LambdaFunctionSucceededEventDetails {
718    /// <p>The JSON data output by the lambda function.</p>
719    #[serde(rename = "output")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub output: Option<String>,
722}
723
724/// <p>Contains details about a lambda function timeout that occurred during an execution.</p>
725#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
726#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
727pub struct LambdaFunctionTimedOutEventDetails {
728    /// <p>A more detailed explanation of the cause of the timeout.</p>
729    #[serde(rename = "cause")]
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub cause: Option<String>,
732    /// <p>The error code of the failure.</p>
733    #[serde(rename = "error")]
734    #[serde(skip_serializing_if = "Option::is_none")]
735    pub error: Option<String>,
736}
737
738#[derive(Clone, Debug, Default, PartialEq, Serialize)]
739#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
740pub struct ListActivitiesInput {
741    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
742    #[serde(rename = "maxResults")]
743    #[serde(skip_serializing_if = "Option::is_none")]
744    pub max_results: Option<i64>,
745    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
746    #[serde(rename = "nextToken")]
747    #[serde(skip_serializing_if = "Option::is_none")]
748    pub next_token: Option<String>,
749}
750
751#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
752#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
753pub struct ListActivitiesOutput {
754    /// <p>The list of activities.</p>
755    #[serde(rename = "activities")]
756    pub activities: Vec<ActivityListItem>,
757    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
758    #[serde(rename = "nextToken")]
759    #[serde(skip_serializing_if = "Option::is_none")]
760    pub next_token: Option<String>,
761}
762
763#[derive(Clone, Debug, Default, PartialEq, Serialize)]
764#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
765pub struct ListExecutionsInput {
766    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
767    #[serde(rename = "maxResults")]
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub max_results: Option<i64>,
770    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
771    #[serde(rename = "nextToken")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub next_token: Option<String>,
774    /// <p>The Amazon Resource Name (ARN) of the state machine whose executions is listed.</p>
775    #[serde(rename = "stateMachineArn")]
776    pub state_machine_arn: String,
777    /// <p>If specified, only list the executions whose current execution status matches the given filter.</p>
778    #[serde(rename = "statusFilter")]
779    #[serde(skip_serializing_if = "Option::is_none")]
780    pub status_filter: Option<String>,
781}
782
783#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
784#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
785pub struct ListExecutionsOutput {
786    /// <p>The list of matching executions.</p>
787    #[serde(rename = "executions")]
788    pub executions: Vec<ExecutionListItem>,
789    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
790    #[serde(rename = "nextToken")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub next_token: Option<String>,
793}
794
795#[derive(Clone, Debug, Default, PartialEq, Serialize)]
796#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
797pub struct ListStateMachinesInput {
798    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
799    #[serde(rename = "maxResults")]
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub max_results: Option<i64>,
802    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
803    #[serde(rename = "nextToken")]
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub next_token: Option<String>,
806}
807
808#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
809#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
810pub struct ListStateMachinesOutput {
811    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
812    #[serde(rename = "nextToken")]
813    #[serde(skip_serializing_if = "Option::is_none")]
814    pub next_token: Option<String>,
815    #[serde(rename = "stateMachines")]
816    pub state_machines: Vec<StateMachineListItem>,
817}
818
819#[derive(Clone, Debug, Default, PartialEq, Serialize)]
820#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
821pub struct ListTagsForResourceInput {
822    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
823    #[serde(rename = "resourceArn")]
824    pub resource_arn: String,
825}
826
827#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
828#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
829pub struct ListTagsForResourceOutput {
830    /// <p>An array of tags associated with the resource.</p>
831    #[serde(rename = "tags")]
832    #[serde(skip_serializing_if = "Option::is_none")]
833    pub tags: Option<Vec<Tag>>,
834}
835
836/// <p><p/></p>
837#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
838pub struct LogDestination {
839    /// <p>An object describing a CloudWatch log group. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html">AWS::Logs::LogGroup</a> in the AWS CloudFormation User Guide.</p>
840    #[serde(rename = "cloudWatchLogsLogGroup")]
841    #[serde(skip_serializing_if = "Option::is_none")]
842    pub cloud_watch_logs_log_group: Option<CloudWatchLogsLogGroup>,
843}
844
845/// <p>The <code>LoggingConfiguration</code> data type is used to set CloudWatch Logs options.</p>
846#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
847pub struct LoggingConfiguration {
848    /// <p>An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to <code>OFF</code>.</p>
849    #[serde(rename = "destinations")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub destinations: Option<Vec<LogDestination>>,
852    /// <p>Determines whether execution data is included in your log. When set to <code>FALSE</code>, data is excluded.</p>
853    #[serde(rename = "includeExecutionData")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    pub include_execution_data: Option<bool>,
856    /// <p>Defines which category of execution history events are logged.</p>
857    #[serde(rename = "level")]
858    #[serde(skip_serializing_if = "Option::is_none")]
859    pub level: Option<String>,
860}
861
862/// <p>Contains details about an iteration of a Map state.</p>
863#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
864#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
865pub struct MapIterationEventDetails {
866    /// <p>The index of the array belonging to the Map state iteration.</p>
867    #[serde(rename = "index")]
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub index: Option<i64>,
870    /// <p>The name of the iteration’s parent Map state.</p>
871    #[serde(rename = "name")]
872    #[serde(skip_serializing_if = "Option::is_none")]
873    pub name: Option<String>,
874}
875
876/// <p>Details about a Map state that was started.</p>
877#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
878#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
879pub struct MapStateStartedEventDetails {
880    /// <p>The size of the array for Map state iterations.</p>
881    #[serde(rename = "length")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub length: Option<i64>,
884}
885
886#[derive(Clone, Debug, Default, PartialEq, Serialize)]
887#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
888pub struct SendTaskFailureInput {
889    /// <p>A more detailed explanation of the cause of the failure.</p>
890    #[serde(rename = "cause")]
891    #[serde(skip_serializing_if = "Option::is_none")]
892    pub cause: Option<String>,
893    /// <p>The error code of the failure.</p>
894    #[serde(rename = "error")]
895    #[serde(skip_serializing_if = "Option::is_none")]
896    pub error: Option<String>,
897    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
898    #[serde(rename = "taskToken")]
899    pub task_token: String,
900}
901
902#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
903#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
904pub struct SendTaskFailureOutput {}
905
906#[derive(Clone, Debug, Default, PartialEq, Serialize)]
907#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
908pub struct SendTaskHeartbeatInput {
909    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
910    #[serde(rename = "taskToken")]
911    pub task_token: String,
912}
913
914#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
915#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
916pub struct SendTaskHeartbeatOutput {}
917
918#[derive(Clone, Debug, Default, PartialEq, Serialize)]
919#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
920pub struct SendTaskSuccessInput {
921    /// <p>The JSON output of the task.</p>
922    #[serde(rename = "output")]
923    pub output: String,
924    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
925    #[serde(rename = "taskToken")]
926    pub task_token: String,
927}
928
929#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
930#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
931pub struct SendTaskSuccessOutput {}
932
933#[derive(Clone, Debug, Default, PartialEq, Serialize)]
934#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
935pub struct StartExecutionInput {
936    /// <p><p>The string that contains the JSON input data for the execution, for example:</p> <p> <code>&quot;input&quot;: &quot;{&quot;first_name&quot; : &quot;test&quot;}&quot;</code> </p> <note> <p>If you don&#39;t include any JSON input data, you still must include the two braces, for example: <code>&quot;input&quot;: &quot;{}&quot;</code> </p> </note></p>
937    #[serde(rename = "input")]
938    #[serde(skip_serializing_if = "Option::is_none")]
939    pub input: Option<String>,
940    /// <p>The name of the execution. This name must be unique for your AWS account, region, and state machine for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>AWS Step Functions Developer Guide</i>.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
941    #[serde(rename = "name")]
942    #[serde(skip_serializing_if = "Option::is_none")]
943    pub name: Option<String>,
944    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
945    #[serde(rename = "stateMachineArn")]
946    pub state_machine_arn: String,
947}
948
949#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
950#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
951pub struct StartExecutionOutput {
952    /// <p>The Amazon Resource Name (ARN) that id entifies the execution.</p>
953    #[serde(rename = "executionArn")]
954    pub execution_arn: String,
955    /// <p>The date the execution is started.</p>
956    #[serde(rename = "startDate")]
957    pub start_date: f64,
958}
959
960/// <p>Contains details about a state entered during an execution.</p>
961#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
962#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
963pub struct StateEnteredEventDetails {
964    /// <p>The string that contains the JSON input data for the state.</p>
965    #[serde(rename = "input")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub input: Option<String>,
968    /// <p>The name of the state.</p>
969    #[serde(rename = "name")]
970    pub name: String,
971}
972
973/// <p>Contains details about an exit from a state during an execution.</p>
974#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
975#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
976pub struct StateExitedEventDetails {
977    /// <p>The name of the state.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
978    #[serde(rename = "name")]
979    pub name: String,
980    /// <p>The JSON output data of the state.</p>
981    #[serde(rename = "output")]
982    #[serde(skip_serializing_if = "Option::is_none")]
983    pub output: Option<String>,
984}
985
986/// <p>Contains details about the state machine.</p>
987#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
988#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
989pub struct StateMachineListItem {
990    /// <p>The date the state machine is created.</p>
991    #[serde(rename = "creationDate")]
992    pub creation_date: f64,
993    /// <p>The name of the state machine.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
994    #[serde(rename = "name")]
995    pub name: String,
996    /// <p>The Amazon Resource Name (ARN) that identifies the state machine.</p>
997    #[serde(rename = "stateMachineArn")]
998    pub state_machine_arn: String,
999    /// <p><p/></p>
1000    #[serde(rename = "type")]
1001    pub type_: String,
1002}
1003
1004#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1005#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1006pub struct StopExecutionInput {
1007    /// <p>A more detailed explanation of the cause of the failure.</p>
1008    #[serde(rename = "cause")]
1009    #[serde(skip_serializing_if = "Option::is_none")]
1010    pub cause: Option<String>,
1011    /// <p>The error code of the failure.</p>
1012    #[serde(rename = "error")]
1013    #[serde(skip_serializing_if = "Option::is_none")]
1014    pub error: Option<String>,
1015    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
1016    #[serde(rename = "executionArn")]
1017    pub execution_arn: String,
1018}
1019
1020#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1021#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1022pub struct StopExecutionOutput {
1023    /// <p>The date the execution is stopped.</p>
1024    #[serde(rename = "stopDate")]
1025    pub stop_date: f64,
1026}
1027
1028/// <p>Tags are key-value pairs that can be associated with Step Functions state machines and activities.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
1029#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1030pub struct Tag {
1031    /// <p>The key of a tag.</p>
1032    #[serde(rename = "key")]
1033    #[serde(skip_serializing_if = "Option::is_none")]
1034    pub key: Option<String>,
1035    /// <p>The value of a tag.</p>
1036    #[serde(rename = "value")]
1037    #[serde(skip_serializing_if = "Option::is_none")]
1038    pub value: Option<String>,
1039}
1040
1041#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1042#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1043pub struct TagResourceInput {
1044    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
1045    #[serde(rename = "resourceArn")]
1046    pub resource_arn: String,
1047    /// <p>The list of tags to add to a resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
1048    #[serde(rename = "tags")]
1049    pub tags: Vec<Tag>,
1050}
1051
1052#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1053#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1054pub struct TagResourceOutput {}
1055
1056/// <p>Contains details about a task failure event.</p>
1057#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1058#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1059pub struct TaskFailedEventDetails {
1060    /// <p>A more detailed explanation of the cause of the failure.</p>
1061    #[serde(rename = "cause")]
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    pub cause: Option<String>,
1064    /// <p>The error code of the failure.</p>
1065    #[serde(rename = "error")]
1066    #[serde(skip_serializing_if = "Option::is_none")]
1067    pub error: Option<String>,
1068    /// <p>The service name of the resource in a task state.</p>
1069    #[serde(rename = "resource")]
1070    pub resource: String,
1071    /// <p>The action of the resource called by a task state.</p>
1072    #[serde(rename = "resourceType")]
1073    pub resource_type: String,
1074}
1075
1076/// <p>Contains details about a task scheduled during an execution.</p>
1077#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1078#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1079pub struct TaskScheduledEventDetails {
1080    /// <p>The JSON data passed to the resource referenced in a task state.</p>
1081    #[serde(rename = "parameters")]
1082    pub parameters: String,
1083    /// <p>The region of the scheduled task</p>
1084    #[serde(rename = "region")]
1085    pub region: String,
1086    /// <p>The service name of the resource in a task state.</p>
1087    #[serde(rename = "resource")]
1088    pub resource: String,
1089    /// <p>The action of the resource called by a task state.</p>
1090    #[serde(rename = "resourceType")]
1091    pub resource_type: String,
1092    /// <p>The maximum allowed duration of the task.</p>
1093    #[serde(rename = "timeoutInSeconds")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub timeout_in_seconds: Option<i64>,
1096}
1097
1098/// <p>Contains details about a task that failed to start during an execution.</p>
1099#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1100#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1101pub struct TaskStartFailedEventDetails {
1102    /// <p>A more detailed explanation of the cause of the failure.</p>
1103    #[serde(rename = "cause")]
1104    #[serde(skip_serializing_if = "Option::is_none")]
1105    pub cause: Option<String>,
1106    /// <p>The error code of the failure.</p>
1107    #[serde(rename = "error")]
1108    #[serde(skip_serializing_if = "Option::is_none")]
1109    pub error: Option<String>,
1110    /// <p>The service name of the resource in a task state.</p>
1111    #[serde(rename = "resource")]
1112    pub resource: String,
1113    /// <p>The action of the resource called by a task state.</p>
1114    #[serde(rename = "resourceType")]
1115    pub resource_type: String,
1116}
1117
1118/// <p>Contains details about the start of a task during an execution.</p>
1119#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1120#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1121pub struct TaskStartedEventDetails {
1122    /// <p>The service name of the resource in a task state.</p>
1123    #[serde(rename = "resource")]
1124    pub resource: String,
1125    /// <p>The action of the resource called by a task state.</p>
1126    #[serde(rename = "resourceType")]
1127    pub resource_type: String,
1128}
1129
1130/// <p>Contains details about a task that failed to submit during an execution.</p>
1131#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1132#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1133pub struct TaskSubmitFailedEventDetails {
1134    /// <p>A more detailed explanation of the cause of the failure.</p>
1135    #[serde(rename = "cause")]
1136    #[serde(skip_serializing_if = "Option::is_none")]
1137    pub cause: Option<String>,
1138    /// <p>The error code of the failure.</p>
1139    #[serde(rename = "error")]
1140    #[serde(skip_serializing_if = "Option::is_none")]
1141    pub error: Option<String>,
1142    /// <p>The service name of the resource in a task state.</p>
1143    #[serde(rename = "resource")]
1144    pub resource: String,
1145    /// <p>The action of the resource called by a task state.</p>
1146    #[serde(rename = "resourceType")]
1147    pub resource_type: String,
1148}
1149
1150/// <p>Contains details about a task submitted to a resource .</p>
1151#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1152#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1153pub struct TaskSubmittedEventDetails {
1154    /// <p>The response from a resource when a task has started.</p>
1155    #[serde(rename = "output")]
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    pub output: Option<String>,
1158    /// <p>The service name of the resource in a task state.</p>
1159    #[serde(rename = "resource")]
1160    pub resource: String,
1161    /// <p>The action of the resource called by a task state.</p>
1162    #[serde(rename = "resourceType")]
1163    pub resource_type: String,
1164}
1165
1166/// <p>Contains details about the successful completion of a task state.</p>
1167#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1168#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1169pub struct TaskSucceededEventDetails {
1170    /// <p>The full JSON response from a resource when a task has succeeded. This response becomes the output of the related task.</p>
1171    #[serde(rename = "output")]
1172    #[serde(skip_serializing_if = "Option::is_none")]
1173    pub output: Option<String>,
1174    /// <p>The service name of the resource in a task state.</p>
1175    #[serde(rename = "resource")]
1176    pub resource: String,
1177    /// <p>The action of the resource called by a task state.</p>
1178    #[serde(rename = "resourceType")]
1179    pub resource_type: String,
1180}
1181
1182/// <p>Contains details about a resource timeout that occurred during an execution.</p>
1183#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1184#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1185pub struct TaskTimedOutEventDetails {
1186    /// <p>A more detailed explanation of the cause of the failure.</p>
1187    #[serde(rename = "cause")]
1188    #[serde(skip_serializing_if = "Option::is_none")]
1189    pub cause: Option<String>,
1190    /// <p>The error code of the failure.</p>
1191    #[serde(rename = "error")]
1192    #[serde(skip_serializing_if = "Option::is_none")]
1193    pub error: Option<String>,
1194    /// <p>The service name of the resource in a task state.</p>
1195    #[serde(rename = "resource")]
1196    pub resource: String,
1197    /// <p>The action of the resource called by a task state.</p>
1198    #[serde(rename = "resourceType")]
1199    pub resource_type: String,
1200}
1201
1202#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1203#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1204pub struct UntagResourceInput {
1205    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
1206    #[serde(rename = "resourceArn")]
1207    pub resource_arn: String,
1208    /// <p>The list of tags to remove from the resource.</p>
1209    #[serde(rename = "tagKeys")]
1210    pub tag_keys: Vec<String>,
1211}
1212
1213#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1214#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1215pub struct UntagResourceOutput {}
1216
1217#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1218#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1219pub struct UpdateStateMachineInput {
1220    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
1221    #[serde(rename = "definition")]
1222    #[serde(skip_serializing_if = "Option::is_none")]
1223    pub definition: Option<String>,
1224    /// <p>The <code>LoggingConfiguration</code> data type is used to set CloudWatch Logs options.</p>
1225    #[serde(rename = "loggingConfiguration")]
1226    #[serde(skip_serializing_if = "Option::is_none")]
1227    pub logging_configuration: Option<LoggingConfiguration>,
1228    /// <p>The Amazon Resource Name (ARN) of the IAM role of the state machine.</p>
1229    #[serde(rename = "roleArn")]
1230    #[serde(skip_serializing_if = "Option::is_none")]
1231    pub role_arn: Option<String>,
1232    /// <p>The Amazon Resource Name (ARN) of the state machine.</p>
1233    #[serde(rename = "stateMachineArn")]
1234    pub state_machine_arn: String,
1235}
1236
1237#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1238#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1239pub struct UpdateStateMachineOutput {
1240    /// <p>The date and time the state machine was updated.</p>
1241    #[serde(rename = "updateDate")]
1242    pub update_date: f64,
1243}
1244
1245/// Errors returned by CreateActivity
1246#[derive(Debug, PartialEq)]
1247pub enum CreateActivityError {
1248    /// <p>The maximum number of activities has been reached. Existing activities must be deleted before a new activity can be created.</p>
1249    ActivityLimitExceeded(String),
1250    /// <p>The provided name is invalid.</p>
1251    InvalidName(String),
1252    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
1253    TooManyTags(String),
1254}
1255
1256impl CreateActivityError {
1257    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateActivityError> {
1258        if let Some(err) = proto::json::Error::parse(&res) {
1259            match err.typ.as_str() {
1260                "ActivityLimitExceeded" => {
1261                    return RusotoError::Service(CreateActivityError::ActivityLimitExceeded(
1262                        err.msg,
1263                    ))
1264                }
1265                "InvalidName" => {
1266                    return RusotoError::Service(CreateActivityError::InvalidName(err.msg))
1267                }
1268                "TooManyTags" => {
1269                    return RusotoError::Service(CreateActivityError::TooManyTags(err.msg))
1270                }
1271                "ValidationException" => return RusotoError::Validation(err.msg),
1272                _ => {}
1273            }
1274        }
1275        RusotoError::Unknown(res)
1276    }
1277}
1278impl fmt::Display for CreateActivityError {
1279    #[allow(unused_variables)]
1280    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1281        match *self {
1282            CreateActivityError::ActivityLimitExceeded(ref cause) => write!(f, "{}", cause),
1283            CreateActivityError::InvalidName(ref cause) => write!(f, "{}", cause),
1284            CreateActivityError::TooManyTags(ref cause) => write!(f, "{}", cause),
1285        }
1286    }
1287}
1288impl Error for CreateActivityError {}
1289/// Errors returned by CreateStateMachine
1290#[derive(Debug, PartialEq)]
1291pub enum CreateStateMachineError {
1292    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1293    InvalidArn(String),
1294    /// <p>The provided Amazon States Language definition is invalid.</p>
1295    InvalidDefinition(String),
1296    /// <p><p/></p>
1297    InvalidLoggingConfiguration(String),
1298    /// <p>The provided name is invalid.</p>
1299    InvalidName(String),
1300    /// <p>A state machine with the same name but a different definition or role ARN already exists.</p>
1301    StateMachineAlreadyExists(String),
1302    /// <p>The specified state machine is being deleted.</p>
1303    StateMachineDeleting(String),
1304    /// <p>The maximum number of state machines has been reached. Existing state machines must be deleted before a new state machine can be created.</p>
1305    StateMachineLimitExceeded(String),
1306    /// <p><p/></p>
1307    StateMachineTypeNotSupported(String),
1308    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
1309    TooManyTags(String),
1310}
1311
1312impl CreateStateMachineError {
1313    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStateMachineError> {
1314        if let Some(err) = proto::json::Error::parse(&res) {
1315            match err.typ.as_str() {
1316                "InvalidArn" => {
1317                    return RusotoError::Service(CreateStateMachineError::InvalidArn(err.msg))
1318                }
1319                "InvalidDefinition" => {
1320                    return RusotoError::Service(CreateStateMachineError::InvalidDefinition(
1321                        err.msg,
1322                    ))
1323                }
1324                "InvalidLoggingConfiguration" => {
1325                    return RusotoError::Service(
1326                        CreateStateMachineError::InvalidLoggingConfiguration(err.msg),
1327                    )
1328                }
1329                "InvalidName" => {
1330                    return RusotoError::Service(CreateStateMachineError::InvalidName(err.msg))
1331                }
1332                "StateMachineAlreadyExists" => {
1333                    return RusotoError::Service(
1334                        CreateStateMachineError::StateMachineAlreadyExists(err.msg),
1335                    )
1336                }
1337                "StateMachineDeleting" => {
1338                    return RusotoError::Service(CreateStateMachineError::StateMachineDeleting(
1339                        err.msg,
1340                    ))
1341                }
1342                "StateMachineLimitExceeded" => {
1343                    return RusotoError::Service(
1344                        CreateStateMachineError::StateMachineLimitExceeded(err.msg),
1345                    )
1346                }
1347                "StateMachineTypeNotSupported" => {
1348                    return RusotoError::Service(
1349                        CreateStateMachineError::StateMachineTypeNotSupported(err.msg),
1350                    )
1351                }
1352                "TooManyTags" => {
1353                    return RusotoError::Service(CreateStateMachineError::TooManyTags(err.msg))
1354                }
1355                "ValidationException" => return RusotoError::Validation(err.msg),
1356                _ => {}
1357            }
1358        }
1359        RusotoError::Unknown(res)
1360    }
1361}
1362impl fmt::Display for CreateStateMachineError {
1363    #[allow(unused_variables)]
1364    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1365        match *self {
1366            CreateStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
1367            CreateStateMachineError::InvalidDefinition(ref cause) => write!(f, "{}", cause),
1368            CreateStateMachineError::InvalidLoggingConfiguration(ref cause) => {
1369                write!(f, "{}", cause)
1370            }
1371            CreateStateMachineError::InvalidName(ref cause) => write!(f, "{}", cause),
1372            CreateStateMachineError::StateMachineAlreadyExists(ref cause) => write!(f, "{}", cause),
1373            CreateStateMachineError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
1374            CreateStateMachineError::StateMachineLimitExceeded(ref cause) => write!(f, "{}", cause),
1375            CreateStateMachineError::StateMachineTypeNotSupported(ref cause) => {
1376                write!(f, "{}", cause)
1377            }
1378            CreateStateMachineError::TooManyTags(ref cause) => write!(f, "{}", cause),
1379        }
1380    }
1381}
1382impl Error for CreateStateMachineError {}
1383/// Errors returned by DeleteActivity
1384#[derive(Debug, PartialEq)]
1385pub enum DeleteActivityError {
1386    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1387    InvalidArn(String),
1388}
1389
1390impl DeleteActivityError {
1391    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteActivityError> {
1392        if let Some(err) = proto::json::Error::parse(&res) {
1393            match err.typ.as_str() {
1394                "InvalidArn" => {
1395                    return RusotoError::Service(DeleteActivityError::InvalidArn(err.msg))
1396                }
1397                "ValidationException" => return RusotoError::Validation(err.msg),
1398                _ => {}
1399            }
1400        }
1401        RusotoError::Unknown(res)
1402    }
1403}
1404impl fmt::Display for DeleteActivityError {
1405    #[allow(unused_variables)]
1406    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1407        match *self {
1408            DeleteActivityError::InvalidArn(ref cause) => write!(f, "{}", cause),
1409        }
1410    }
1411}
1412impl Error for DeleteActivityError {}
1413/// Errors returned by DeleteStateMachine
1414#[derive(Debug, PartialEq)]
1415pub enum DeleteStateMachineError {
1416    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1417    InvalidArn(String),
1418}
1419
1420impl DeleteStateMachineError {
1421    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStateMachineError> {
1422        if let Some(err) = proto::json::Error::parse(&res) {
1423            match err.typ.as_str() {
1424                "InvalidArn" => {
1425                    return RusotoError::Service(DeleteStateMachineError::InvalidArn(err.msg))
1426                }
1427                "ValidationException" => return RusotoError::Validation(err.msg),
1428                _ => {}
1429            }
1430        }
1431        RusotoError::Unknown(res)
1432    }
1433}
1434impl fmt::Display for DeleteStateMachineError {
1435    #[allow(unused_variables)]
1436    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1437        match *self {
1438            DeleteStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
1439        }
1440    }
1441}
1442impl Error for DeleteStateMachineError {}
1443/// Errors returned by DescribeActivity
1444#[derive(Debug, PartialEq)]
1445pub enum DescribeActivityError {
1446    /// <p>The specified activity does not exist.</p>
1447    ActivityDoesNotExist(String),
1448    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1449    InvalidArn(String),
1450}
1451
1452impl DescribeActivityError {
1453    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeActivityError> {
1454        if let Some(err) = proto::json::Error::parse(&res) {
1455            match err.typ.as_str() {
1456                "ActivityDoesNotExist" => {
1457                    return RusotoError::Service(DescribeActivityError::ActivityDoesNotExist(
1458                        err.msg,
1459                    ))
1460                }
1461                "InvalidArn" => {
1462                    return RusotoError::Service(DescribeActivityError::InvalidArn(err.msg))
1463                }
1464                "ValidationException" => return RusotoError::Validation(err.msg),
1465                _ => {}
1466            }
1467        }
1468        RusotoError::Unknown(res)
1469    }
1470}
1471impl fmt::Display for DescribeActivityError {
1472    #[allow(unused_variables)]
1473    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1474        match *self {
1475            DescribeActivityError::ActivityDoesNotExist(ref cause) => write!(f, "{}", cause),
1476            DescribeActivityError::InvalidArn(ref cause) => write!(f, "{}", cause),
1477        }
1478    }
1479}
1480impl Error for DescribeActivityError {}
1481/// Errors returned by DescribeExecution
1482#[derive(Debug, PartialEq)]
1483pub enum DescribeExecutionError {
1484    /// <p>The specified execution does not exist.</p>
1485    ExecutionDoesNotExist(String),
1486    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1487    InvalidArn(String),
1488}
1489
1490impl DescribeExecutionError {
1491    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeExecutionError> {
1492        if let Some(err) = proto::json::Error::parse(&res) {
1493            match err.typ.as_str() {
1494                "ExecutionDoesNotExist" => {
1495                    return RusotoError::Service(DescribeExecutionError::ExecutionDoesNotExist(
1496                        err.msg,
1497                    ))
1498                }
1499                "InvalidArn" => {
1500                    return RusotoError::Service(DescribeExecutionError::InvalidArn(err.msg))
1501                }
1502                "ValidationException" => return RusotoError::Validation(err.msg),
1503                _ => {}
1504            }
1505        }
1506        RusotoError::Unknown(res)
1507    }
1508}
1509impl fmt::Display for DescribeExecutionError {
1510    #[allow(unused_variables)]
1511    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1512        match *self {
1513            DescribeExecutionError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
1514            DescribeExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
1515        }
1516    }
1517}
1518impl Error for DescribeExecutionError {}
1519/// Errors returned by DescribeStateMachine
1520#[derive(Debug, PartialEq)]
1521pub enum DescribeStateMachineError {
1522    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1523    InvalidArn(String),
1524    /// <p>The specified state machine does not exist.</p>
1525    StateMachineDoesNotExist(String),
1526}
1527
1528impl DescribeStateMachineError {
1529    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStateMachineError> {
1530        if let Some(err) = proto::json::Error::parse(&res) {
1531            match err.typ.as_str() {
1532                "InvalidArn" => {
1533                    return RusotoError::Service(DescribeStateMachineError::InvalidArn(err.msg))
1534                }
1535                "StateMachineDoesNotExist" => {
1536                    return RusotoError::Service(
1537                        DescribeStateMachineError::StateMachineDoesNotExist(err.msg),
1538                    )
1539                }
1540                "ValidationException" => return RusotoError::Validation(err.msg),
1541                _ => {}
1542            }
1543        }
1544        RusotoError::Unknown(res)
1545    }
1546}
1547impl fmt::Display for DescribeStateMachineError {
1548    #[allow(unused_variables)]
1549    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1550        match *self {
1551            DescribeStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
1552            DescribeStateMachineError::StateMachineDoesNotExist(ref cause) => {
1553                write!(f, "{}", cause)
1554            }
1555        }
1556    }
1557}
1558impl Error for DescribeStateMachineError {}
1559/// Errors returned by DescribeStateMachineForExecution
1560#[derive(Debug, PartialEq)]
1561pub enum DescribeStateMachineForExecutionError {
1562    /// <p>The specified execution does not exist.</p>
1563    ExecutionDoesNotExist(String),
1564    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1565    InvalidArn(String),
1566}
1567
1568impl DescribeStateMachineForExecutionError {
1569    pub fn from_response(
1570        res: BufferedHttpResponse,
1571    ) -> RusotoError<DescribeStateMachineForExecutionError> {
1572        if let Some(err) = proto::json::Error::parse(&res) {
1573            match err.typ.as_str() {
1574                "ExecutionDoesNotExist" => {
1575                    return RusotoError::Service(
1576                        DescribeStateMachineForExecutionError::ExecutionDoesNotExist(err.msg),
1577                    )
1578                }
1579                "InvalidArn" => {
1580                    return RusotoError::Service(DescribeStateMachineForExecutionError::InvalidArn(
1581                        err.msg,
1582                    ))
1583                }
1584                "ValidationException" => return RusotoError::Validation(err.msg),
1585                _ => {}
1586            }
1587        }
1588        RusotoError::Unknown(res)
1589    }
1590}
1591impl fmt::Display for DescribeStateMachineForExecutionError {
1592    #[allow(unused_variables)]
1593    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1594        match *self {
1595            DescribeStateMachineForExecutionError::ExecutionDoesNotExist(ref cause) => {
1596                write!(f, "{}", cause)
1597            }
1598            DescribeStateMachineForExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
1599        }
1600    }
1601}
1602impl Error for DescribeStateMachineForExecutionError {}
1603/// Errors returned by GetActivityTask
1604#[derive(Debug, PartialEq)]
1605pub enum GetActivityTaskError {
1606    /// <p>The specified activity does not exist.</p>
1607    ActivityDoesNotExist(String),
1608    /// <p>The maximum number of workers concurrently polling for activity tasks has been reached.</p>
1609    ActivityWorkerLimitExceeded(String),
1610    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1611    InvalidArn(String),
1612}
1613
1614impl GetActivityTaskError {
1615    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetActivityTaskError> {
1616        if let Some(err) = proto::json::Error::parse(&res) {
1617            match err.typ.as_str() {
1618                "ActivityDoesNotExist" => {
1619                    return RusotoError::Service(GetActivityTaskError::ActivityDoesNotExist(
1620                        err.msg,
1621                    ))
1622                }
1623                "ActivityWorkerLimitExceeded" => {
1624                    return RusotoError::Service(GetActivityTaskError::ActivityWorkerLimitExceeded(
1625                        err.msg,
1626                    ))
1627                }
1628                "InvalidArn" => {
1629                    return RusotoError::Service(GetActivityTaskError::InvalidArn(err.msg))
1630                }
1631                "ValidationException" => return RusotoError::Validation(err.msg),
1632                _ => {}
1633            }
1634        }
1635        RusotoError::Unknown(res)
1636    }
1637}
1638impl fmt::Display for GetActivityTaskError {
1639    #[allow(unused_variables)]
1640    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1641        match *self {
1642            GetActivityTaskError::ActivityDoesNotExist(ref cause) => write!(f, "{}", cause),
1643            GetActivityTaskError::ActivityWorkerLimitExceeded(ref cause) => write!(f, "{}", cause),
1644            GetActivityTaskError::InvalidArn(ref cause) => write!(f, "{}", cause),
1645        }
1646    }
1647}
1648impl Error for GetActivityTaskError {}
1649/// Errors returned by GetExecutionHistory
1650#[derive(Debug, PartialEq)]
1651pub enum GetExecutionHistoryError {
1652    /// <p>The specified execution does not exist.</p>
1653    ExecutionDoesNotExist(String),
1654    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1655    InvalidArn(String),
1656    /// <p>The provided token is invalid.</p>
1657    InvalidToken(String),
1658}
1659
1660impl GetExecutionHistoryError {
1661    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExecutionHistoryError> {
1662        if let Some(err) = proto::json::Error::parse(&res) {
1663            match err.typ.as_str() {
1664                "ExecutionDoesNotExist" => {
1665                    return RusotoError::Service(GetExecutionHistoryError::ExecutionDoesNotExist(
1666                        err.msg,
1667                    ))
1668                }
1669                "InvalidArn" => {
1670                    return RusotoError::Service(GetExecutionHistoryError::InvalidArn(err.msg))
1671                }
1672                "InvalidToken" => {
1673                    return RusotoError::Service(GetExecutionHistoryError::InvalidToken(err.msg))
1674                }
1675                "ValidationException" => return RusotoError::Validation(err.msg),
1676                _ => {}
1677            }
1678        }
1679        RusotoError::Unknown(res)
1680    }
1681}
1682impl fmt::Display for GetExecutionHistoryError {
1683    #[allow(unused_variables)]
1684    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1685        match *self {
1686            GetExecutionHistoryError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
1687            GetExecutionHistoryError::InvalidArn(ref cause) => write!(f, "{}", cause),
1688            GetExecutionHistoryError::InvalidToken(ref cause) => write!(f, "{}", cause),
1689        }
1690    }
1691}
1692impl Error for GetExecutionHistoryError {}
1693/// Errors returned by ListActivities
1694#[derive(Debug, PartialEq)]
1695pub enum ListActivitiesError {
1696    /// <p>The provided token is invalid.</p>
1697    InvalidToken(String),
1698}
1699
1700impl ListActivitiesError {
1701    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListActivitiesError> {
1702        if let Some(err) = proto::json::Error::parse(&res) {
1703            match err.typ.as_str() {
1704                "InvalidToken" => {
1705                    return RusotoError::Service(ListActivitiesError::InvalidToken(err.msg))
1706                }
1707                "ValidationException" => return RusotoError::Validation(err.msg),
1708                _ => {}
1709            }
1710        }
1711        RusotoError::Unknown(res)
1712    }
1713}
1714impl fmt::Display for ListActivitiesError {
1715    #[allow(unused_variables)]
1716    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1717        match *self {
1718            ListActivitiesError::InvalidToken(ref cause) => write!(f, "{}", cause),
1719        }
1720    }
1721}
1722impl Error for ListActivitiesError {}
1723/// Errors returned by ListExecutions
1724#[derive(Debug, PartialEq)]
1725pub enum ListExecutionsError {
1726    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1727    InvalidArn(String),
1728    /// <p>The provided token is invalid.</p>
1729    InvalidToken(String),
1730    /// <p>The specified state machine does not exist.</p>
1731    StateMachineDoesNotExist(String),
1732    /// <p><p/></p>
1733    StateMachineTypeNotSupported(String),
1734}
1735
1736impl ListExecutionsError {
1737    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListExecutionsError> {
1738        if let Some(err) = proto::json::Error::parse(&res) {
1739            match err.typ.as_str() {
1740                "InvalidArn" => {
1741                    return RusotoError::Service(ListExecutionsError::InvalidArn(err.msg))
1742                }
1743                "InvalidToken" => {
1744                    return RusotoError::Service(ListExecutionsError::InvalidToken(err.msg))
1745                }
1746                "StateMachineDoesNotExist" => {
1747                    return RusotoError::Service(ListExecutionsError::StateMachineDoesNotExist(
1748                        err.msg,
1749                    ))
1750                }
1751                "StateMachineTypeNotSupported" => {
1752                    return RusotoError::Service(ListExecutionsError::StateMachineTypeNotSupported(
1753                        err.msg,
1754                    ))
1755                }
1756                "ValidationException" => return RusotoError::Validation(err.msg),
1757                _ => {}
1758            }
1759        }
1760        RusotoError::Unknown(res)
1761    }
1762}
1763impl fmt::Display for ListExecutionsError {
1764    #[allow(unused_variables)]
1765    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1766        match *self {
1767            ListExecutionsError::InvalidArn(ref cause) => write!(f, "{}", cause),
1768            ListExecutionsError::InvalidToken(ref cause) => write!(f, "{}", cause),
1769            ListExecutionsError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
1770            ListExecutionsError::StateMachineTypeNotSupported(ref cause) => write!(f, "{}", cause),
1771        }
1772    }
1773}
1774impl Error for ListExecutionsError {}
1775/// Errors returned by ListStateMachines
1776#[derive(Debug, PartialEq)]
1777pub enum ListStateMachinesError {
1778    /// <p>The provided token is invalid.</p>
1779    InvalidToken(String),
1780}
1781
1782impl ListStateMachinesError {
1783    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStateMachinesError> {
1784        if let Some(err) = proto::json::Error::parse(&res) {
1785            match err.typ.as_str() {
1786                "InvalidToken" => {
1787                    return RusotoError::Service(ListStateMachinesError::InvalidToken(err.msg))
1788                }
1789                "ValidationException" => return RusotoError::Validation(err.msg),
1790                _ => {}
1791            }
1792        }
1793        RusotoError::Unknown(res)
1794    }
1795}
1796impl fmt::Display for ListStateMachinesError {
1797    #[allow(unused_variables)]
1798    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1799        match *self {
1800            ListStateMachinesError::InvalidToken(ref cause) => write!(f, "{}", cause),
1801        }
1802    }
1803}
1804impl Error for ListStateMachinesError {}
1805/// Errors returned by ListTagsForResource
1806#[derive(Debug, PartialEq)]
1807pub enum ListTagsForResourceError {
1808    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1809    InvalidArn(String),
1810    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
1811    ResourceNotFound(String),
1812}
1813
1814impl ListTagsForResourceError {
1815    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1816        if let Some(err) = proto::json::Error::parse(&res) {
1817            match err.typ.as_str() {
1818                "InvalidArn" => {
1819                    return RusotoError::Service(ListTagsForResourceError::InvalidArn(err.msg))
1820                }
1821                "ResourceNotFound" => {
1822                    return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
1823                        err.msg,
1824                    ))
1825                }
1826                "ValidationException" => return RusotoError::Validation(err.msg),
1827                _ => {}
1828            }
1829        }
1830        RusotoError::Unknown(res)
1831    }
1832}
1833impl fmt::Display for ListTagsForResourceError {
1834    #[allow(unused_variables)]
1835    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1836        match *self {
1837            ListTagsForResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
1838            ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1839        }
1840    }
1841}
1842impl Error for ListTagsForResourceError {}
1843/// Errors returned by SendTaskFailure
1844#[derive(Debug, PartialEq)]
1845pub enum SendTaskFailureError {
1846    /// <p>The provided token is invalid.</p>
1847    InvalidToken(String),
1848
1849    TaskDoesNotExist(String),
1850
1851    TaskTimedOut(String),
1852}
1853
1854impl SendTaskFailureError {
1855    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskFailureError> {
1856        if let Some(err) = proto::json::Error::parse(&res) {
1857            match err.typ.as_str() {
1858                "InvalidToken" => {
1859                    return RusotoError::Service(SendTaskFailureError::InvalidToken(err.msg))
1860                }
1861                "TaskDoesNotExist" => {
1862                    return RusotoError::Service(SendTaskFailureError::TaskDoesNotExist(err.msg))
1863                }
1864                "TaskTimedOut" => {
1865                    return RusotoError::Service(SendTaskFailureError::TaskTimedOut(err.msg))
1866                }
1867                "ValidationException" => return RusotoError::Validation(err.msg),
1868                _ => {}
1869            }
1870        }
1871        RusotoError::Unknown(res)
1872    }
1873}
1874impl fmt::Display for SendTaskFailureError {
1875    #[allow(unused_variables)]
1876    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1877        match *self {
1878            SendTaskFailureError::InvalidToken(ref cause) => write!(f, "{}", cause),
1879            SendTaskFailureError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
1880            SendTaskFailureError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
1881        }
1882    }
1883}
1884impl Error for SendTaskFailureError {}
1885/// Errors returned by SendTaskHeartbeat
1886#[derive(Debug, PartialEq)]
1887pub enum SendTaskHeartbeatError {
1888    /// <p>The provided token is invalid.</p>
1889    InvalidToken(String),
1890
1891    TaskDoesNotExist(String),
1892
1893    TaskTimedOut(String),
1894}
1895
1896impl SendTaskHeartbeatError {
1897    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskHeartbeatError> {
1898        if let Some(err) = proto::json::Error::parse(&res) {
1899            match err.typ.as_str() {
1900                "InvalidToken" => {
1901                    return RusotoError::Service(SendTaskHeartbeatError::InvalidToken(err.msg))
1902                }
1903                "TaskDoesNotExist" => {
1904                    return RusotoError::Service(SendTaskHeartbeatError::TaskDoesNotExist(err.msg))
1905                }
1906                "TaskTimedOut" => {
1907                    return RusotoError::Service(SendTaskHeartbeatError::TaskTimedOut(err.msg))
1908                }
1909                "ValidationException" => return RusotoError::Validation(err.msg),
1910                _ => {}
1911            }
1912        }
1913        RusotoError::Unknown(res)
1914    }
1915}
1916impl fmt::Display for SendTaskHeartbeatError {
1917    #[allow(unused_variables)]
1918    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1919        match *self {
1920            SendTaskHeartbeatError::InvalidToken(ref cause) => write!(f, "{}", cause),
1921            SendTaskHeartbeatError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
1922            SendTaskHeartbeatError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
1923        }
1924    }
1925}
1926impl Error for SendTaskHeartbeatError {}
1927/// Errors returned by SendTaskSuccess
1928#[derive(Debug, PartialEq)]
1929pub enum SendTaskSuccessError {
1930    /// <p>The provided JSON output data is invalid.</p>
1931    InvalidOutput(String),
1932    /// <p>The provided token is invalid.</p>
1933    InvalidToken(String),
1934
1935    TaskDoesNotExist(String),
1936
1937    TaskTimedOut(String),
1938}
1939
1940impl SendTaskSuccessError {
1941    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskSuccessError> {
1942        if let Some(err) = proto::json::Error::parse(&res) {
1943            match err.typ.as_str() {
1944                "InvalidOutput" => {
1945                    return RusotoError::Service(SendTaskSuccessError::InvalidOutput(err.msg))
1946                }
1947                "InvalidToken" => {
1948                    return RusotoError::Service(SendTaskSuccessError::InvalidToken(err.msg))
1949                }
1950                "TaskDoesNotExist" => {
1951                    return RusotoError::Service(SendTaskSuccessError::TaskDoesNotExist(err.msg))
1952                }
1953                "TaskTimedOut" => {
1954                    return RusotoError::Service(SendTaskSuccessError::TaskTimedOut(err.msg))
1955                }
1956                "ValidationException" => return RusotoError::Validation(err.msg),
1957                _ => {}
1958            }
1959        }
1960        RusotoError::Unknown(res)
1961    }
1962}
1963impl fmt::Display for SendTaskSuccessError {
1964    #[allow(unused_variables)]
1965    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1966        match *self {
1967            SendTaskSuccessError::InvalidOutput(ref cause) => write!(f, "{}", cause),
1968            SendTaskSuccessError::InvalidToken(ref cause) => write!(f, "{}", cause),
1969            SendTaskSuccessError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
1970            SendTaskSuccessError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
1971        }
1972    }
1973}
1974impl Error for SendTaskSuccessError {}
1975/// Errors returned by StartExecution
1976#[derive(Debug, PartialEq)]
1977pub enum StartExecutionError {
1978    /// <p><p>The execution has the same <code>name</code> as another execution (but a different <code>input</code>).</p> <note> <p>Executions with the same <code>name</code> and <code>input</code> are considered idempotent.</p> </note></p>
1979    ExecutionAlreadyExists(String),
1980    /// <p>The maximum number of running executions has been reached. Running executions must end or be stopped before a new execution can be started.</p>
1981    ExecutionLimitExceeded(String),
1982    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
1983    InvalidArn(String),
1984    /// <p>The provided JSON input data is invalid.</p>
1985    InvalidExecutionInput(String),
1986    /// <p>The provided name is invalid.</p>
1987    InvalidName(String),
1988    /// <p>The specified state machine is being deleted.</p>
1989    StateMachineDeleting(String),
1990    /// <p>The specified state machine does not exist.</p>
1991    StateMachineDoesNotExist(String),
1992}
1993
1994impl StartExecutionError {
1995    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartExecutionError> {
1996        if let Some(err) = proto::json::Error::parse(&res) {
1997            match err.typ.as_str() {
1998                "ExecutionAlreadyExists" => {
1999                    return RusotoError::Service(StartExecutionError::ExecutionAlreadyExists(
2000                        err.msg,
2001                    ))
2002                }
2003                "ExecutionLimitExceeded" => {
2004                    return RusotoError::Service(StartExecutionError::ExecutionLimitExceeded(
2005                        err.msg,
2006                    ))
2007                }
2008                "InvalidArn" => {
2009                    return RusotoError::Service(StartExecutionError::InvalidArn(err.msg))
2010                }
2011                "InvalidExecutionInput" => {
2012                    return RusotoError::Service(StartExecutionError::InvalidExecutionInput(
2013                        err.msg,
2014                    ))
2015                }
2016                "InvalidName" => {
2017                    return RusotoError::Service(StartExecutionError::InvalidName(err.msg))
2018                }
2019                "StateMachineDeleting" => {
2020                    return RusotoError::Service(StartExecutionError::StateMachineDeleting(err.msg))
2021                }
2022                "StateMachineDoesNotExist" => {
2023                    return RusotoError::Service(StartExecutionError::StateMachineDoesNotExist(
2024                        err.msg,
2025                    ))
2026                }
2027                "ValidationException" => return RusotoError::Validation(err.msg),
2028                _ => {}
2029            }
2030        }
2031        RusotoError::Unknown(res)
2032    }
2033}
2034impl fmt::Display for StartExecutionError {
2035    #[allow(unused_variables)]
2036    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2037        match *self {
2038            StartExecutionError::ExecutionAlreadyExists(ref cause) => write!(f, "{}", cause),
2039            StartExecutionError::ExecutionLimitExceeded(ref cause) => write!(f, "{}", cause),
2040            StartExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
2041            StartExecutionError::InvalidExecutionInput(ref cause) => write!(f, "{}", cause),
2042            StartExecutionError::InvalidName(ref cause) => write!(f, "{}", cause),
2043            StartExecutionError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
2044            StartExecutionError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
2045        }
2046    }
2047}
2048impl Error for StartExecutionError {}
2049/// Errors returned by StopExecution
2050#[derive(Debug, PartialEq)]
2051pub enum StopExecutionError {
2052    /// <p>The specified execution does not exist.</p>
2053    ExecutionDoesNotExist(String),
2054    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
2055    InvalidArn(String),
2056}
2057
2058impl StopExecutionError {
2059    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopExecutionError> {
2060        if let Some(err) = proto::json::Error::parse(&res) {
2061            match err.typ.as_str() {
2062                "ExecutionDoesNotExist" => {
2063                    return RusotoError::Service(StopExecutionError::ExecutionDoesNotExist(err.msg))
2064                }
2065                "InvalidArn" => {
2066                    return RusotoError::Service(StopExecutionError::InvalidArn(err.msg))
2067                }
2068                "ValidationException" => return RusotoError::Validation(err.msg),
2069                _ => {}
2070            }
2071        }
2072        RusotoError::Unknown(res)
2073    }
2074}
2075impl fmt::Display for StopExecutionError {
2076    #[allow(unused_variables)]
2077    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2078        match *self {
2079            StopExecutionError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
2080            StopExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
2081        }
2082    }
2083}
2084impl Error for StopExecutionError {}
2085/// Errors returned by TagResource
2086#[derive(Debug, PartialEq)]
2087pub enum TagResourceError {
2088    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
2089    InvalidArn(String),
2090    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
2091    ResourceNotFound(String),
2092    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
2093    TooManyTags(String),
2094}
2095
2096impl TagResourceError {
2097    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2098        if let Some(err) = proto::json::Error::parse(&res) {
2099            match err.typ.as_str() {
2100                "InvalidArn" => return RusotoError::Service(TagResourceError::InvalidArn(err.msg)),
2101                "ResourceNotFound" => {
2102                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
2103                }
2104                "TooManyTags" => {
2105                    return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
2106                }
2107                "ValidationException" => return RusotoError::Validation(err.msg),
2108                _ => {}
2109            }
2110        }
2111        RusotoError::Unknown(res)
2112    }
2113}
2114impl fmt::Display for TagResourceError {
2115    #[allow(unused_variables)]
2116    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2117        match *self {
2118            TagResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
2119            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2120            TagResourceError::TooManyTags(ref cause) => write!(f, "{}", cause),
2121        }
2122    }
2123}
2124impl Error for TagResourceError {}
2125/// Errors returned by UntagResource
2126#[derive(Debug, PartialEq)]
2127pub enum UntagResourceError {
2128    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
2129    InvalidArn(String),
2130    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
2131    ResourceNotFound(String),
2132}
2133
2134impl UntagResourceError {
2135    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2136        if let Some(err) = proto::json::Error::parse(&res) {
2137            match err.typ.as_str() {
2138                "InvalidArn" => {
2139                    return RusotoError::Service(UntagResourceError::InvalidArn(err.msg))
2140                }
2141                "ResourceNotFound" => {
2142                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
2143                }
2144                "ValidationException" => return RusotoError::Validation(err.msg),
2145                _ => {}
2146            }
2147        }
2148        RusotoError::Unknown(res)
2149    }
2150}
2151impl fmt::Display for UntagResourceError {
2152    #[allow(unused_variables)]
2153    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2154        match *self {
2155            UntagResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
2156            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2157        }
2158    }
2159}
2160impl Error for UntagResourceError {}
2161/// Errors returned by UpdateStateMachine
2162#[derive(Debug, PartialEq)]
2163pub enum UpdateStateMachineError {
2164    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
2165    InvalidArn(String),
2166    /// <p>The provided Amazon States Language definition is invalid.</p>
2167    InvalidDefinition(String),
2168    /// <p><p/></p>
2169    InvalidLoggingConfiguration(String),
2170    /// <p>Request is missing a required parameter. This error occurs if both <code>definition</code> and <code>roleArn</code> are not specified.</p>
2171    MissingRequiredParameter(String),
2172    /// <p>The specified state machine is being deleted.</p>
2173    StateMachineDeleting(String),
2174    /// <p>The specified state machine does not exist.</p>
2175    StateMachineDoesNotExist(String),
2176}
2177
2178impl UpdateStateMachineError {
2179    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStateMachineError> {
2180        if let Some(err) = proto::json::Error::parse(&res) {
2181            match err.typ.as_str() {
2182                "InvalidArn" => {
2183                    return RusotoError::Service(UpdateStateMachineError::InvalidArn(err.msg))
2184                }
2185                "InvalidDefinition" => {
2186                    return RusotoError::Service(UpdateStateMachineError::InvalidDefinition(
2187                        err.msg,
2188                    ))
2189                }
2190                "InvalidLoggingConfiguration" => {
2191                    return RusotoError::Service(
2192                        UpdateStateMachineError::InvalidLoggingConfiguration(err.msg),
2193                    )
2194                }
2195                "MissingRequiredParameter" => {
2196                    return RusotoError::Service(UpdateStateMachineError::MissingRequiredParameter(
2197                        err.msg,
2198                    ))
2199                }
2200                "StateMachineDeleting" => {
2201                    return RusotoError::Service(UpdateStateMachineError::StateMachineDeleting(
2202                        err.msg,
2203                    ))
2204                }
2205                "StateMachineDoesNotExist" => {
2206                    return RusotoError::Service(UpdateStateMachineError::StateMachineDoesNotExist(
2207                        err.msg,
2208                    ))
2209                }
2210                "ValidationException" => return RusotoError::Validation(err.msg),
2211                _ => {}
2212            }
2213        }
2214        RusotoError::Unknown(res)
2215    }
2216}
2217impl fmt::Display for UpdateStateMachineError {
2218    #[allow(unused_variables)]
2219    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2220        match *self {
2221            UpdateStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
2222            UpdateStateMachineError::InvalidDefinition(ref cause) => write!(f, "{}", cause),
2223            UpdateStateMachineError::InvalidLoggingConfiguration(ref cause) => {
2224                write!(f, "{}", cause)
2225            }
2226            UpdateStateMachineError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2227            UpdateStateMachineError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
2228            UpdateStateMachineError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
2229        }
2230    }
2231}
2232impl Error for UpdateStateMachineError {}
2233/// Trait representing the capabilities of the AWS SFN API. AWS SFN clients implement this trait.
2234#[async_trait]
2235pub trait StepFunctions {
2236    /// <p><p>Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the <code>GetActivityTask</code> API action and respond using <code>SendTask*</code> API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateActivity</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateActivity</code>&#39;s idempotency check is based on the activity <code>name</code>. If a following request has different <code>tags</code> values, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>tags</code> will not be updated, even if they are different.</p> </note></p>
2237    async fn create_activity(
2238        &self,
2239        input: CreateActivityInput,
2240    ) -> Result<CreateActivityOutput, RusotoError<CreateActivityError>>;
2241
2242    /// <p><p>Creates a state machine. A state machine consists of a collection of states that can do work (<code>Task</code> states), determine to which states to transition next (<code>Choice</code> states), stop an execution with an error (<code>Fail</code> states), and so on. State machines are specified using a JSON-based, structured language. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> in the AWS Step Functions User Guide.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateStateMachine</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateStateMachine</code>&#39;s idempotency check is based on the state machine <code>name</code>, <code>definition</code>, <code>type</code>, and <code>LoggingConfiguration</code>. If a following request has a different <code>roleArn</code> or <code>tags</code>, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>roleArn</code> and <code>tags</code> will not be updated, even if they are different.</p> </note></p>
2243    async fn create_state_machine(
2244        &self,
2245        input: CreateStateMachineInput,
2246    ) -> Result<CreateStateMachineOutput, RusotoError<CreateStateMachineError>>;
2247
2248    /// <p>Deletes an activity.</p>
2249    async fn delete_activity(
2250        &self,
2251        input: DeleteActivityInput,
2252    ) -> Result<DeleteActivityOutput, RusotoError<DeleteActivityError>>;
2253
2254    /// <p><p>Deletes a state machine. This is an asynchronous operation: It sets the state machine&#39;s status to <code>DELETING</code> and begins the deletion process. </p> <note> <p>For <code>EXPRESS</code>state machines, the deletion will happen eventually (usually less than a minute). Running executions may emit logs after <code>DeleteStateMachine</code> API is called.</p> </note></p>
2255    async fn delete_state_machine(
2256        &self,
2257        input: DeleteStateMachineInput,
2258    ) -> Result<DeleteStateMachineOutput, RusotoError<DeleteStateMachineError>>;
2259
2260    /// <p><p>Describes an activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2261    async fn describe_activity(
2262        &self,
2263        input: DescribeActivityInput,
2264    ) -> Result<DescribeActivityOutput, RusotoError<DescribeActivityError>>;
2265
2266    /// <p>Describes an execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2267    async fn describe_execution(
2268        &self,
2269        input: DescribeExecutionInput,
2270    ) -> Result<DescribeExecutionOutput, RusotoError<DescribeExecutionError>>;
2271
2272    /// <p><p>Describes a state machine.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2273    async fn describe_state_machine(
2274        &self,
2275        input: DescribeStateMachineInput,
2276    ) -> Result<DescribeStateMachineOutput, RusotoError<DescribeStateMachineError>>;
2277
2278    /// <p>Describes the state machine associated with a specific execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2279    async fn describe_state_machine_for_execution(
2280        &self,
2281        input: DescribeStateMachineForExecutionInput,
2282    ) -> Result<
2283        DescribeStateMachineForExecutionOutput,
2284        RusotoError<DescribeStateMachineForExecutionError>,
2285    >;
2286
2287    /// <p><p>Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns a <code>taskToken</code> with a null string.</p> <important> <p>Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum time the service may hold the poll request).</p> <p>Polling with <code>GetActivityTask</code> can cause latency in some implementations. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html">Avoid Latency When Polling for Activity Tasks</a> in the Step Functions Developer Guide.</p> </important></p>
2288    async fn get_activity_task(
2289        &self,
2290        input: GetActivityTaskInput,
2291    ) -> Result<GetActivityTaskOutput, RusotoError<GetActivityTaskError>>;
2292
2293    /// <p>Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the <code>timeStamp</code> of the events. Use the <code>reverseOrder</code> parameter to get the latest events first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2294    async fn get_execution_history(
2295        &self,
2296        input: GetExecutionHistoryInput,
2297    ) -> Result<GetExecutionHistoryOutput, RusotoError<GetExecutionHistoryError>>;
2298
2299    /// <p><p>Lists the existing activities.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2300    async fn list_activities(
2301        &self,
2302        input: ListActivitiesInput,
2303    ) -> Result<ListActivitiesOutput, RusotoError<ListActivitiesError>>;
2304
2305    /// <p>Lists the executions of a state machine that meet the filtering criteria. Results are sorted by time, with the most recent execution first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2306    async fn list_executions(
2307        &self,
2308        input: ListExecutionsInput,
2309    ) -> Result<ListExecutionsOutput, RusotoError<ListExecutionsError>>;
2310
2311    /// <p><p>Lists the existing state machines.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2312    async fn list_state_machines(
2313        &self,
2314        input: ListStateMachinesInput,
2315    ) -> Result<ListStateMachinesOutput, RusotoError<ListStateMachinesError>>;
2316
2317    /// <p>List tags for a given resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
2318    async fn list_tags_for_resource(
2319        &self,
2320        input: ListTagsForResourceInput,
2321    ) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>>;
2322
2323    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> failed.</p>
2324    async fn send_task_failure(
2325        &self,
2326        input: SendTaskFailureInput,
2327    ) -> Result<SendTaskFailureOutput, RusotoError<SendTaskFailureError>>;
2328
2329    /// <p><p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report to Step Functions that the task represented by the specified <code>taskToken</code> is still making progress. This action resets the <code>Heartbeat</code> clock. The <code>Heartbeat</code> threshold is specified in the state machine&#39;s Amazon States Language definition (<code>HeartbeatSeconds</code>). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains an <code>ActivityTimedOut</code> entry for activities, or a <code>TaskTimedOut</code> entry for for tasks using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a> or <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern.</p> <note> <p>The <code>Timeout</code> of a task, defined in the state machine&#39;s Amazon States Language definition, is its maximum allowed duration, regardless of the number of <a>SendTaskHeartbeat</a> requests received. Use <code>HeartbeatSeconds</code> to configure the timeout interval for heartbeats.</p> </note></p>
2330    async fn send_task_heartbeat(
2331        &self,
2332        input: SendTaskHeartbeatInput,
2333    ) -> Result<SendTaskHeartbeatOutput, RusotoError<SendTaskHeartbeatError>>;
2334
2335    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> completed successfully.</p>
2336    async fn send_task_success(
2337        &self,
2338        input: SendTaskSuccessInput,
2339    ) -> Result<SendTaskSuccessOutput, RusotoError<SendTaskSuccessError>>;
2340
2341    /// <p><p>Starts a state machine execution.</p> <note> <p> <code>StartExecution</code> is idempotent. If <code>StartExecution</code> is called with the same name and input as a running execution, the call will succeed and return the same response as the original request. If the execution is closed or if the input is different, it will return a 400 <code>ExecutionAlreadyExists</code> error. Names can be reused after 90 days. </p> </note></p>
2342    async fn start_execution(
2343        &self,
2344        input: StartExecutionInput,
2345    ) -> Result<StartExecutionOutput, RusotoError<StartExecutionError>>;
2346
2347    /// <p>Stops an execution.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2348    async fn stop_execution(
2349        &self,
2350        input: StopExecutionInput,
2351    ) -> Result<StopExecutionOutput, RusotoError<StopExecutionError>>;
2352
2353    /// <p>Add a tag to a Step Functions resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
2354    async fn tag_resource(
2355        &self,
2356        input: TagResourceInput,
2357    ) -> Result<TagResourceOutput, RusotoError<TagResourceError>>;
2358
2359    /// <p>Remove a tag from a Step Functions resource</p>
2360    async fn untag_resource(
2361        &self,
2362        input: UntagResourceInput,
2363    ) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>>;
2364
2365    /// <p><p>Updates an existing state machine by modifying its <code>definition</code>, <code>roleArn</code>, or <code>loggingConfiguration</code>. Running executions will continue to use the previous <code>definition</code> and <code>roleArn</code>. You must include at least one of <code>definition</code> or <code>roleArn</code> or you will receive a <code>MissingRequiredParameter</code> error.</p> <note> <p>All <code>StartExecution</code> calls within a few seconds will use the updated <code>definition</code> and <code>roleArn</code>. Executions started immediately after calling <code>UpdateStateMachine</code> may use the previous state machine <code>definition</code> and <code>roleArn</code>. </p> </note></p>
2366    async fn update_state_machine(
2367        &self,
2368        input: UpdateStateMachineInput,
2369    ) -> Result<UpdateStateMachineOutput, RusotoError<UpdateStateMachineError>>;
2370}
2371/// A client for the AWS SFN API.
2372#[derive(Clone)]
2373pub struct StepFunctionsClient {
2374    client: Client,
2375    region: region::Region,
2376}
2377
2378impl StepFunctionsClient {
2379    /// Creates a client backed by the default tokio event loop.
2380    ///
2381    /// The client will use the default credentials provider and tls client.
2382    pub fn new(region: region::Region) -> StepFunctionsClient {
2383        StepFunctionsClient {
2384            client: Client::shared(),
2385            region,
2386        }
2387    }
2388
2389    pub fn new_with<P, D>(
2390        request_dispatcher: D,
2391        credentials_provider: P,
2392        region: region::Region,
2393    ) -> StepFunctionsClient
2394    where
2395        P: ProvideAwsCredentials + Send + Sync + 'static,
2396        D: DispatchSignedRequest + Send + Sync + 'static,
2397    {
2398        StepFunctionsClient {
2399            client: Client::new_with(credentials_provider, request_dispatcher),
2400            region,
2401        }
2402    }
2403
2404    pub fn new_with_client(client: Client, region: region::Region) -> StepFunctionsClient {
2405        StepFunctionsClient { client, region }
2406    }
2407}
2408
2409#[async_trait]
2410impl StepFunctions for StepFunctionsClient {
2411    /// <p><p>Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the <code>GetActivityTask</code> API action and respond using <code>SendTask*</code> API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateActivity</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateActivity</code>&#39;s idempotency check is based on the activity <code>name</code>. If a following request has different <code>tags</code> values, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>tags</code> will not be updated, even if they are different.</p> </note></p>
2412    async fn create_activity(
2413        &self,
2414        input: CreateActivityInput,
2415    ) -> Result<CreateActivityOutput, RusotoError<CreateActivityError>> {
2416        let mut request = self.new_signed_request("POST", "/");
2417        request.add_header("x-amz-target", "AWSStepFunctions.CreateActivity");
2418        let encoded = serde_json::to_string(&input).unwrap();
2419        request.set_payload(Some(encoded));
2420
2421        let response = self
2422            .sign_and_dispatch(request, CreateActivityError::from_response)
2423            .await?;
2424        let mut response = response;
2425        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2426        proto::json::ResponsePayload::new(&response).deserialize::<CreateActivityOutput, _>()
2427    }
2428
2429    /// <p><p>Creates a state machine. A state machine consists of a collection of states that can do work (<code>Task</code> states), determine to which states to transition next (<code>Choice</code> states), stop an execution with an error (<code>Fail</code> states), and so on. State machines are specified using a JSON-based, structured language. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> in the AWS Step Functions User Guide.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateStateMachine</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateStateMachine</code>&#39;s idempotency check is based on the state machine <code>name</code>, <code>definition</code>, <code>type</code>, and <code>LoggingConfiguration</code>. If a following request has a different <code>roleArn</code> or <code>tags</code>, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>roleArn</code> and <code>tags</code> will not be updated, even if they are different.</p> </note></p>
2430    async fn create_state_machine(
2431        &self,
2432        input: CreateStateMachineInput,
2433    ) -> Result<CreateStateMachineOutput, RusotoError<CreateStateMachineError>> {
2434        let mut request = self.new_signed_request("POST", "/");
2435        request.add_header("x-amz-target", "AWSStepFunctions.CreateStateMachine");
2436        let encoded = serde_json::to_string(&input).unwrap();
2437        request.set_payload(Some(encoded));
2438
2439        let response = self
2440            .sign_and_dispatch(request, CreateStateMachineError::from_response)
2441            .await?;
2442        let mut response = response;
2443        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2444        proto::json::ResponsePayload::new(&response).deserialize::<CreateStateMachineOutput, _>()
2445    }
2446
2447    /// <p>Deletes an activity.</p>
2448    async fn delete_activity(
2449        &self,
2450        input: DeleteActivityInput,
2451    ) -> Result<DeleteActivityOutput, RusotoError<DeleteActivityError>> {
2452        let mut request = self.new_signed_request("POST", "/");
2453        request.add_header("x-amz-target", "AWSStepFunctions.DeleteActivity");
2454        let encoded = serde_json::to_string(&input).unwrap();
2455        request.set_payload(Some(encoded));
2456
2457        let response = self
2458            .sign_and_dispatch(request, DeleteActivityError::from_response)
2459            .await?;
2460        let mut response = response;
2461        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2462        proto::json::ResponsePayload::new(&response).deserialize::<DeleteActivityOutput, _>()
2463    }
2464
2465    /// <p><p>Deletes a state machine. This is an asynchronous operation: It sets the state machine&#39;s status to <code>DELETING</code> and begins the deletion process. </p> <note> <p>For <code>EXPRESS</code>state machines, the deletion will happen eventually (usually less than a minute). Running executions may emit logs after <code>DeleteStateMachine</code> API is called.</p> </note></p>
2466    async fn delete_state_machine(
2467        &self,
2468        input: DeleteStateMachineInput,
2469    ) -> Result<DeleteStateMachineOutput, RusotoError<DeleteStateMachineError>> {
2470        let mut request = self.new_signed_request("POST", "/");
2471        request.add_header("x-amz-target", "AWSStepFunctions.DeleteStateMachine");
2472        let encoded = serde_json::to_string(&input).unwrap();
2473        request.set_payload(Some(encoded));
2474
2475        let response = self
2476            .sign_and_dispatch(request, DeleteStateMachineError::from_response)
2477            .await?;
2478        let mut response = response;
2479        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2480        proto::json::ResponsePayload::new(&response).deserialize::<DeleteStateMachineOutput, _>()
2481    }
2482
2483    /// <p><p>Describes an activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2484    async fn describe_activity(
2485        &self,
2486        input: DescribeActivityInput,
2487    ) -> Result<DescribeActivityOutput, RusotoError<DescribeActivityError>> {
2488        let mut request = self.new_signed_request("POST", "/");
2489        request.add_header("x-amz-target", "AWSStepFunctions.DescribeActivity");
2490        let encoded = serde_json::to_string(&input).unwrap();
2491        request.set_payload(Some(encoded));
2492
2493        let response = self
2494            .sign_and_dispatch(request, DescribeActivityError::from_response)
2495            .await?;
2496        let mut response = response;
2497        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2498        proto::json::ResponsePayload::new(&response).deserialize::<DescribeActivityOutput, _>()
2499    }
2500
2501    /// <p>Describes an execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2502    async fn describe_execution(
2503        &self,
2504        input: DescribeExecutionInput,
2505    ) -> Result<DescribeExecutionOutput, RusotoError<DescribeExecutionError>> {
2506        let mut request = self.new_signed_request("POST", "/");
2507        request.add_header("x-amz-target", "AWSStepFunctions.DescribeExecution");
2508        let encoded = serde_json::to_string(&input).unwrap();
2509        request.set_payload(Some(encoded));
2510
2511        let response = self
2512            .sign_and_dispatch(request, DescribeExecutionError::from_response)
2513            .await?;
2514        let mut response = response;
2515        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2516        proto::json::ResponsePayload::new(&response).deserialize::<DescribeExecutionOutput, _>()
2517    }
2518
2519    /// <p><p>Describes a state machine.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2520    async fn describe_state_machine(
2521        &self,
2522        input: DescribeStateMachineInput,
2523    ) -> Result<DescribeStateMachineOutput, RusotoError<DescribeStateMachineError>> {
2524        let mut request = self.new_signed_request("POST", "/");
2525        request.add_header("x-amz-target", "AWSStepFunctions.DescribeStateMachine");
2526        let encoded = serde_json::to_string(&input).unwrap();
2527        request.set_payload(Some(encoded));
2528
2529        let response = self
2530            .sign_and_dispatch(request, DescribeStateMachineError::from_response)
2531            .await?;
2532        let mut response = response;
2533        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2534        proto::json::ResponsePayload::new(&response).deserialize::<DescribeStateMachineOutput, _>()
2535    }
2536
2537    /// <p>Describes the state machine associated with a specific execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2538    async fn describe_state_machine_for_execution(
2539        &self,
2540        input: DescribeStateMachineForExecutionInput,
2541    ) -> Result<
2542        DescribeStateMachineForExecutionOutput,
2543        RusotoError<DescribeStateMachineForExecutionError>,
2544    > {
2545        let mut request = self.new_signed_request("POST", "/");
2546        request.add_header(
2547            "x-amz-target",
2548            "AWSStepFunctions.DescribeStateMachineForExecution",
2549        );
2550        let encoded = serde_json::to_string(&input).unwrap();
2551        request.set_payload(Some(encoded));
2552
2553        let response = self
2554            .sign_and_dispatch(
2555                request,
2556                DescribeStateMachineForExecutionError::from_response,
2557            )
2558            .await?;
2559        let mut response = response;
2560        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2561        proto::json::ResponsePayload::new(&response)
2562            .deserialize::<DescribeStateMachineForExecutionOutput, _>()
2563    }
2564
2565    /// <p><p>Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns a <code>taskToken</code> with a null string.</p> <important> <p>Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum time the service may hold the poll request).</p> <p>Polling with <code>GetActivityTask</code> can cause latency in some implementations. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html">Avoid Latency When Polling for Activity Tasks</a> in the Step Functions Developer Guide.</p> </important></p>
2566    async fn get_activity_task(
2567        &self,
2568        input: GetActivityTaskInput,
2569    ) -> Result<GetActivityTaskOutput, RusotoError<GetActivityTaskError>> {
2570        let mut request = self.new_signed_request("POST", "/");
2571        request.add_header("x-amz-target", "AWSStepFunctions.GetActivityTask");
2572        let encoded = serde_json::to_string(&input).unwrap();
2573        request.set_payload(Some(encoded));
2574
2575        let response = self
2576            .sign_and_dispatch(request, GetActivityTaskError::from_response)
2577            .await?;
2578        let mut response = response;
2579        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2580        proto::json::ResponsePayload::new(&response).deserialize::<GetActivityTaskOutput, _>()
2581    }
2582
2583    /// <p>Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the <code>timeStamp</code> of the events. Use the <code>reverseOrder</code> parameter to get the latest events first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2584    async fn get_execution_history(
2585        &self,
2586        input: GetExecutionHistoryInput,
2587    ) -> Result<GetExecutionHistoryOutput, RusotoError<GetExecutionHistoryError>> {
2588        let mut request = self.new_signed_request("POST", "/");
2589        request.add_header("x-amz-target", "AWSStepFunctions.GetExecutionHistory");
2590        let encoded = serde_json::to_string(&input).unwrap();
2591        request.set_payload(Some(encoded));
2592
2593        let response = self
2594            .sign_and_dispatch(request, GetExecutionHistoryError::from_response)
2595            .await?;
2596        let mut response = response;
2597        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2598        proto::json::ResponsePayload::new(&response).deserialize::<GetExecutionHistoryOutput, _>()
2599    }
2600
2601    /// <p><p>Lists the existing activities.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2602    async fn list_activities(
2603        &self,
2604        input: ListActivitiesInput,
2605    ) -> Result<ListActivitiesOutput, RusotoError<ListActivitiesError>> {
2606        let mut request = self.new_signed_request("POST", "/");
2607        request.add_header("x-amz-target", "AWSStepFunctions.ListActivities");
2608        let encoded = serde_json::to_string(&input).unwrap();
2609        request.set_payload(Some(encoded));
2610
2611        let response = self
2612            .sign_and_dispatch(request, ListActivitiesError::from_response)
2613            .await?;
2614        let mut response = response;
2615        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2616        proto::json::ResponsePayload::new(&response).deserialize::<ListActivitiesOutput, _>()
2617    }
2618
2619    /// <p>Lists the executions of a state machine that meet the filtering criteria. Results are sorted by time, with the most recent execution first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2620    async fn list_executions(
2621        &self,
2622        input: ListExecutionsInput,
2623    ) -> Result<ListExecutionsOutput, RusotoError<ListExecutionsError>> {
2624        let mut request = self.new_signed_request("POST", "/");
2625        request.add_header("x-amz-target", "AWSStepFunctions.ListExecutions");
2626        let encoded = serde_json::to_string(&input).unwrap();
2627        request.set_payload(Some(encoded));
2628
2629        let response = self
2630            .sign_and_dispatch(request, ListExecutionsError::from_response)
2631            .await?;
2632        let mut response = response;
2633        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2634        proto::json::ResponsePayload::new(&response).deserialize::<ListExecutionsOutput, _>()
2635    }
2636
2637    /// <p><p>Lists the existing state machines.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
2638    async fn list_state_machines(
2639        &self,
2640        input: ListStateMachinesInput,
2641    ) -> Result<ListStateMachinesOutput, RusotoError<ListStateMachinesError>> {
2642        let mut request = self.new_signed_request("POST", "/");
2643        request.add_header("x-amz-target", "AWSStepFunctions.ListStateMachines");
2644        let encoded = serde_json::to_string(&input).unwrap();
2645        request.set_payload(Some(encoded));
2646
2647        let response = self
2648            .sign_and_dispatch(request, ListStateMachinesError::from_response)
2649            .await?;
2650        let mut response = response;
2651        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2652        proto::json::ResponsePayload::new(&response).deserialize::<ListStateMachinesOutput, _>()
2653    }
2654
2655    /// <p>List tags for a given resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
2656    async fn list_tags_for_resource(
2657        &self,
2658        input: ListTagsForResourceInput,
2659    ) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>> {
2660        let mut request = self.new_signed_request("POST", "/");
2661        request.add_header("x-amz-target", "AWSStepFunctions.ListTagsForResource");
2662        let encoded = serde_json::to_string(&input).unwrap();
2663        request.set_payload(Some(encoded));
2664
2665        let response = self
2666            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2667            .await?;
2668        let mut response = response;
2669        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2670        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceOutput, _>()
2671    }
2672
2673    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> failed.</p>
2674    async fn send_task_failure(
2675        &self,
2676        input: SendTaskFailureInput,
2677    ) -> Result<SendTaskFailureOutput, RusotoError<SendTaskFailureError>> {
2678        let mut request = self.new_signed_request("POST", "/");
2679        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskFailure");
2680        let encoded = serde_json::to_string(&input).unwrap();
2681        request.set_payload(Some(encoded));
2682
2683        let response = self
2684            .sign_and_dispatch(request, SendTaskFailureError::from_response)
2685            .await?;
2686        let mut response = response;
2687        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2688        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskFailureOutput, _>()
2689    }
2690
2691    /// <p><p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report to Step Functions that the task represented by the specified <code>taskToken</code> is still making progress. This action resets the <code>Heartbeat</code> clock. The <code>Heartbeat</code> threshold is specified in the state machine&#39;s Amazon States Language definition (<code>HeartbeatSeconds</code>). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains an <code>ActivityTimedOut</code> entry for activities, or a <code>TaskTimedOut</code> entry for for tasks using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a> or <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern.</p> <note> <p>The <code>Timeout</code> of a task, defined in the state machine&#39;s Amazon States Language definition, is its maximum allowed duration, regardless of the number of <a>SendTaskHeartbeat</a> requests received. Use <code>HeartbeatSeconds</code> to configure the timeout interval for heartbeats.</p> </note></p>
2692    async fn send_task_heartbeat(
2693        &self,
2694        input: SendTaskHeartbeatInput,
2695    ) -> Result<SendTaskHeartbeatOutput, RusotoError<SendTaskHeartbeatError>> {
2696        let mut request = self.new_signed_request("POST", "/");
2697        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskHeartbeat");
2698        let encoded = serde_json::to_string(&input).unwrap();
2699        request.set_payload(Some(encoded));
2700
2701        let response = self
2702            .sign_and_dispatch(request, SendTaskHeartbeatError::from_response)
2703            .await?;
2704        let mut response = response;
2705        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2706        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskHeartbeatOutput, _>()
2707    }
2708
2709    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> completed successfully.</p>
2710    async fn send_task_success(
2711        &self,
2712        input: SendTaskSuccessInput,
2713    ) -> Result<SendTaskSuccessOutput, RusotoError<SendTaskSuccessError>> {
2714        let mut request = self.new_signed_request("POST", "/");
2715        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskSuccess");
2716        let encoded = serde_json::to_string(&input).unwrap();
2717        request.set_payload(Some(encoded));
2718
2719        let response = self
2720            .sign_and_dispatch(request, SendTaskSuccessError::from_response)
2721            .await?;
2722        let mut response = response;
2723        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2724        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskSuccessOutput, _>()
2725    }
2726
2727    /// <p><p>Starts a state machine execution.</p> <note> <p> <code>StartExecution</code> is idempotent. If <code>StartExecution</code> is called with the same name and input as a running execution, the call will succeed and return the same response as the original request. If the execution is closed or if the input is different, it will return a 400 <code>ExecutionAlreadyExists</code> error. Names can be reused after 90 days. </p> </note></p>
2728    async fn start_execution(
2729        &self,
2730        input: StartExecutionInput,
2731    ) -> Result<StartExecutionOutput, RusotoError<StartExecutionError>> {
2732        let mut request = self.new_signed_request("POST", "/");
2733        request.add_header("x-amz-target", "AWSStepFunctions.StartExecution");
2734        let encoded = serde_json::to_string(&input).unwrap();
2735        request.set_payload(Some(encoded));
2736
2737        let response = self
2738            .sign_and_dispatch(request, StartExecutionError::from_response)
2739            .await?;
2740        let mut response = response;
2741        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2742        proto::json::ResponsePayload::new(&response).deserialize::<StartExecutionOutput, _>()
2743    }
2744
2745    /// <p>Stops an execution.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
2746    async fn stop_execution(
2747        &self,
2748        input: StopExecutionInput,
2749    ) -> Result<StopExecutionOutput, RusotoError<StopExecutionError>> {
2750        let mut request = self.new_signed_request("POST", "/");
2751        request.add_header("x-amz-target", "AWSStepFunctions.StopExecution");
2752        let encoded = serde_json::to_string(&input).unwrap();
2753        request.set_payload(Some(encoded));
2754
2755        let response = self
2756            .sign_and_dispatch(request, StopExecutionError::from_response)
2757            .await?;
2758        let mut response = response;
2759        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2760        proto::json::ResponsePayload::new(&response).deserialize::<StopExecutionOutput, _>()
2761    }
2762
2763    /// <p>Add a tag to a Step Functions resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
2764    async fn tag_resource(
2765        &self,
2766        input: TagResourceInput,
2767    ) -> Result<TagResourceOutput, RusotoError<TagResourceError>> {
2768        let mut request = self.new_signed_request("POST", "/");
2769        request.add_header("x-amz-target", "AWSStepFunctions.TagResource");
2770        let encoded = serde_json::to_string(&input).unwrap();
2771        request.set_payload(Some(encoded));
2772
2773        let response = self
2774            .sign_and_dispatch(request, TagResourceError::from_response)
2775            .await?;
2776        let mut response = response;
2777        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2778        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceOutput, _>()
2779    }
2780
2781    /// <p>Remove a tag from a Step Functions resource</p>
2782    async fn untag_resource(
2783        &self,
2784        input: UntagResourceInput,
2785    ) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>> {
2786        let mut request = self.new_signed_request("POST", "/");
2787        request.add_header("x-amz-target", "AWSStepFunctions.UntagResource");
2788        let encoded = serde_json::to_string(&input).unwrap();
2789        request.set_payload(Some(encoded));
2790
2791        let response = self
2792            .sign_and_dispatch(request, UntagResourceError::from_response)
2793            .await?;
2794        let mut response = response;
2795        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2796        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceOutput, _>()
2797    }
2798
2799    /// <p><p>Updates an existing state machine by modifying its <code>definition</code>, <code>roleArn</code>, or <code>loggingConfiguration</code>. Running executions will continue to use the previous <code>definition</code> and <code>roleArn</code>. You must include at least one of <code>definition</code> or <code>roleArn</code> or you will receive a <code>MissingRequiredParameter</code> error.</p> <note> <p>All <code>StartExecution</code> calls within a few seconds will use the updated <code>definition</code> and <code>roleArn</code>. Executions started immediately after calling <code>UpdateStateMachine</code> may use the previous state machine <code>definition</code> and <code>roleArn</code>. </p> </note></p>
2800    async fn update_state_machine(
2801        &self,
2802        input: UpdateStateMachineInput,
2803    ) -> Result<UpdateStateMachineOutput, RusotoError<UpdateStateMachineError>> {
2804        let mut request = self.new_signed_request("POST", "/");
2805        request.add_header("x-amz-target", "AWSStepFunctions.UpdateStateMachine");
2806        let encoded = serde_json::to_string(&input).unwrap();
2807        request.set_payload(Some(encoded));
2808
2809        let response = self
2810            .sign_and_dispatch(request, UpdateStateMachineError::from_response)
2811            .await?;
2812        let mut response = response;
2813        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2814        proto::json::ResponsePayload::new(&response).deserialize::<UpdateStateMachineOutput, _>()
2815    }
2816}