aws-sdk-states 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3ff154aca218ce1c810c5b4f0aa3dbddb7669ca3
4
+ data.tar.gz: e41a8695d44b0047cd5b504e1fee5e609e96ed2e
5
+ SHA512:
6
+ metadata.gz: e7c72dfcae2670e49bef6f07bec4d341216eb00f9068ddb28354a7ec10c2f5b56ebc9a00e116c6b2a3a2761dcbb1953bda3cf82ddf3dbe51319ed0951bc8722c
7
+ data.tar.gz: 119784161892cfd64e3d8e5dada76d9f0271487040ff0944380e1eeab8035c3a784284e23a1686850d1e708cbe91f54b398bae1dee1f055e770d5314825b24f4
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-states/types'
12
+ require_relative 'aws-sdk-states/client_api'
13
+ require_relative 'aws-sdk-states/client'
14
+ require_relative 'aws-sdk-states/errors'
15
+ require_relative 'aws-sdk-states/resource'
16
+ require_relative 'aws-sdk-states/customizations'
17
+
18
+ # This module provides support for AWS Step Functions. This module is available in the
19
+ # `aws-sdk-states` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS Step Functions all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::States::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::States
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,910 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
22
+ require 'aws-sdk-core/plugins/signature_v4.rb'
23
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
24
+
25
+ Aws::Plugins::GlobalConfiguration.add_identifier(:states)
26
+
27
+ module Aws::States
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :states
33
+
34
+ set_api(ClientApi::API)
35
+
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
52
+
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
155
+
156
+ # @!group API Operations
157
+
158
+ # Creates an activity.
159
+ #
160
+ # @option params [required, String] :name
161
+ # The name of the activity to create. This name must be unique for your
162
+ # AWS account and region.
163
+ #
164
+ # @return [Types::CreateActivityOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
165
+ #
166
+ # * {Types::CreateActivityOutput#activity_arn #activity_arn} => String
167
+ # * {Types::CreateActivityOutput#creation_date #creation_date} => Time
168
+ #
169
+ # @example Request syntax with placeholder values
170
+ #
171
+ # resp = client.create_activity({
172
+ # name: "Name", # required
173
+ # })
174
+ #
175
+ # @example Response structure
176
+ #
177
+ # resp.activity_arn #=> String
178
+ # resp.creation_date #=> Time
179
+ #
180
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateActivity AWS API Documentation
181
+ #
182
+ # @overload create_activity(params = {})
183
+ # @param [Hash] params ({})
184
+ def create_activity(params = {}, options = {})
185
+ req = build_request(:create_activity, params)
186
+ req.send_request(options)
187
+ end
188
+
189
+ # Creates a state machine.
190
+ #
191
+ # @option params [required, String] :name
192
+ # The name of the state machine. This name must be unique for your AWS
193
+ # account and region.
194
+ #
195
+ # @option params [required, String] :definition
196
+ # The Amazon States Language definition of the state machine.
197
+ #
198
+ # @option params [required, String] :role_arn
199
+ # The Amazon Resource Name (ARN) of the IAM role to use for this state
200
+ # machine.
201
+ #
202
+ # @return [Types::CreateStateMachineOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
203
+ #
204
+ # * {Types::CreateStateMachineOutput#state_machine_arn #state_machine_arn} => String
205
+ # * {Types::CreateStateMachineOutput#creation_date #creation_date} => Time
206
+ #
207
+ # @example Request syntax with placeholder values
208
+ #
209
+ # resp = client.create_state_machine({
210
+ # name: "Name", # required
211
+ # definition: "Definition", # required
212
+ # role_arn: "Arn", # required
213
+ # })
214
+ #
215
+ # @example Response structure
216
+ #
217
+ # resp.state_machine_arn #=> String
218
+ # resp.creation_date #=> Time
219
+ #
220
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateStateMachine AWS API Documentation
221
+ #
222
+ # @overload create_state_machine(params = {})
223
+ # @param [Hash] params ({})
224
+ def create_state_machine(params = {}, options = {})
225
+ req = build_request(:create_state_machine, params)
226
+ req.send_request(options)
227
+ end
228
+
229
+ # Deletes an activity.
230
+ #
231
+ # @option params [required, String] :activity_arn
232
+ # The Amazon Resource Name (ARN) of the activity to delete.
233
+ #
234
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
235
+ #
236
+ # @example Request syntax with placeholder values
237
+ #
238
+ # resp = client.delete_activity({
239
+ # activity_arn: "Arn", # required
240
+ # })
241
+ #
242
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteActivity AWS API Documentation
243
+ #
244
+ # @overload delete_activity(params = {})
245
+ # @param [Hash] params ({})
246
+ def delete_activity(params = {}, options = {})
247
+ req = build_request(:delete_activity, params)
248
+ req.send_request(options)
249
+ end
250
+
251
+ # Deletes a state machine. This is an asynchronous operation-- it sets
252
+ # the state machine's status to "DELETING" and begins the delete
253
+ # process.
254
+ #
255
+ # @option params [required, String] :state_machine_arn
256
+ # The Amazon Resource Name (ARN) of the state machine to delete.
257
+ #
258
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
259
+ #
260
+ # @example Request syntax with placeholder values
261
+ #
262
+ # resp = client.delete_state_machine({
263
+ # state_machine_arn: "Arn", # required
264
+ # })
265
+ #
266
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteStateMachine AWS API Documentation
267
+ #
268
+ # @overload delete_state_machine(params = {})
269
+ # @param [Hash] params ({})
270
+ def delete_state_machine(params = {}, options = {})
271
+ req = build_request(:delete_state_machine, params)
272
+ req.send_request(options)
273
+ end
274
+
275
+ # Describes an activity.
276
+ #
277
+ # @option params [required, String] :activity_arn
278
+ # The Amazon Resource Name (ARN) of the activity to describe.
279
+ #
280
+ # @return [Types::DescribeActivityOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
281
+ #
282
+ # * {Types::DescribeActivityOutput#activity_arn #activity_arn} => String
283
+ # * {Types::DescribeActivityOutput#name #name} => String
284
+ # * {Types::DescribeActivityOutput#creation_date #creation_date} => Time
285
+ #
286
+ # @example Request syntax with placeholder values
287
+ #
288
+ # resp = client.describe_activity({
289
+ # activity_arn: "Arn", # required
290
+ # })
291
+ #
292
+ # @example Response structure
293
+ #
294
+ # resp.activity_arn #=> String
295
+ # resp.name #=> String
296
+ # resp.creation_date #=> Time
297
+ #
298
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeActivity AWS API Documentation
299
+ #
300
+ # @overload describe_activity(params = {})
301
+ # @param [Hash] params ({})
302
+ def describe_activity(params = {}, options = {})
303
+ req = build_request(:describe_activity, params)
304
+ req.send_request(options)
305
+ end
306
+
307
+ # Describes an execution.
308
+ #
309
+ # @option params [required, String] :execution_arn
310
+ # The Amazon Resource Name (ARN) of the execution to describe.
311
+ #
312
+ # @return [Types::DescribeExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
313
+ #
314
+ # * {Types::DescribeExecutionOutput#execution_arn #execution_arn} => String
315
+ # * {Types::DescribeExecutionOutput#state_machine_arn #state_machine_arn} => String
316
+ # * {Types::DescribeExecutionOutput#name #name} => String
317
+ # * {Types::DescribeExecutionOutput#status #status} => String
318
+ # * {Types::DescribeExecutionOutput#start_date #start_date} => Time
319
+ # * {Types::DescribeExecutionOutput#stop_date #stop_date} => Time
320
+ # * {Types::DescribeExecutionOutput#input #input} => String
321
+ # * {Types::DescribeExecutionOutput#output #output} => String
322
+ #
323
+ # @example Request syntax with placeholder values
324
+ #
325
+ # resp = client.describe_execution({
326
+ # execution_arn: "Arn", # required
327
+ # })
328
+ #
329
+ # @example Response structure
330
+ #
331
+ # resp.execution_arn #=> String
332
+ # resp.state_machine_arn #=> String
333
+ # resp.name #=> String
334
+ # resp.status #=> String, one of "RUNNING", "SUCCEEDED", "FAILED", "TIMED_OUT", "ABORTED"
335
+ # resp.start_date #=> Time
336
+ # resp.stop_date #=> Time
337
+ # resp.input #=> String
338
+ # resp.output #=> String
339
+ #
340
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeExecution AWS API Documentation
341
+ #
342
+ # @overload describe_execution(params = {})
343
+ # @param [Hash] params ({})
344
+ def describe_execution(params = {}, options = {})
345
+ req = build_request(:describe_execution, params)
346
+ req.send_request(options)
347
+ end
348
+
349
+ # Describes a state machine.
350
+ #
351
+ # @option params [required, String] :state_machine_arn
352
+ # The Amazon Resource Name (ARN) of the state machine to describe.
353
+ #
354
+ # @return [Types::DescribeStateMachineOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
355
+ #
356
+ # * {Types::DescribeStateMachineOutput#state_machine_arn #state_machine_arn} => String
357
+ # * {Types::DescribeStateMachineOutput#name #name} => String
358
+ # * {Types::DescribeStateMachineOutput#status #status} => String
359
+ # * {Types::DescribeStateMachineOutput#definition #definition} => String
360
+ # * {Types::DescribeStateMachineOutput#role_arn #role_arn} => String
361
+ # * {Types::DescribeStateMachineOutput#creation_date #creation_date} => Time
362
+ #
363
+ # @example Request syntax with placeholder values
364
+ #
365
+ # resp = client.describe_state_machine({
366
+ # state_machine_arn: "Arn", # required
367
+ # })
368
+ #
369
+ # @example Response structure
370
+ #
371
+ # resp.state_machine_arn #=> String
372
+ # resp.name #=> String
373
+ # resp.status #=> String, one of "ACTIVE", "DELETING"
374
+ # resp.definition #=> String
375
+ # resp.role_arn #=> String
376
+ # resp.creation_date #=> Time
377
+ #
378
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachine AWS API Documentation
379
+ #
380
+ # @overload describe_state_machine(params = {})
381
+ # @param [Hash] params ({})
382
+ def describe_state_machine(params = {}, options = {})
383
+ req = build_request(:describe_state_machine, params)
384
+ req.send_request(options)
385
+ end
386
+
387
+ # Used by workers to retrieve a task (with the specified activity ARN)
388
+ # scheduled for execution by a running state machine. This initiates a
389
+ # long poll, where the service holds the HTTP connection open and
390
+ # responds as soon as a task becomes available (i.e. an execution of a
391
+ # task of this type is needed.) The maximum time the service holds on to
392
+ # the request before responding is 60 seconds. If no task is available
393
+ # within 60 seconds, the poll will return an empty result, that is, the
394
+ # `taskToken` returned is an empty string.
395
+ #
396
+ # Workers should set their client side socket timeout to at least 65
397
+ # seconds (5 seconds higher than the maximum time the service may hold
398
+ # the poll request).
399
+ #
400
+ # @option params [required, String] :activity_arn
401
+ # The Amazon Resource Name (ARN) of the activity to retrieve tasks from.
402
+ #
403
+ # @option params [String] :worker_name
404
+ # An arbitrary name may be provided in order to identify the worker that
405
+ # the task is assigned to. This name will be used when it is logged in
406
+ # the execution history.
407
+ #
408
+ # @return [Types::GetActivityTaskOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
409
+ #
410
+ # * {Types::GetActivityTaskOutput#task_token #task_token} => String
411
+ # * {Types::GetActivityTaskOutput#input #input} => String
412
+ #
413
+ # @example Request syntax with placeholder values
414
+ #
415
+ # resp = client.get_activity_task({
416
+ # activity_arn: "Arn", # required
417
+ # worker_name: "Name",
418
+ # })
419
+ #
420
+ # @example Response structure
421
+ #
422
+ # resp.task_token #=> String
423
+ # resp.input #=> String
424
+ #
425
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetActivityTask AWS API Documentation
426
+ #
427
+ # @overload get_activity_task(params = {})
428
+ # @param [Hash] params ({})
429
+ def get_activity_task(params = {}, options = {})
430
+ req = build_request(:get_activity_task, params)
431
+ req.send_request(options)
432
+ end
433
+
434
+ # Returns the history of the specified execution as a list of events. By
435
+ # default, the results are returned in ascending order of the
436
+ # `timeStamp` of the events. Use the `reverseOrder` parameter to get the
437
+ # latest events first. The results may be split into multiple pages. To
438
+ # retrieve subsequent pages, make the call again using the `nextToken`
439
+ # returned by the previous call.
440
+ #
441
+ # @option params [required, String] :execution_arn
442
+ # The Amazon Resource Name (ARN) of the execution.
443
+ #
444
+ # @option params [Integer] :max_results
445
+ # The maximum number of results that will be returned per call.
446
+ # `nextToken` can be used to obtain further pages of results. The
447
+ # default is 100 and the maximum allowed page size is 1000.
448
+ #
449
+ # This is an upper limit only; the actual number of results returned per
450
+ # call may be fewer than the specified maximum.
451
+ #
452
+ # @option params [Boolean] :reverse_order
453
+ # Lists events in descending order of their `timeStamp`.
454
+ #
455
+ # @option params [String] :next_token
456
+ # If a `nextToken` was returned by a previous call, there are more
457
+ # results available. To retrieve the next page of results, make the call
458
+ # again using the returned token in `nextToken`. Keep all other
459
+ # arguments unchanged.
460
+ #
461
+ # The configured `maxResults` determines how many results can be
462
+ # returned in a single call.
463
+ #
464
+ # @return [Types::GetExecutionHistoryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
465
+ #
466
+ # * {Types::GetExecutionHistoryOutput#events #events} => Array&lt;Types::HistoryEvent&gt;
467
+ # * {Types::GetExecutionHistoryOutput#next_token #next_token} => String
468
+ #
469
+ # @example Request syntax with placeholder values
470
+ #
471
+ # resp = client.get_execution_history({
472
+ # execution_arn: "Arn", # required
473
+ # max_results: 1,
474
+ # reverse_order: false,
475
+ # next_token: "PageToken",
476
+ # })
477
+ #
478
+ # @example Response structure
479
+ #
480
+ # resp.events #=> Array
481
+ # resp.events[0].timestamp #=> Time
482
+ # resp.events[0].type #=> String, one of "ActivityFailed", "ActivityScheduleFailed", "ActivityScheduled", "ActivityStarted", "ActivitySucceeded", "ActivityTimedOut", "ChoiceStateEntered", "ChoiceStateExited", "ExecutionFailed", "ExecutionStarted", "ExecutionSucceeded", "ExecutionAborted", "ExecutionTimedOut", "FailStateEntered", "LambdaFunctionFailed", "LambdaFunctionScheduleFailed", "LambdaFunctionScheduled", "LambdaFunctionStartFailed", "LambdaFunctionStarted", "LambdaFunctionSucceeded", "LambdaFunctionTimedOut", "SucceedStateEntered", "SucceedStateExited", "TaskStateEntered", "TaskStateExited", "PassStateEntered", "PassStateExited", "ParallelStateEntered", "ParallelStateExited", "WaitStateEntered", "WaitStateExited"
483
+ # resp.events[0].id #=> Integer
484
+ # resp.events[0].previous_event_id #=> Integer
485
+ # resp.events[0].activity_failed_event_details.error #=> String
486
+ # resp.events[0].activity_failed_event_details.cause #=> String
487
+ # resp.events[0].activity_schedule_failed_event_details.error #=> String
488
+ # resp.events[0].activity_schedule_failed_event_details.cause #=> String
489
+ # resp.events[0].activity_scheduled_event_details.resource #=> String
490
+ # resp.events[0].activity_scheduled_event_details.input #=> String
491
+ # resp.events[0].activity_scheduled_event_details.timeout_in_seconds #=> Integer
492
+ # resp.events[0].activity_scheduled_event_details.heartbeat_in_seconds #=> Integer
493
+ # resp.events[0].activity_started_event_details.worker_name #=> String
494
+ # resp.events[0].activity_succeeded_event_details.output #=> String
495
+ # resp.events[0].activity_timed_out_event_details.error #=> String
496
+ # resp.events[0].activity_timed_out_event_details.cause #=> String
497
+ # resp.events[0].execution_failed_event_details.error #=> String
498
+ # resp.events[0].execution_failed_event_details.cause #=> String
499
+ # resp.events[0].execution_started_event_details.input #=> String
500
+ # resp.events[0].execution_started_event_details.role_arn #=> String
501
+ # resp.events[0].execution_succeeded_event_details.output #=> String
502
+ # resp.events[0].execution_aborted_event_details.error #=> String
503
+ # resp.events[0].execution_aborted_event_details.cause #=> String
504
+ # resp.events[0].execution_timed_out_event_details.error #=> String
505
+ # resp.events[0].execution_timed_out_event_details.cause #=> String
506
+ # resp.events[0].lambda_function_failed_event_details.error #=> String
507
+ # resp.events[0].lambda_function_failed_event_details.cause #=> String
508
+ # resp.events[0].lambda_function_schedule_failed_event_details.error #=> String
509
+ # resp.events[0].lambda_function_schedule_failed_event_details.cause #=> String
510
+ # resp.events[0].lambda_function_scheduled_event_details.resource #=> String
511
+ # resp.events[0].lambda_function_scheduled_event_details.input #=> String
512
+ # resp.events[0].lambda_function_scheduled_event_details.timeout_in_seconds #=> Integer
513
+ # resp.events[0].lambda_function_start_failed_event_details.error #=> String
514
+ # resp.events[0].lambda_function_start_failed_event_details.cause #=> String
515
+ # resp.events[0].lambda_function_succeeded_event_details.output #=> String
516
+ # resp.events[0].lambda_function_timed_out_event_details.error #=> String
517
+ # resp.events[0].lambda_function_timed_out_event_details.cause #=> String
518
+ # resp.events[0].state_entered_event_details.name #=> String
519
+ # resp.events[0].state_entered_event_details.input #=> String
520
+ # resp.events[0].state_exited_event_details.name #=> String
521
+ # resp.events[0].state_exited_event_details.output #=> String
522
+ # resp.next_token #=> String
523
+ #
524
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetExecutionHistory AWS API Documentation
525
+ #
526
+ # @overload get_execution_history(params = {})
527
+ # @param [Hash] params ({})
528
+ def get_execution_history(params = {}, options = {})
529
+ req = build_request(:get_execution_history, params)
530
+ req.send_request(options)
531
+ end
532
+
533
+ # Lists the existing activities. The results may be split into multiple
534
+ # pages. To retrieve subsequent pages, make the call again using the
535
+ # `nextToken` returned by the previous call.
536
+ #
537
+ # @option params [Integer] :max_results
538
+ # The maximum number of results that will be returned per call.
539
+ # `nextToken` can be used to obtain further pages of results. The
540
+ # default is 100 and the maximum allowed page size is 1000.
541
+ #
542
+ # This is an upper limit only; the actual number of results returned per
543
+ # call may be fewer than the specified maximum.
544
+ #
545
+ # @option params [String] :next_token
546
+ # If a `nextToken` was returned by a previous call, there are more
547
+ # results available. To retrieve the next page of results, make the call
548
+ # again using the returned token in `nextToken`. Keep all other
549
+ # arguments unchanged.
550
+ #
551
+ # The configured `maxResults` determines how many results can be
552
+ # returned in a single call.
553
+ #
554
+ # @return [Types::ListActivitiesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
555
+ #
556
+ # * {Types::ListActivitiesOutput#activities #activities} => Array&lt;Types::ActivityListItem&gt;
557
+ # * {Types::ListActivitiesOutput#next_token #next_token} => String
558
+ #
559
+ # @example Request syntax with placeholder values
560
+ #
561
+ # resp = client.list_activities({
562
+ # max_results: 1,
563
+ # next_token: "PageToken",
564
+ # })
565
+ #
566
+ # @example Response structure
567
+ #
568
+ # resp.activities #=> Array
569
+ # resp.activities[0].activity_arn #=> String
570
+ # resp.activities[0].name #=> String
571
+ # resp.activities[0].creation_date #=> Time
572
+ # resp.next_token #=> String
573
+ #
574
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListActivities AWS API Documentation
575
+ #
576
+ # @overload list_activities(params = {})
577
+ # @param [Hash] params ({})
578
+ def list_activities(params = {}, options = {})
579
+ req = build_request(:list_activities, params)
580
+ req.send_request(options)
581
+ end
582
+
583
+ # Lists the executions of a state machine that meet the filtering
584
+ # criteria. The results may be split into multiple pages. To retrieve
585
+ # subsequent pages, make the call again using the `nextToken` returned
586
+ # by the previous call.
587
+ #
588
+ # @option params [required, String] :state_machine_arn
589
+ # The Amazon Resource Name (ARN) of the state machine whose executions
590
+ # will be listed.
591
+ #
592
+ # @option params [String] :status_filter
593
+ # If specified, only list the executions whose current execution status
594
+ # matches the given filter.
595
+ #
596
+ # @option params [Integer] :max_results
597
+ # The maximum number of results that will be returned per call.
598
+ # `nextToken` can be used to obtain further pages of results. The
599
+ # default is 100 and the maximum allowed page size is 1000.
600
+ #
601
+ # This is an upper limit only; the actual number of results returned per
602
+ # call may be fewer than the specified maximum.
603
+ #
604
+ # @option params [String] :next_token
605
+ # If a `nextToken` was returned by a previous call, there are more
606
+ # results available. To retrieve the next page of results, make the call
607
+ # again using the returned token in `nextToken`. Keep all other
608
+ # arguments unchanged.
609
+ #
610
+ # The configured `maxResults` determines how many results can be
611
+ # returned in a single call.
612
+ #
613
+ # @return [Types::ListExecutionsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
614
+ #
615
+ # * {Types::ListExecutionsOutput#executions #executions} => Array&lt;Types::ExecutionListItem&gt;
616
+ # * {Types::ListExecutionsOutput#next_token #next_token} => String
617
+ #
618
+ # @example Request syntax with placeholder values
619
+ #
620
+ # resp = client.list_executions({
621
+ # state_machine_arn: "Arn", # required
622
+ # status_filter: "RUNNING", # accepts RUNNING, SUCCEEDED, FAILED, TIMED_OUT, ABORTED
623
+ # max_results: 1,
624
+ # next_token: "PageToken",
625
+ # })
626
+ #
627
+ # @example Response structure
628
+ #
629
+ # resp.executions #=> Array
630
+ # resp.executions[0].execution_arn #=> String
631
+ # resp.executions[0].state_machine_arn #=> String
632
+ # resp.executions[0].name #=> String
633
+ # resp.executions[0].status #=> String, one of "RUNNING", "SUCCEEDED", "FAILED", "TIMED_OUT", "ABORTED"
634
+ # resp.executions[0].start_date #=> Time
635
+ # resp.executions[0].stop_date #=> Time
636
+ # resp.next_token #=> String
637
+ #
638
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListExecutions AWS API Documentation
639
+ #
640
+ # @overload list_executions(params = {})
641
+ # @param [Hash] params ({})
642
+ def list_executions(params = {}, options = {})
643
+ req = build_request(:list_executions, params)
644
+ req.send_request(options)
645
+ end
646
+
647
+ # Lists the existing state machines. The results may be split into
648
+ # multiple pages. To retrieve subsequent pages, make the call again
649
+ # using the `nextToken` returned by the previous call.
650
+ #
651
+ # @option params [Integer] :max_results
652
+ # The maximum number of results that will be returned per call.
653
+ # `nextToken` can be used to obtain further pages of results. The
654
+ # default is 100 and the maximum allowed page size is 1000.
655
+ #
656
+ # This is an upper limit only; the actual number of results returned per
657
+ # call may be fewer than the specified maximum.
658
+ #
659
+ # @option params [String] :next_token
660
+ # If a `nextToken` was returned by a previous call, there are more
661
+ # results available. To retrieve the next page of results, make the call
662
+ # again using the returned token in `nextToken`. Keep all other
663
+ # arguments unchanged.
664
+ #
665
+ # The configured `maxResults` determines how many results can be
666
+ # returned in a single call.
667
+ #
668
+ # @return [Types::ListStateMachinesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
669
+ #
670
+ # * {Types::ListStateMachinesOutput#state_machines #state_machines} => Array&lt;Types::StateMachineListItem&gt;
671
+ # * {Types::ListStateMachinesOutput#next_token #next_token} => String
672
+ #
673
+ # @example Request syntax with placeholder values
674
+ #
675
+ # resp = client.list_state_machines({
676
+ # max_results: 1,
677
+ # next_token: "PageToken",
678
+ # })
679
+ #
680
+ # @example Response structure
681
+ #
682
+ # resp.state_machines #=> Array
683
+ # resp.state_machines[0].state_machine_arn #=> String
684
+ # resp.state_machines[0].name #=> String
685
+ # resp.state_machines[0].creation_date #=> Time
686
+ # resp.next_token #=> String
687
+ #
688
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListStateMachines AWS API Documentation
689
+ #
690
+ # @overload list_state_machines(params = {})
691
+ # @param [Hash] params ({})
692
+ def list_state_machines(params = {}, options = {})
693
+ req = build_request(:list_state_machines, params)
694
+ req.send_request(options)
695
+ end
696
+
697
+ # Used by workers to report that the task identified by the `taskToken`
698
+ # failed.
699
+ #
700
+ # @option params [required, String] :task_token
701
+ # The token that represents this task. Task tokens are generated by the
702
+ # service when the tasks are assigned to a worker (see
703
+ # GetActivityTask::taskToken).
704
+ #
705
+ # @option params [String] :error
706
+ # An arbitrary error code that identifies the cause of the failure.
707
+ #
708
+ # @option params [String] :cause
709
+ # A more detailed explanation of the cause of the failure.
710
+ #
711
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
712
+ #
713
+ # @example Request syntax with placeholder values
714
+ #
715
+ # resp = client.send_task_failure({
716
+ # task_token: "TaskToken", # required
717
+ # error: "Error",
718
+ # cause: "Cause",
719
+ # })
720
+ #
721
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskFailure AWS API Documentation
722
+ #
723
+ # @overload send_task_failure(params = {})
724
+ # @param [Hash] params ({})
725
+ def send_task_failure(params = {}, options = {})
726
+ req = build_request(:send_task_failure, params)
727
+ req.send_request(options)
728
+ end
729
+
730
+ # Used by workers to report to the service that the task represented by
731
+ # the specified `taskToken` is still making progress. This action resets
732
+ # the `Heartbeat` clock. The `Heartbeat` threshold is specified in the
733
+ # state machine's Amazon States Language definition. This action does
734
+ # not in itself create an event in the execution history. However, if
735
+ # the task times out, the execution history will contain an
736
+ # `ActivityTimedOut` event.
737
+ #
738
+ # <note markdown="1"> The `Timeout` of a task, defined in the state machine's Amazon States
739
+ # Language definition, is its maximum allowed duration, regardless of
740
+ # the number of SendTaskHeartbeat requests received.
741
+ #
742
+ # </note>
743
+ #
744
+ # <note markdown="1"> This operation is only useful for long-lived tasks to report the
745
+ # liveliness of the task.
746
+ #
747
+ # </note>
748
+ #
749
+ # @option params [required, String] :task_token
750
+ # The token that represents this task. Task tokens are generated by the
751
+ # service when the tasks are assigned to a worker (see
752
+ # GetActivityTask::taskToken).
753
+ #
754
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
755
+ #
756
+ # @example Request syntax with placeholder values
757
+ #
758
+ # resp = client.send_task_heartbeat({
759
+ # task_token: "TaskToken", # required
760
+ # })
761
+ #
762
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskHeartbeat AWS API Documentation
763
+ #
764
+ # @overload send_task_heartbeat(params = {})
765
+ # @param [Hash] params ({})
766
+ def send_task_heartbeat(params = {}, options = {})
767
+ req = build_request(:send_task_heartbeat, params)
768
+ req.send_request(options)
769
+ end
770
+
771
+ # Used by workers to report that the task identified by the `taskToken`
772
+ # completed successfully.
773
+ #
774
+ # @option params [required, String] :task_token
775
+ # The token that represents this task. Task tokens are generated by the
776
+ # service when the tasks are assigned to a worker (see
777
+ # GetActivityTask::taskToken).
778
+ #
779
+ # @option params [required, String] :output
780
+ # The JSON output of the task.
781
+ #
782
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
783
+ #
784
+ # @example Request syntax with placeholder values
785
+ #
786
+ # resp = client.send_task_success({
787
+ # task_token: "TaskToken", # required
788
+ # output: "Data", # required
789
+ # })
790
+ #
791
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskSuccess AWS API Documentation
792
+ #
793
+ # @overload send_task_success(params = {})
794
+ # @param [Hash] params ({})
795
+ def send_task_success(params = {}, options = {})
796
+ req = build_request(:send_task_success, params)
797
+ req.send_request(options)
798
+ end
799
+
800
+ # Starts a state machine execution.
801
+ #
802
+ # @option params [required, String] :state_machine_arn
803
+ # The Amazon Resource Name (ARN) of the state machine to execute.
804
+ #
805
+ # @option params [String] :name
806
+ # The name of the execution. This name must be unique for your AWS
807
+ # account and region.
808
+ #
809
+ # @option params [String] :input
810
+ # The JSON input data for the execution.
811
+ #
812
+ # @return [Types::StartExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
813
+ #
814
+ # * {Types::StartExecutionOutput#execution_arn #execution_arn} => String
815
+ # * {Types::StartExecutionOutput#start_date #start_date} => Time
816
+ #
817
+ # @example Request syntax with placeholder values
818
+ #
819
+ # resp = client.start_execution({
820
+ # state_machine_arn: "Arn", # required
821
+ # name: "Name",
822
+ # input: "Data",
823
+ # })
824
+ #
825
+ # @example Response structure
826
+ #
827
+ # resp.execution_arn #=> String
828
+ # resp.start_date #=> Time
829
+ #
830
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StartExecution AWS API Documentation
831
+ #
832
+ # @overload start_execution(params = {})
833
+ # @param [Hash] params ({})
834
+ def start_execution(params = {}, options = {})
835
+ req = build_request(:start_execution, params)
836
+ req.send_request(options)
837
+ end
838
+
839
+ # Stops an execution.
840
+ #
841
+ # @option params [required, String] :execution_arn
842
+ # The Amazon Resource Name (ARN) of the execution to stop.
843
+ #
844
+ # @option params [String] :error
845
+ # An arbitrary error code that identifies the cause of the termination.
846
+ #
847
+ # @option params [String] :cause
848
+ # A more detailed explanation of the cause of the termination.
849
+ #
850
+ # @return [Types::StopExecutionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
851
+ #
852
+ # * {Types::StopExecutionOutput#stop_date #stop_date} => Time
853
+ #
854
+ # @example Request syntax with placeholder values
855
+ #
856
+ # resp = client.stop_execution({
857
+ # execution_arn: "Arn", # required
858
+ # error: "Error",
859
+ # cause: "Cause",
860
+ # })
861
+ #
862
+ # @example Response structure
863
+ #
864
+ # resp.stop_date #=> Time
865
+ #
866
+ # @see http://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/StopExecution AWS API Documentation
867
+ #
868
+ # @overload stop_execution(params = {})
869
+ # @param [Hash] params ({})
870
+ def stop_execution(params = {}, options = {})
871
+ req = build_request(:stop_execution, params)
872
+ req.send_request(options)
873
+ end
874
+
875
+ # @!endgroup
876
+
877
+ # @param params ({})
878
+ # @api private
879
+ def build_request(operation_name, params = {})
880
+ handlers = @handlers.for(operation_name)
881
+ context = Seahorse::Client::RequestContext.new(
882
+ operation_name: operation_name,
883
+ operation: config.api.operation(operation_name),
884
+ client: self,
885
+ params: params,
886
+ config: config)
887
+ context[:gem_name] = 'aws-sdk-states'
888
+ context[:gem_version] = '1.0.0.rc1'
889
+ Seahorse::Client::Request.new(handlers, context)
890
+ end
891
+
892
+ # @api private
893
+ # @deprecated
894
+ def waiter_names
895
+ []
896
+ end
897
+
898
+ class << self
899
+
900
+ # @api private
901
+ attr_reader :identifier
902
+
903
+ # @api private
904
+ def errors_module
905
+ Errors
906
+ end
907
+
908
+ end
909
+ end
910
+ end