File Coverage

blib/lib/Paws/StepFunctions.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::StepFunctions;
2 1     1   4500 use Moose;
  1         3  
  1         8  
3             sub service { 'states' }
4             sub version { '2016-11-23' }
5             sub target_prefix { 'AWSStepFunctions' }
6             sub json_version { "1.0" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub CreateActivity {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::StepFunctions::CreateActivity', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub CreateStateMachine {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::StepFunctions::CreateStateMachine', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DeleteActivity {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::StepFunctions::DeleteActivity', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DeleteStateMachine {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::StepFunctions::DeleteStateMachine', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeActivity {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::StepFunctions::DescribeActivity', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub DescribeExecution {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::StepFunctions::DescribeExecution', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub DescribeStateMachine {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::StepFunctions::DescribeStateMachine', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub GetActivityTask {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::StepFunctions::GetActivityTask', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub GetExecutionHistory {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::StepFunctions::GetExecutionHistory', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub ListActivities {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::StepFunctions::ListActivities', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub ListExecutions {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::StepFunctions::ListExecutions', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72             sub ListStateMachines {
73             my $self = shift;
74             my $call_object = $self->new_with_coercions('Paws::StepFunctions::ListStateMachines', @_);
75             return $self->caller->do_call($self, $call_object);
76             }
77             sub SendTaskFailure {
78             my $self = shift;
79             my $call_object = $self->new_with_coercions('Paws::StepFunctions::SendTaskFailure', @_);
80             return $self->caller->do_call($self, $call_object);
81             }
82             sub SendTaskHeartbeat {
83             my $self = shift;
84             my $call_object = $self->new_with_coercions('Paws::StepFunctions::SendTaskHeartbeat', @_);
85             return $self->caller->do_call($self, $call_object);
86             }
87             sub SendTaskSuccess {
88             my $self = shift;
89             my $call_object = $self->new_with_coercions('Paws::StepFunctions::SendTaskSuccess', @_);
90             return $self->caller->do_call($self, $call_object);
91             }
92             sub StartExecution {
93             my $self = shift;
94             my $call_object = $self->new_with_coercions('Paws::StepFunctions::StartExecution', @_);
95             return $self->caller->do_call($self, $call_object);
96             }
97             sub StopExecution {
98             my $self = shift;
99             my $call_object = $self->new_with_coercions('Paws::StepFunctions::StopExecution', @_);
100             return $self->caller->do_call($self, $call_object);
101             }
102            
103             sub GetAllExecutionHistory {
104             my $self = shift;
105              
106             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
107             my $result = $self->GetExecutionHistory(@_);
108             my $next_result = $result;
109              
110             if (not defined $callback) {
111             while ($next_result->nextToken) {
112             $next_result = $self->GetExecutionHistory(@_, nextToken => $next_result->nextToken);
113             push @{ $result->events }, @{ $next_result->events };
114             }
115             return $result;
116             } else {
117             while ($result->nextToken) {
118             $callback->($_ => 'events') foreach (@{ $result->events });
119             $result = $self->GetExecutionHistory(@_, nextToken => $result->nextToken);
120             }
121             $callback->($_ => 'events') foreach (@{ $result->events });
122             }
123              
124             return undef
125             }
126             sub ListAllActivities {
127             my $self = shift;
128              
129             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
130             my $result = $self->ListActivities(@_);
131             my $next_result = $result;
132              
133             if (not defined $callback) {
134             while ($next_result->nextToken) {
135             $next_result = $self->ListActivities(@_, nextToken => $next_result->nextToken);
136             push @{ $result->activities }, @{ $next_result->activities };
137             }
138             return $result;
139             } else {
140             while ($result->nextToken) {
141             $callback->($_ => 'activities') foreach (@{ $result->activities });
142             $result = $self->ListActivities(@_, nextToken => $result->nextToken);
143             }
144             $callback->($_ => 'activities') foreach (@{ $result->activities });
145             }
146              
147             return undef
148             }
149             sub ListAllExecutions {
150             my $self = shift;
151              
152             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
153             my $result = $self->ListExecutions(@_);
154             my $next_result = $result;
155              
156             if (not defined $callback) {
157             while ($next_result->nextToken) {
158             $next_result = $self->ListExecutions(@_, nextToken => $next_result->nextToken);
159             push @{ $result->executions }, @{ $next_result->executions };
160             }
161             return $result;
162             } else {
163             while ($result->nextToken) {
164             $callback->($_ => 'executions') foreach (@{ $result->executions });
165             $result = $self->ListExecutions(@_, nextToken => $result->nextToken);
166             }
167             $callback->($_ => 'executions') foreach (@{ $result->executions });
168             }
169              
170             return undef
171             }
172             sub ListAllStateMachines {
173             my $self = shift;
174              
175             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
176             my $result = $self->ListStateMachines(@_);
177             my $next_result = $result;
178              
179             if (not defined $callback) {
180             while ($next_result->nextToken) {
181             $next_result = $self->ListStateMachines(@_, nextToken => $next_result->nextToken);
182             push @{ $result->stateMachines }, @{ $next_result->stateMachines };
183             }
184             return $result;
185             } else {
186             while ($result->nextToken) {
187             $callback->($_ => 'stateMachines') foreach (@{ $result->stateMachines });
188             $result = $self->ListStateMachines(@_, nextToken => $result->nextToken);
189             }
190             $callback->($_ => 'stateMachines') foreach (@{ $result->stateMachines });
191             }
192              
193             return undef
194             }
195              
196              
197             sub operations { qw/CreateActivity CreateStateMachine DeleteActivity DeleteStateMachine DescribeActivity DescribeExecution DescribeStateMachine GetActivityTask GetExecutionHistory ListActivities ListExecutions ListStateMachines SendTaskFailure SendTaskHeartbeat SendTaskSuccess StartExecution StopExecution / }
198              
199             1;
200              
201             ### main pod documentation begin ###
202              
203             =head1 NAME
204              
205             Paws::StepFunctions - Perl Interface to AWS AWS Step Functions
206              
207             =head1 SYNOPSIS
208              
209             use Paws;
210              
211             my $obj = Paws->service('StepFunctions');
212             my $res = $obj->Method(
213             Arg1 => $val1,
214             Arg2 => [ 'V1', 'V2' ],
215             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
216             # of the arguments type
217             Arg3 => { Att1 => 'Val1' },
218             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
219             # the constructor of the arguments type
220             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
221             );
222              
223             =head1 DESCRIPTION
224              
225             AWS Step Functions
226              
227             AWS Step Functions is a web service that enables you to coordinate the
228             components of distributed applications and microservices using visual
229             workflows. You build applications from individual components that each
230             perform a discrete function, or I<task>, allowing you to scale and
231             change applications quickly. Step Functions provides a graphical
232             console to visualize the components of your application as a series of
233             steps. It automatically triggers and tracks each step, and retries when
234             there are errors, so your application executes in order and as
235             expected, every time. Step Functions logs the state of each step, so
236             when things do go wrong, you can diagnose and debug problems quickly.
237              
238             Step Functions manages the operations and underlying infrastructure for
239             you to ensure your application is available at any scale. You can run
240             tasks on the AWS cloud, on your own servers, or an any system that has
241             access to AWS. Step Functions can be accessed and used with the Step
242             Functions console, the AWS SDKs (included with your Beta release
243             invitation email), or an HTTP API (the subject of this document).
244              
245             =head1 METHODS
246              
247             =head2 CreateActivity(Name => Str)
248              
249             Each argument is described in detail in: L<Paws::StepFunctions::CreateActivity>
250              
251             Returns: a L<Paws::StepFunctions::CreateActivityOutput> instance
252              
253             Creates an activity.
254              
255              
256             =head2 CreateStateMachine(Definition => Str, Name => Str, RoleArn => Str)
257              
258             Each argument is described in detail in: L<Paws::StepFunctions::CreateStateMachine>
259              
260             Returns: a L<Paws::StepFunctions::CreateStateMachineOutput> instance
261              
262             Creates a state machine.
263              
264              
265             =head2 DeleteActivity(ActivityArn => Str)
266              
267             Each argument is described in detail in: L<Paws::StepFunctions::DeleteActivity>
268              
269             Returns: a L<Paws::StepFunctions::DeleteActivityOutput> instance
270              
271             Deletes an activity.
272              
273              
274             =head2 DeleteStateMachine(StateMachineArn => Str)
275              
276             Each argument is described in detail in: L<Paws::StepFunctions::DeleteStateMachine>
277              
278             Returns: a L<Paws::StepFunctions::DeleteStateMachineOutput> instance
279              
280             Deletes a state machine. This is an asynchronous operation-- it sets
281             the state machine's status to "DELETING" and begins the delete process.
282              
283              
284             =head2 DescribeActivity(ActivityArn => Str)
285              
286             Each argument is described in detail in: L<Paws::StepFunctions::DescribeActivity>
287              
288             Returns: a L<Paws::StepFunctions::DescribeActivityOutput> instance
289              
290             Describes an activity.
291              
292              
293             =head2 DescribeExecution(ExecutionArn => Str)
294              
295             Each argument is described in detail in: L<Paws::StepFunctions::DescribeExecution>
296              
297             Returns: a L<Paws::StepFunctions::DescribeExecutionOutput> instance
298              
299             Describes an execution.
300              
301              
302             =head2 DescribeStateMachine(StateMachineArn => Str)
303              
304             Each argument is described in detail in: L<Paws::StepFunctions::DescribeStateMachine>
305              
306             Returns: a L<Paws::StepFunctions::DescribeStateMachineOutput> instance
307              
308             Describes a state machine.
309              
310              
311             =head2 GetActivityTask(ActivityArn => Str, [WorkerName => Str])
312              
313             Each argument is described in detail in: L<Paws::StepFunctions::GetActivityTask>
314              
315             Returns: a L<Paws::StepFunctions::GetActivityTaskOutput> instance
316              
317             Used by workers to retrieve a task (with the specified activity ARN)
318             scheduled for execution by a running state machine. This initiates a
319             long poll, where the service holds the HTTP connection open and
320             responds as soon as a task becomes available (i.e. an execution of a
321             task of this type is needed.) The maximum time the service holds on to
322             the request before responding is 60 seconds. If no task is available
323             within 60 seconds, the poll will return an empty result, that is, the
324             C<taskToken> returned is an empty string.
325              
326             Workers should set their client side socket timeout to at least 65
327             seconds (5 seconds higher than the maximum time the service may hold
328             the poll request).
329              
330              
331             =head2 GetExecutionHistory(ExecutionArn => Str, [MaxResults => Int, NextToken => Str, ReverseOrder => Bool])
332              
333             Each argument is described in detail in: L<Paws::StepFunctions::GetExecutionHistory>
334              
335             Returns: a L<Paws::StepFunctions::GetExecutionHistoryOutput> instance
336              
337             Returns the history of the specified execution as a list of events. By
338             default, the results are returned in ascending order of the
339             C<timeStamp> of the events. Use the C<reverseOrder> parameter to get
340             the latest events first. The results may be split into multiple pages.
341             To retrieve subsequent pages, make the call again using the
342             C<nextToken> returned by the previous call.
343              
344              
345             =head2 ListActivities([MaxResults => Int, NextToken => Str])
346              
347             Each argument is described in detail in: L<Paws::StepFunctions::ListActivities>
348              
349             Returns: a L<Paws::StepFunctions::ListActivitiesOutput> instance
350              
351             Lists the existing activities. The results may be split into multiple
352             pages. To retrieve subsequent pages, make the call again using the
353             C<nextToken> returned by the previous call.
354              
355              
356             =head2 ListExecutions(StateMachineArn => Str, [MaxResults => Int, NextToken => Str, StatusFilter => Str])
357              
358             Each argument is described in detail in: L<Paws::StepFunctions::ListExecutions>
359              
360             Returns: a L<Paws::StepFunctions::ListExecutionsOutput> instance
361              
362             Lists the executions of a state machine that meet the filtering
363             criteria. The results may be split into multiple pages. To retrieve
364             subsequent pages, make the call again using the C<nextToken> returned
365             by the previous call.
366              
367              
368             =head2 ListStateMachines([MaxResults => Int, NextToken => Str])
369              
370             Each argument is described in detail in: L<Paws::StepFunctions::ListStateMachines>
371              
372             Returns: a L<Paws::StepFunctions::ListStateMachinesOutput> instance
373              
374             Lists the existing state machines. The results may be split into
375             multiple pages. To retrieve subsequent pages, make the call again using
376             the C<nextToken> returned by the previous call.
377              
378              
379             =head2 SendTaskFailure(TaskToken => Str, [Cause => Str, Error => Str])
380              
381             Each argument is described in detail in: L<Paws::StepFunctions::SendTaskFailure>
382              
383             Returns: a L<Paws::StepFunctions::SendTaskFailureOutput> instance
384              
385             Used by workers to report that the task identified by the C<taskToken>
386             failed.
387              
388              
389             =head2 SendTaskHeartbeat(TaskToken => Str)
390              
391             Each argument is described in detail in: L<Paws::StepFunctions::SendTaskHeartbeat>
392              
393             Returns: a L<Paws::StepFunctions::SendTaskHeartbeatOutput> instance
394              
395             Used by workers to report to the service that the task represented by
396             the specified C<taskToken> is still making progress. This action resets
397             the C<Heartbeat> clock. The C<Heartbeat> threshold is specified in the
398             state machine's Amazon States Language definition. This action does not
399             in itself create an event in the execution history. However, if the
400             task times out, the execution history will contain an
401             C<ActivityTimedOut> event.
402              
403             The C<Timeout> of a task, defined in the state machine's Amazon States
404             Language definition, is its maximum allowed duration, regardless of the
405             number of SendTaskHeartbeat requests received.
406              
407             This operation is only useful for long-lived tasks to report the
408             liveliness of the task.
409              
410              
411             =head2 SendTaskSuccess(Output => Str, TaskToken => Str)
412              
413             Each argument is described in detail in: L<Paws::StepFunctions::SendTaskSuccess>
414              
415             Returns: a L<Paws::StepFunctions::SendTaskSuccessOutput> instance
416              
417             Used by workers to report that the task identified by the C<taskToken>
418             completed successfully.
419              
420              
421             =head2 StartExecution(StateMachineArn => Str, [Input => Str, Name => Str])
422              
423             Each argument is described in detail in: L<Paws::StepFunctions::StartExecution>
424              
425             Returns: a L<Paws::StepFunctions::StartExecutionOutput> instance
426              
427             Starts a state machine execution.
428              
429              
430             =head2 StopExecution(ExecutionArn => Str, [Cause => Str, Error => Str])
431              
432             Each argument is described in detail in: L<Paws::StepFunctions::StopExecution>
433              
434             Returns: a L<Paws::StepFunctions::StopExecutionOutput> instance
435              
436             Stops an execution.
437              
438              
439              
440              
441             =head1 PAGINATORS
442              
443             Paginator methods are helpers that repetively call methods that return partial results
444              
445             =head2 GetAllExecutionHistory(sub { },ExecutionArn => Str, [MaxResults => Int, NextToken => Str, ReverseOrder => Bool])
446              
447             =head2 GetAllExecutionHistory(ExecutionArn => Str, [MaxResults => Int, NextToken => Str, ReverseOrder => Bool])
448              
449              
450             If passed a sub as first parameter, it will call the sub for each element found in :
451              
452             - events, passing the object as the first parameter, and the string 'events' as the second parameter
453              
454             If not, it will return a a L<Paws::StepFunctions::GetExecutionHistoryOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
455              
456              
457             =head2 ListAllActivities(sub { },[MaxResults => Int, NextToken => Str])
458              
459             =head2 ListAllActivities([MaxResults => Int, NextToken => Str])
460              
461              
462             If passed a sub as first parameter, it will call the sub for each element found in :
463              
464             - activities, passing the object as the first parameter, and the string 'activities' as the second parameter
465              
466             If not, it will return a a L<Paws::StepFunctions::ListActivitiesOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
467              
468              
469             =head2 ListAllExecutions(sub { },StateMachineArn => Str, [MaxResults => Int, NextToken => Str, StatusFilter => Str])
470              
471             =head2 ListAllExecutions(StateMachineArn => Str, [MaxResults => Int, NextToken => Str, StatusFilter => Str])
472              
473              
474             If passed a sub as first parameter, it will call the sub for each element found in :
475              
476             - executions, passing the object as the first parameter, and the string 'executions' as the second parameter
477              
478             If not, it will return a a L<Paws::StepFunctions::ListExecutionsOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
479              
480              
481             =head2 ListAllStateMachines(sub { },[MaxResults => Int, NextToken => Str])
482              
483             =head2 ListAllStateMachines([MaxResults => Int, NextToken => Str])
484              
485              
486             If passed a sub as first parameter, it will call the sub for each element found in :
487              
488             - stateMachines, passing the object as the first parameter, and the string 'stateMachines' as the second parameter
489              
490             If not, it will return a a L<Paws::StepFunctions::ListStateMachinesOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
491              
492              
493              
494              
495              
496             =head1 SEE ALSO
497              
498             This service class forms part of L<Paws>
499              
500             =head1 BUGS and CONTRIBUTIONS
501              
502             The source code is located here: https://github.com/pplu/aws-sdk-perl
503              
504             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
505              
506             =cut
507