forked from aws/aws-sdk-go-v2
/
api.go
3565 lines (2948 loc) · 114 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sfn
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opCreateActivity = "CreateActivity"
// CreateActivityRequest is a API request type for the CreateActivity API operation.
type CreateActivityRequest struct {
*aws.Request
Input *CreateActivityInput
Copy func(*CreateActivityInput) CreateActivityRequest
}
// Send marshals and sends the CreateActivity API request.
func (r CreateActivityRequest) Send() (*CreateActivityOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateActivityOutput), nil
}
// CreateActivityRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Creates an activity. An activity is a task which you write in any programming
// language and host on any machine which has access to AWS Step Functions.
// Activities must poll Step Functions using the GetActivityTask API action
// and respond using SendTask* 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.
//
// // Example sending a request using the CreateActivityRequest method.
// req := client.CreateActivityRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateActivity
func (c *SFN) CreateActivityRequest(input *CreateActivityInput) CreateActivityRequest {
op := &aws.Operation{
Name: opCreateActivity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateActivityInput{}
}
output := &CreateActivityOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateActivityRequest{Request: req, Input: input, Copy: c.CreateActivityRequest}
}
const opCreateStateMachine = "CreateStateMachine"
// CreateStateMachineRequest is a API request type for the CreateStateMachine API operation.
type CreateStateMachineRequest struct {
*aws.Request
Input *CreateStateMachineInput
Copy func(*CreateStateMachineInput) CreateStateMachineRequest
}
// Send marshals and sends the CreateStateMachine API request.
func (r CreateStateMachineRequest) Send() (*CreateStateMachineOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateStateMachineOutput), nil
}
// CreateStateMachineRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Creates a state machine. A state machine consists of a collection of states
// that can do work (Task states), determine to which states to transition next
// (Choice states), stop an execution with an error (Fail states), and so on.
// State machines are specified using a JSON-based, structured language.
//
// // Example sending a request using the CreateStateMachineRequest method.
// req := client.CreateStateMachineRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/CreateStateMachine
func (c *SFN) CreateStateMachineRequest(input *CreateStateMachineInput) CreateStateMachineRequest {
op := &aws.Operation{
Name: opCreateStateMachine,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateStateMachineInput{}
}
output := &CreateStateMachineOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateStateMachineRequest{Request: req, Input: input, Copy: c.CreateStateMachineRequest}
}
const opDeleteActivity = "DeleteActivity"
// DeleteActivityRequest is a API request type for the DeleteActivity API operation.
type DeleteActivityRequest struct {
*aws.Request
Input *DeleteActivityInput
Copy func(*DeleteActivityInput) DeleteActivityRequest
}
// Send marshals and sends the DeleteActivity API request.
func (r DeleteActivityRequest) Send() (*DeleteActivityOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteActivityOutput), nil
}
// DeleteActivityRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Deletes an activity.
//
// // Example sending a request using the DeleteActivityRequest method.
// req := client.DeleteActivityRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteActivity
func (c *SFN) DeleteActivityRequest(input *DeleteActivityInput) DeleteActivityRequest {
op := &aws.Operation{
Name: opDeleteActivity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteActivityInput{}
}
output := &DeleteActivityOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteActivityRequest{Request: req, Input: input, Copy: c.DeleteActivityRequest}
}
const opDeleteStateMachine = "DeleteStateMachine"
// DeleteStateMachineRequest is a API request type for the DeleteStateMachine API operation.
type DeleteStateMachineRequest struct {
*aws.Request
Input *DeleteStateMachineInput
Copy func(*DeleteStateMachineInput) DeleteStateMachineRequest
}
// Send marshals and sends the DeleteStateMachine API request.
func (r DeleteStateMachineRequest) Send() (*DeleteStateMachineOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteStateMachineOutput), nil
}
// DeleteStateMachineRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Deletes a state machine. This is an asynchronous operation: It sets the state
// machine's status to DELETING and begins the deletion process. Each state
// machine execution is deleted the next time it makes a state transition.
//
// The state machine itself is deleted after all executions are completed or
// deleted.
//
// // Example sending a request using the DeleteStateMachineRequest method.
// req := client.DeleteStateMachineRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DeleteStateMachine
func (c *SFN) DeleteStateMachineRequest(input *DeleteStateMachineInput) DeleteStateMachineRequest {
op := &aws.Operation{
Name: opDeleteStateMachine,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteStateMachineInput{}
}
output := &DeleteStateMachineOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteStateMachineRequest{Request: req, Input: input, Copy: c.DeleteStateMachineRequest}
}
const opDescribeActivity = "DescribeActivity"
// DescribeActivityRequest is a API request type for the DescribeActivity API operation.
type DescribeActivityRequest struct {
*aws.Request
Input *DescribeActivityInput
Copy func(*DescribeActivityInput) DescribeActivityRequest
}
// Send marshals and sends the DescribeActivity API request.
func (r DescribeActivityRequest) Send() (*DescribeActivityOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeActivityOutput), nil
}
// DescribeActivityRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Describes an activity.
//
// // Example sending a request using the DescribeActivityRequest method.
// req := client.DescribeActivityRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeActivity
func (c *SFN) DescribeActivityRequest(input *DescribeActivityInput) DescribeActivityRequest {
op := &aws.Operation{
Name: opDescribeActivity,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeActivityInput{}
}
output := &DescribeActivityOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeActivityRequest{Request: req, Input: input, Copy: c.DescribeActivityRequest}
}
const opDescribeExecution = "DescribeExecution"
// DescribeExecutionRequest is a API request type for the DescribeExecution API operation.
type DescribeExecutionRequest struct {
*aws.Request
Input *DescribeExecutionInput
Copy func(*DescribeExecutionInput) DescribeExecutionRequest
}
// Send marshals and sends the DescribeExecution API request.
func (r DescribeExecutionRequest) Send() (*DescribeExecutionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeExecutionOutput), nil
}
// DescribeExecutionRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Describes an execution.
//
// // Example sending a request using the DescribeExecutionRequest method.
// req := client.DescribeExecutionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeExecution
func (c *SFN) DescribeExecutionRequest(input *DescribeExecutionInput) DescribeExecutionRequest {
op := &aws.Operation{
Name: opDescribeExecution,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeExecutionInput{}
}
output := &DescribeExecutionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeExecutionRequest{Request: req, Input: input, Copy: c.DescribeExecutionRequest}
}
const opDescribeStateMachine = "DescribeStateMachine"
// DescribeStateMachineRequest is a API request type for the DescribeStateMachine API operation.
type DescribeStateMachineRequest struct {
*aws.Request
Input *DescribeStateMachineInput
Copy func(*DescribeStateMachineInput) DescribeStateMachineRequest
}
// Send marshals and sends the DescribeStateMachine API request.
func (r DescribeStateMachineRequest) Send() (*DescribeStateMachineOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeStateMachineOutput), nil
}
// DescribeStateMachineRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Describes a state machine.
//
// // Example sending a request using the DescribeStateMachineRequest method.
// req := client.DescribeStateMachineRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachine
func (c *SFN) DescribeStateMachineRequest(input *DescribeStateMachineInput) DescribeStateMachineRequest {
op := &aws.Operation{
Name: opDescribeStateMachine,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeStateMachineInput{}
}
output := &DescribeStateMachineOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeStateMachineRequest{Request: req, Input: input, Copy: c.DescribeStateMachineRequest}
}
const opDescribeStateMachineForExecution = "DescribeStateMachineForExecution"
// DescribeStateMachineForExecutionRequest is a API request type for the DescribeStateMachineForExecution API operation.
type DescribeStateMachineForExecutionRequest struct {
*aws.Request
Input *DescribeStateMachineForExecutionInput
Copy func(*DescribeStateMachineForExecutionInput) DescribeStateMachineForExecutionRequest
}
// Send marshals and sends the DescribeStateMachineForExecution API request.
func (r DescribeStateMachineForExecutionRequest) Send() (*DescribeStateMachineForExecutionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeStateMachineForExecutionOutput), nil
}
// DescribeStateMachineForExecutionRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Describes the state machine associated with a specific execution.
//
// // Example sending a request using the DescribeStateMachineForExecutionRequest method.
// req := client.DescribeStateMachineForExecutionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/DescribeStateMachineForExecution
func (c *SFN) DescribeStateMachineForExecutionRequest(input *DescribeStateMachineForExecutionInput) DescribeStateMachineForExecutionRequest {
op := &aws.Operation{
Name: opDescribeStateMachineForExecution,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeStateMachineForExecutionInput{}
}
output := &DescribeStateMachineForExecutionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeStateMachineForExecutionRequest{Request: req, Input: input, Copy: c.DescribeStateMachineForExecutionRequest}
}
const opGetActivityTask = "GetActivityTask"
// GetActivityTaskRequest is a API request type for the GetActivityTask API operation.
type GetActivityTaskRequest struct {
*aws.Request
Input *GetActivityTaskInput
Copy func(*GetActivityTaskInput) GetActivityTaskRequest
}
// Send marshals and sends the GetActivityTask API request.
func (r GetActivityTaskRequest) Send() (*GetActivityTaskOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetActivityTaskOutput), nil
}
// GetActivityTaskRequest returns a request value for making API operation for
// AWS Step Functions.
//
// 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 taskToken with a null string.
//
// 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).
//
// // Example sending a request using the GetActivityTaskRequest method.
// req := client.GetActivityTaskRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetActivityTask
func (c *SFN) GetActivityTaskRequest(input *GetActivityTaskInput) GetActivityTaskRequest {
op := &aws.Operation{
Name: opGetActivityTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetActivityTaskInput{}
}
output := &GetActivityTaskOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetActivityTaskRequest{Request: req, Input: input, Copy: c.GetActivityTaskRequest}
}
const opGetExecutionHistory = "GetExecutionHistory"
// GetExecutionHistoryRequest is a API request type for the GetExecutionHistory API operation.
type GetExecutionHistoryRequest struct {
*aws.Request
Input *GetExecutionHistoryInput
Copy func(*GetExecutionHistoryInput) GetExecutionHistoryRequest
}
// Send marshals and sends the GetExecutionHistory API request.
func (r GetExecutionHistoryRequest) Send() (*GetExecutionHistoryOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*GetExecutionHistoryOutput), nil
}
// GetExecutionHistoryRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Returns the history of the specified execution as a list of events. By default,
// the results are returned in ascending order of the timeStamp of the events.
// Use the reverseOrder parameter to get the latest events first.
//
// If a nextToken is returned by a previous call, there are more results available.
// To retrieve the next page of results, make the call again using the returned
// token in nextToken. Keep all other arguments unchanged.
//
// // Example sending a request using the GetExecutionHistoryRequest method.
// req := client.GetExecutionHistoryRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/GetExecutionHistory
func (c *SFN) GetExecutionHistoryRequest(input *GetExecutionHistoryInput) GetExecutionHistoryRequest {
op := &aws.Operation{
Name: opGetExecutionHistory,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetExecutionHistoryInput{}
}
output := &GetExecutionHistoryOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return GetExecutionHistoryRequest{Request: req, Input: input, Copy: c.GetExecutionHistoryRequest}
}
// Paginate pages iterates over the pages of a GetExecutionHistoryRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetExecutionHistory operation.
// req := client.GetExecutionHistoryRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *GetExecutionHistoryRequest) Paginate(opts ...aws.Option) GetExecutionHistoryPager {
return GetExecutionHistoryPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *GetExecutionHistoryInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// GetExecutionHistoryPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type GetExecutionHistoryPager struct {
aws.Pager
}
func (p *GetExecutionHistoryPager) CurrentPage() *GetExecutionHistoryOutput {
return p.Pager.CurrentPage().(*GetExecutionHistoryOutput)
}
const opListActivities = "ListActivities"
// ListActivitiesRequest is a API request type for the ListActivities API operation.
type ListActivitiesRequest struct {
*aws.Request
Input *ListActivitiesInput
Copy func(*ListActivitiesInput) ListActivitiesRequest
}
// Send marshals and sends the ListActivities API request.
func (r ListActivitiesRequest) Send() (*ListActivitiesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListActivitiesOutput), nil
}
// ListActivitiesRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Lists the existing activities.
//
// If a nextToken is returned by a previous call, there are more results available.
// To retrieve the next page of results, make the call again using the returned
// token in nextToken. Keep all other arguments unchanged.
//
// // Example sending a request using the ListActivitiesRequest method.
// req := client.ListActivitiesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListActivities
func (c *SFN) ListActivitiesRequest(input *ListActivitiesInput) ListActivitiesRequest {
op := &aws.Operation{
Name: opListActivities,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListActivitiesInput{}
}
output := &ListActivitiesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListActivitiesRequest{Request: req, Input: input, Copy: c.ListActivitiesRequest}
}
// Paginate pages iterates over the pages of a ListActivitiesRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListActivities operation.
// req := client.ListActivitiesRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListActivitiesRequest) Paginate(opts ...aws.Option) ListActivitiesPager {
return ListActivitiesPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListActivitiesInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListActivitiesPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListActivitiesPager struct {
aws.Pager
}
func (p *ListActivitiesPager) CurrentPage() *ListActivitiesOutput {
return p.Pager.CurrentPage().(*ListActivitiesOutput)
}
const opListExecutions = "ListExecutions"
// ListExecutionsRequest is a API request type for the ListExecutions API operation.
type ListExecutionsRequest struct {
*aws.Request
Input *ListExecutionsInput
Copy func(*ListExecutionsInput) ListExecutionsRequest
}
// Send marshals and sends the ListExecutions API request.
func (r ListExecutionsRequest) Send() (*ListExecutionsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListExecutionsOutput), nil
}
// ListExecutionsRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Lists the executions of a state machine that meet the filtering criteria.
//
// If a nextToken is returned by a previous call, there are more results available.
// To retrieve the next page of results, make the call again using the returned
// token in nextToken. Keep all other arguments unchanged.
//
// // Example sending a request using the ListExecutionsRequest method.
// req := client.ListExecutionsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListExecutions
func (c *SFN) ListExecutionsRequest(input *ListExecutionsInput) ListExecutionsRequest {
op := &aws.Operation{
Name: opListExecutions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListExecutionsInput{}
}
output := &ListExecutionsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListExecutionsRequest{Request: req, Input: input, Copy: c.ListExecutionsRequest}
}
// Paginate pages iterates over the pages of a ListExecutionsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListExecutions operation.
// req := client.ListExecutionsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListExecutionsRequest) Paginate(opts ...aws.Option) ListExecutionsPager {
return ListExecutionsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListExecutionsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListExecutionsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListExecutionsPager struct {
aws.Pager
}
func (p *ListExecutionsPager) CurrentPage() *ListExecutionsOutput {
return p.Pager.CurrentPage().(*ListExecutionsOutput)
}
const opListStateMachines = "ListStateMachines"
// ListStateMachinesRequest is a API request type for the ListStateMachines API operation.
type ListStateMachinesRequest struct {
*aws.Request
Input *ListStateMachinesInput
Copy func(*ListStateMachinesInput) ListStateMachinesRequest
}
// Send marshals and sends the ListStateMachines API request.
func (r ListStateMachinesRequest) Send() (*ListStateMachinesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListStateMachinesOutput), nil
}
// ListStateMachinesRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Lists the existing state machines.
//
// If a nextToken is returned by a previous call, there are more results available.
// To retrieve the next page of results, make the call again using the returned
// token in nextToken. Keep all other arguments unchanged.
//
// // Example sending a request using the ListStateMachinesRequest method.
// req := client.ListStateMachinesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListStateMachines
func (c *SFN) ListStateMachinesRequest(input *ListStateMachinesInput) ListStateMachinesRequest {
op := &aws.Operation{
Name: opListStateMachines,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListStateMachinesInput{}
}
output := &ListStateMachinesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListStateMachinesRequest{Request: req, Input: input, Copy: c.ListStateMachinesRequest}
}
// Paginate pages iterates over the pages of a ListStateMachinesRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListStateMachines operation.
// req := client.ListStateMachinesRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListStateMachinesRequest) Paginate(opts ...aws.Option) ListStateMachinesPager {
return ListStateMachinesPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListStateMachinesInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListStateMachinesPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListStateMachinesPager struct {
aws.Pager
}
func (p *ListStateMachinesPager) CurrentPage() *ListStateMachinesOutput {
return p.Pager.CurrentPage().(*ListStateMachinesOutput)
}
const opSendTaskFailure = "SendTaskFailure"
// SendTaskFailureRequest is a API request type for the SendTaskFailure API operation.
type SendTaskFailureRequest struct {
*aws.Request
Input *SendTaskFailureInput
Copy func(*SendTaskFailureInput) SendTaskFailureRequest
}
// Send marshals and sends the SendTaskFailure API request.
func (r SendTaskFailureRequest) Send() (*SendTaskFailureOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*SendTaskFailureOutput), nil
}
// SendTaskFailureRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Used by workers to report that the task identified by the taskToken failed.
//
// // Example sending a request using the SendTaskFailureRequest method.
// req := client.SendTaskFailureRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/SendTaskFailure
func (c *SFN) SendTaskFailureRequest(input *SendTaskFailureInput) SendTaskFailureRequest {
op := &aws.Operation{
Name: opSendTaskFailure,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SendTaskFailureInput{}
}
output := &SendTaskFailureOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return SendTaskFailureRequest{Request: req, Input: input, Copy: c.SendTaskFailureRequest}
}
const opSendTaskHeartbeat = "SendTaskHeartbeat"
// SendTaskHeartbeatRequest is a API request type for the SendTaskHeartbeat API operation.
type SendTaskHeartbeatRequest struct {
*aws.Request
Input *SendTaskHeartbeatInput
Copy func(*SendTaskHeartbeatInput) SendTaskHeartbeatRequest
}
// Send marshals and sends the SendTaskHeartbeat API request.
func (r SendTaskHeartbeatRequest) Send() (*SendTaskHeartbeatOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*SendTaskHeartbeatOutput), nil
}
// SendTaskHeartbeatRequest returns a request value for making API operation for
// AWS Step Functions.
//
// Used by workers to report to the service that the task represented by the
// specified taskToken is still making progress. This action resets the Heartbeat
// clock. The Heartbeat threshold is specified in the state machine's Amazon
// States Language definition. This action does not in itself create an event
// in the execution history. However, if the task times out, the execution history
// contains an ActivityTimedOut event.
//
// The Timeout of a task, defined in the state machine's Amazon States Language
// definition, is its maximum allowed duration, regardless of the number of
// SendTaskHeartbeat requests received.
//
// This operation is only useful for long-lived tasks to report the liveliness
// of the task.
//
// // Example sending a request using the SendTaskHeartbeatRequest method.
// req := client.SendTaskHeartbeatRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)