forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
2976 lines (2552 loc) · 98.6 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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package datapipeline provides a client for AWS Data Pipeline.
package datapipeline
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opActivatePipeline = "ActivatePipeline"
// ActivatePipelineRequest generates a "aws/request.Request" representing the
// client's request for the ActivatePipeline operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ActivatePipeline method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ActivatePipelineRequest method.
// req, resp := client.ActivatePipelineRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) ActivatePipelineRequest(input *ActivatePipelineInput) (req *request.Request, output *ActivatePipelineOutput) {
op := &request.Operation{
Name: opActivatePipeline,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ActivatePipelineInput{}
}
req = c.newRequest(op, input, output)
output = &ActivatePipelineOutput{}
req.Data = output
return
}
// Validates the specified pipeline and starts processing pipeline tasks. If
// the pipeline does not pass validation, activation fails.
//
// If you need to pause the pipeline to investigate an issue with a component,
// such as a data source or script, call DeactivatePipeline.
//
// To activate a finished pipeline, modify the end date for the pipeline and
// then activate it.
func (c *DataPipeline) ActivatePipeline(input *ActivatePipelineInput) (*ActivatePipelineOutput, error) {
req, out := c.ActivatePipelineRequest(input)
err := req.Send()
return out, err
}
const opAddTags = "AddTags"
// AddTagsRequest generates a "aws/request.Request" representing the
// client's request for the AddTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AddTags method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the AddTagsRequest method.
// req, resp := client.AddTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
op := &request.Operation{
Name: opAddTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsInput{}
}
req = c.newRequest(op, input, output)
output = &AddTagsOutput{}
req.Data = output
return
}
// Adds or modifies tags for the specified pipeline.
func (c *DataPipeline) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
req, out := c.AddTagsRequest(input)
err := req.Send()
return out, err
}
const opCreatePipeline = "CreatePipeline"
// CreatePipelineRequest generates a "aws/request.Request" representing the
// client's request for the CreatePipeline operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreatePipeline method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreatePipelineRequest method.
// req, resp := client.CreatePipelineRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) {
op := &request.Operation{
Name: opCreatePipeline,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreatePipelineInput{}
}
req = c.newRequest(op, input, output)
output = &CreatePipelineOutput{}
req.Data = output
return
}
// Creates a new, empty pipeline. Use PutPipelineDefinition to populate the
// pipeline.
func (c *DataPipeline) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) {
req, out := c.CreatePipelineRequest(input)
err := req.Send()
return out, err
}
const opDeactivatePipeline = "DeactivatePipeline"
// DeactivatePipelineRequest generates a "aws/request.Request" representing the
// client's request for the DeactivatePipeline operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeactivatePipeline method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeactivatePipelineRequest method.
// req, resp := client.DeactivatePipelineRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) DeactivatePipelineRequest(input *DeactivatePipelineInput) (req *request.Request, output *DeactivatePipelineOutput) {
op := &request.Operation{
Name: opDeactivatePipeline,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeactivatePipelineInput{}
}
req = c.newRequest(op, input, output)
output = &DeactivatePipelineOutput{}
req.Data = output
return
}
// Deactivates the specified running pipeline. The pipeline is set to the DEACTIVATING
// state until the deactivation process completes.
//
// To resume a deactivated pipeline, use ActivatePipeline. By default, the
// pipeline resumes from the last completed execution. Optionally, you can specify
// the date and time to resume the pipeline.
func (c *DataPipeline) DeactivatePipeline(input *DeactivatePipelineInput) (*DeactivatePipelineOutput, error) {
req, out := c.DeactivatePipelineRequest(input)
err := req.Send()
return out, err
}
const opDeletePipeline = "DeletePipeline"
// DeletePipelineRequest generates a "aws/request.Request" representing the
// client's request for the DeletePipeline operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeletePipeline method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeletePipelineRequest method.
// req, resp := client.DeletePipelineRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) {
op := &request.Operation{
Name: opDeletePipeline,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeletePipelineInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &DeletePipelineOutput{}
req.Data = output
return
}
// Deletes a pipeline, its pipeline definition, and its run history. AWS Data
// Pipeline attempts to cancel instances associated with the pipeline that are
// currently being processed by task runners.
//
// Deleting a pipeline cannot be undone. You cannot query or restore a deleted
// pipeline. To temporarily pause a pipeline instead of deleting it, call SetStatus
// with the status set to PAUSE on individual components. Components that are
// paused by SetStatus can be resumed.
func (c *DataPipeline) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) {
req, out := c.DeletePipelineRequest(input)
err := req.Send()
return out, err
}
const opDescribeObjects = "DescribeObjects"
// DescribeObjectsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeObjects operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeObjects method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeObjectsRequest method.
// req, resp := client.DescribeObjectsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) DescribeObjectsRequest(input *DescribeObjectsInput) (req *request.Request, output *DescribeObjectsOutput) {
op := &request.Operation{
Name: opDescribeObjects,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"marker"},
OutputTokens: []string{"marker"},
LimitToken: "",
TruncationToken: "hasMoreResults",
},
}
if input == nil {
input = &DescribeObjectsInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeObjectsOutput{}
req.Data = output
return
}
// Gets the object definitions for a set of objects associated with the pipeline.
// Object definitions are composed of a set of fields that define the properties
// of the object.
func (c *DataPipeline) DescribeObjects(input *DescribeObjectsInput) (*DescribeObjectsOutput, error) {
req, out := c.DescribeObjectsRequest(input)
err := req.Send()
return out, err
}
// DescribeObjectsPages iterates over the pages of a DescribeObjects operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeObjects method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeObjects operation.
// pageNum := 0
// err := client.DescribeObjectsPages(params,
// func(page *DescribeObjectsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *DataPipeline) DescribeObjectsPages(input *DescribeObjectsInput, fn func(p *DescribeObjectsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeObjectsRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeObjectsOutput), lastPage)
})
}
const opDescribePipelines = "DescribePipelines"
// DescribePipelinesRequest generates a "aws/request.Request" representing the
// client's request for the DescribePipelines operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribePipelines method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribePipelinesRequest method.
// req, resp := client.DescribePipelinesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) DescribePipelinesRequest(input *DescribePipelinesInput) (req *request.Request, output *DescribePipelinesOutput) {
op := &request.Operation{
Name: opDescribePipelines,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribePipelinesInput{}
}
req = c.newRequest(op, input, output)
output = &DescribePipelinesOutput{}
req.Data = output
return
}
// Retrieves metadata about one or more pipelines. The information retrieved
// includes the name of the pipeline, the pipeline identifier, its current state,
// and the user account that owns the pipeline. Using account credentials, you
// can retrieve metadata about pipelines that you or your IAM users have created.
// If you are using an IAM user account, you can retrieve metadata about only
// those pipelines for which you have read permissions.
//
// To retrieve the full pipeline definition instead of metadata about the pipeline,
// call GetPipelineDefinition.
func (c *DataPipeline) DescribePipelines(input *DescribePipelinesInput) (*DescribePipelinesOutput, error) {
req, out := c.DescribePipelinesRequest(input)
err := req.Send()
return out, err
}
const opEvaluateExpression = "EvaluateExpression"
// EvaluateExpressionRequest generates a "aws/request.Request" representing the
// client's request for the EvaluateExpression operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the EvaluateExpression method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the EvaluateExpressionRequest method.
// req, resp := client.EvaluateExpressionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) EvaluateExpressionRequest(input *EvaluateExpressionInput) (req *request.Request, output *EvaluateExpressionOutput) {
op := &request.Operation{
Name: opEvaluateExpression,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EvaluateExpressionInput{}
}
req = c.newRequest(op, input, output)
output = &EvaluateExpressionOutput{}
req.Data = output
return
}
// Task runners call EvaluateExpression to evaluate a string in the context
// of the specified object. For example, a task runner can evaluate SQL queries
// stored in Amazon S3.
func (c *DataPipeline) EvaluateExpression(input *EvaluateExpressionInput) (*EvaluateExpressionOutput, error) {
req, out := c.EvaluateExpressionRequest(input)
err := req.Send()
return out, err
}
const opGetPipelineDefinition = "GetPipelineDefinition"
// GetPipelineDefinitionRequest generates a "aws/request.Request" representing the
// client's request for the GetPipelineDefinition operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the GetPipelineDefinition method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetPipelineDefinitionRequest method.
// req, resp := client.GetPipelineDefinitionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) GetPipelineDefinitionRequest(input *GetPipelineDefinitionInput) (req *request.Request, output *GetPipelineDefinitionOutput) {
op := &request.Operation{
Name: opGetPipelineDefinition,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetPipelineDefinitionInput{}
}
req = c.newRequest(op, input, output)
output = &GetPipelineDefinitionOutput{}
req.Data = output
return
}
// Gets the definition of the specified pipeline. You can call GetPipelineDefinition
// to retrieve the pipeline definition that you provided using PutPipelineDefinition.
func (c *DataPipeline) GetPipelineDefinition(input *GetPipelineDefinitionInput) (*GetPipelineDefinitionOutput, error) {
req, out := c.GetPipelineDefinitionRequest(input)
err := req.Send()
return out, err
}
const opListPipelines = "ListPipelines"
// ListPipelinesRequest generates a "aws/request.Request" representing the
// client's request for the ListPipelines operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListPipelines method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListPipelinesRequest method.
// req, resp := client.ListPipelinesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) {
op := &request.Operation{
Name: opListPipelines,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"marker"},
OutputTokens: []string{"marker"},
LimitToken: "",
TruncationToken: "hasMoreResults",
},
}
if input == nil {
input = &ListPipelinesInput{}
}
req = c.newRequest(op, input, output)
output = &ListPipelinesOutput{}
req.Data = output
return
}
// Lists the pipeline identifiers for all active pipelines that you have permission
// to access.
func (c *DataPipeline) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) {
req, out := c.ListPipelinesRequest(input)
err := req.Send()
return out, err
}
// ListPipelinesPages iterates over the pages of a ListPipelines operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListPipelines method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListPipelines operation.
// pageNum := 0
// err := client.ListPipelinesPages(params,
// func(page *ListPipelinesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *DataPipeline) ListPipelinesPages(input *ListPipelinesInput, fn func(p *ListPipelinesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.ListPipelinesRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*ListPipelinesOutput), lastPage)
})
}
const opPollForTask = "PollForTask"
// PollForTaskRequest generates a "aws/request.Request" representing the
// client's request for the PollForTask operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PollForTask method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PollForTaskRequest method.
// req, resp := client.PollForTaskRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) PollForTaskRequest(input *PollForTaskInput) (req *request.Request, output *PollForTaskOutput) {
op := &request.Operation{
Name: opPollForTask,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PollForTaskInput{}
}
req = c.newRequest(op, input, output)
output = &PollForTaskOutput{}
req.Data = output
return
}
// Task runners call PollForTask to receive a task to perform from AWS Data
// Pipeline. The task runner specifies which tasks it can perform by setting
// a value for the workerGroup parameter. The task returned can come from any
// of the pipelines that match the workerGroup value passed in by the task runner
// and that was launched using the IAM user credentials specified by the task
// runner.
//
// If tasks are ready in the work queue, PollForTask returns a response immediately.
// If no tasks are available in the queue, PollForTask uses long-polling and
// holds on to a poll connection for up to a 90 seconds, during which time the
// first newly scheduled task is handed to the task runner. To accomodate this,
// set the socket timeout in your task runner to 90 seconds. The task runner
// should not call PollForTask again on the same workerGroup until it receives
// a response, and this can take up to 90 seconds.
func (c *DataPipeline) PollForTask(input *PollForTaskInput) (*PollForTaskOutput, error) {
req, out := c.PollForTaskRequest(input)
err := req.Send()
return out, err
}
const opPutPipelineDefinition = "PutPipelineDefinition"
// PutPipelineDefinitionRequest generates a "aws/request.Request" representing the
// client's request for the PutPipelineDefinition operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the PutPipelineDefinition method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PutPipelineDefinitionRequest method.
// req, resp := client.PutPipelineDefinitionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) PutPipelineDefinitionRequest(input *PutPipelineDefinitionInput) (req *request.Request, output *PutPipelineDefinitionOutput) {
op := &request.Operation{
Name: opPutPipelineDefinition,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutPipelineDefinitionInput{}
}
req = c.newRequest(op, input, output)
output = &PutPipelineDefinitionOutput{}
req.Data = output
return
}
// Adds tasks, schedules, and preconditions to the specified pipeline. You can
// use PutPipelineDefinition to populate a new pipeline.
//
// PutPipelineDefinition also validates the configuration as it adds it to
// the pipeline. Changes to the pipeline are saved unless one of the following
// three validation errors exists in the pipeline.
//
// An object is missing a name or identifier field. A string or reference
// field is empty. The number of objects in the pipeline exceeds the maximum
// allowed objects. The pipeline is in a FINISHED state. Pipeline object definitions
// are passed to the PutPipelineDefinition action and returned by the GetPipelineDefinition
// action.
func (c *DataPipeline) PutPipelineDefinition(input *PutPipelineDefinitionInput) (*PutPipelineDefinitionOutput, error) {
req, out := c.PutPipelineDefinitionRequest(input)
err := req.Send()
return out, err
}
const opQueryObjects = "QueryObjects"
// QueryObjectsRequest generates a "aws/request.Request" representing the
// client's request for the QueryObjects operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the QueryObjects method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the QueryObjectsRequest method.
// req, resp := client.QueryObjectsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) QueryObjectsRequest(input *QueryObjectsInput) (req *request.Request, output *QueryObjectsOutput) {
op := &request.Operation{
Name: opQueryObjects,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"marker"},
OutputTokens: []string{"marker"},
LimitToken: "limit",
TruncationToken: "hasMoreResults",
},
}
if input == nil {
input = &QueryObjectsInput{}
}
req = c.newRequest(op, input, output)
output = &QueryObjectsOutput{}
req.Data = output
return
}
// Queries the specified pipeline for the names of objects that match the specified
// set of conditions.
func (c *DataPipeline) QueryObjects(input *QueryObjectsInput) (*QueryObjectsOutput, error) {
req, out := c.QueryObjectsRequest(input)
err := req.Send()
return out, err
}
// QueryObjectsPages iterates over the pages of a QueryObjects operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See QueryObjects method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a QueryObjects operation.
// pageNum := 0
// err := client.QueryObjectsPages(params,
// func(page *QueryObjectsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *DataPipeline) QueryObjectsPages(input *QueryObjectsInput, fn func(p *QueryObjectsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.QueryObjectsRequest(input)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*QueryObjectsOutput), lastPage)
})
}
const opRemoveTags = "RemoveTags"
// RemoveTagsRequest generates a "aws/request.Request" representing the
// client's request for the RemoveTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the RemoveTags method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the RemoveTagsRequest method.
// req, resp := client.RemoveTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
op := &request.Operation{
Name: opRemoveTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RemoveTagsInput{}
}
req = c.newRequest(op, input, output)
output = &RemoveTagsOutput{}
req.Data = output
return
}
// Removes existing tags from the specified pipeline.
func (c *DataPipeline) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
req, out := c.RemoveTagsRequest(input)
err := req.Send()
return out, err
}
const opReportTaskProgress = "ReportTaskProgress"
// ReportTaskProgressRequest generates a "aws/request.Request" representing the
// client's request for the ReportTaskProgress operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ReportTaskProgress method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ReportTaskProgressRequest method.
// req, resp := client.ReportTaskProgressRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) ReportTaskProgressRequest(input *ReportTaskProgressInput) (req *request.Request, output *ReportTaskProgressOutput) {
op := &request.Operation{
Name: opReportTaskProgress,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ReportTaskProgressInput{}
}
req = c.newRequest(op, input, output)
output = &ReportTaskProgressOutput{}
req.Data = output
return
}
// Task runners call ReportTaskProgress when assigned a task to acknowledge
// that it has the task. If the web service does not receive this acknowledgement
// within 2 minutes, it assigns the task in a subsequent PollForTask call. After
// this initial acknowledgement, the task runner only needs to report progress
// every 15 minutes to maintain its ownership of the task. You can change this
// reporting time from 15 minutes by specifying a reportProgressTimeout field
// in your pipeline.
//
// If a task runner does not report its status after 5 minutes, AWS Data Pipeline
// assumes that the task runner is unable to process the task and reassigns
// the task in a subsequent response to PollForTask. Task runners should call
// ReportTaskProgress every 60 seconds.
func (c *DataPipeline) ReportTaskProgress(input *ReportTaskProgressInput) (*ReportTaskProgressOutput, error) {
req, out := c.ReportTaskProgressRequest(input)
err := req.Send()
return out, err
}
const opReportTaskRunnerHeartbeat = "ReportTaskRunnerHeartbeat"
// ReportTaskRunnerHeartbeatRequest generates a "aws/request.Request" representing the
// client's request for the ReportTaskRunnerHeartbeat operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ReportTaskRunnerHeartbeat method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ReportTaskRunnerHeartbeatRequest method.
// req, resp := client.ReportTaskRunnerHeartbeatRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) ReportTaskRunnerHeartbeatRequest(input *ReportTaskRunnerHeartbeatInput) (req *request.Request, output *ReportTaskRunnerHeartbeatOutput) {
op := &request.Operation{
Name: opReportTaskRunnerHeartbeat,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ReportTaskRunnerHeartbeatInput{}
}
req = c.newRequest(op, input, output)
output = &ReportTaskRunnerHeartbeatOutput{}
req.Data = output
return
}
// Task runners call ReportTaskRunnerHeartbeat every 15 minutes to indicate
// that they are operational. If the AWS Data Pipeline Task Runner is launched
// on a resource managed by AWS Data Pipeline, the web service can use this
// call to detect when the task runner application has failed and restart a
// new instance.
func (c *DataPipeline) ReportTaskRunnerHeartbeat(input *ReportTaskRunnerHeartbeatInput) (*ReportTaskRunnerHeartbeatOutput, error) {
req, out := c.ReportTaskRunnerHeartbeatRequest(input)
err := req.Send()
return out, err
}
const opSetStatus = "SetStatus"
// SetStatusRequest generates a "aws/request.Request" representing the
// client's request for the SetStatus operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the SetStatus method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the SetStatusRequest method.
// req, resp := client.SetStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *DataPipeline) SetStatusRequest(input *SetStatusInput) (req *request.Request, output *SetStatusOutput) {
op := &request.Operation{
Name: opSetStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetStatusInput{}
}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output = &SetStatusOutput{}
req.Data = output
return
}
// Requests that the status of the specified physical or logical pipeline objects
// be updated in the specified pipeline. This update might not occur immediately,
// but is eventually consistent. The status that can be set depends on the type
// of object (for example, DataNode or Activity). You cannot perform this operation
// on FINISHED pipelines and attempting to do so returns InvalidRequestException.