/
api.go
4467 lines (3828 loc) · 146 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 globalaccelerator
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"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 opCreateAccelerator = "CreateAccelerator"
// CreateAcceleratorRequest generates a "aws/request.Request" representing the
// client's request for the CreateAccelerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateAccelerator for more information on using the CreateAccelerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateAcceleratorRequest method.
// req, resp := client.CreateAcceleratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator
func (c *GlobalAccelerator) CreateAcceleratorRequest(input *CreateAcceleratorInput) (req *request.Request, output *CreateAcceleratorOutput) {
op := &request.Operation{
Name: opCreateAccelerator,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAcceleratorInput{}
}
output = &CreateAcceleratorOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateAccelerator API operation for AWS Global Accelerator.
//
// Create an accelerator. An accelerator includes one or more listeners that
// process inbound connections and direct traffic to one or more endpoint groups,
// each of which includes endpoints, such as Network Load Balancers. To see
// an AWS CLI example of creating an accelerator, scroll down to Example.
//
// You must specify the US-West-2 (Oregon) Region to create or update accelerators.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation CreateAccelerator for usage and error information.
//
// Returned Error Types:
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * LimitExceededException
// Processing your request would cause you to exceed an AWS Global Accelerator
// limit.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator
func (c *GlobalAccelerator) CreateAccelerator(input *CreateAcceleratorInput) (*CreateAcceleratorOutput, error) {
req, out := c.CreateAcceleratorRequest(input)
return out, req.Send()
}
// CreateAcceleratorWithContext is the same as CreateAccelerator with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAccelerator for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) CreateAcceleratorWithContext(ctx aws.Context, input *CreateAcceleratorInput, opts ...request.Option) (*CreateAcceleratorOutput, error) {
req, out := c.CreateAcceleratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateEndpointGroup = "CreateEndpointGroup"
// CreateEndpointGroupRequest generates a "aws/request.Request" representing the
// client's request for the CreateEndpointGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateEndpointGroup for more information on using the CreateEndpointGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateEndpointGroupRequest method.
// req, resp := client.CreateEndpointGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup
func (c *GlobalAccelerator) CreateEndpointGroupRequest(input *CreateEndpointGroupInput) (req *request.Request, output *CreateEndpointGroupOutput) {
op := &request.Operation{
Name: opCreateEndpointGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEndpointGroupInput{}
}
output = &CreateEndpointGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateEndpointGroup API operation for AWS Global Accelerator.
//
// Create an endpoint group for the specified listener. An endpoint group is
// a collection of endpoints in one AWS Region. To see an AWS CLI example of
// creating an endpoint group, scroll down to Example.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation CreateEndpointGroup for usage and error information.
//
// Returned Error Types:
// * AcceleratorNotFoundException
// The accelerator that you specified doesn't exist.
//
// * EndpointGroupAlreadyExistsException
// The endpoint group that you specified already exists.
//
// * ListenerNotFoundException
// The listener that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * LimitExceededException
// Processing your request would cause you to exceed an AWS Global Accelerator
// limit.
//
// * AccessDeniedException
// You don't have access permission.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup
func (c *GlobalAccelerator) CreateEndpointGroup(input *CreateEndpointGroupInput) (*CreateEndpointGroupOutput, error) {
req, out := c.CreateEndpointGroupRequest(input)
return out, req.Send()
}
// CreateEndpointGroupWithContext is the same as CreateEndpointGroup with the addition of
// the ability to pass a context and additional request options.
//
// See CreateEndpointGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) CreateEndpointGroupWithContext(ctx aws.Context, input *CreateEndpointGroupInput, opts ...request.Option) (*CreateEndpointGroupOutput, error) {
req, out := c.CreateEndpointGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateListener = "CreateListener"
// CreateListenerRequest generates a "aws/request.Request" representing the
// client's request for the CreateListener operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateListener for more information on using the CreateListener
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateListenerRequest method.
// req, resp := client.CreateListenerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener
func (c *GlobalAccelerator) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) {
op := &request.Operation{
Name: opCreateListener,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateListenerInput{}
}
output = &CreateListenerOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateListener API operation for AWS Global Accelerator.
//
// Create a listener to process inbound connections from clients to an accelerator.
// Connections arrive to assigned static IP addresses on a port, port range,
// or list of port ranges that you specify. To see an AWS CLI example of creating
// a listener, scroll down to Example.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation CreateListener for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * AcceleratorNotFoundException
// The accelerator that you specified doesn't exist.
//
// * InvalidPortRangeException
// The port numbers that you specified are not valid numbers or are not unique
// for this accelerator.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * LimitExceededException
// Processing your request would cause you to exceed an AWS Global Accelerator
// limit.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener
func (c *GlobalAccelerator) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) {
req, out := c.CreateListenerRequest(input)
return out, req.Send()
}
// CreateListenerWithContext is the same as CreateListener with the addition of
// the ability to pass a context and additional request options.
//
// See CreateListener for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) {
req, out := c.CreateListenerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteAccelerator = "DeleteAccelerator"
// DeleteAcceleratorRequest generates a "aws/request.Request" representing the
// client's request for the DeleteAccelerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteAccelerator for more information on using the DeleteAccelerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteAcceleratorRequest method.
// req, resp := client.DeleteAcceleratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator
func (c *GlobalAccelerator) DeleteAcceleratorRequest(input *DeleteAcceleratorInput) (req *request.Request, output *DeleteAcceleratorOutput) {
op := &request.Operation{
Name: opDeleteAccelerator,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteAcceleratorInput{}
}
output = &DeleteAcceleratorOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteAccelerator API operation for AWS Global Accelerator.
//
// Delete an accelerator. Note: before you can delete an accelerator, you must
// disable it and remove all dependent resources (listeners and endpoint groups).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DeleteAccelerator for usage and error information.
//
// Returned Error Types:
// * AcceleratorNotFoundException
// The accelerator that you specified doesn't exist.
//
// * AcceleratorNotDisabledException
// The accelerator that you specified could not be disabled.
//
// * AssociatedListenerFoundException
// The accelerator that you specified has a listener associated with it. You
// must remove all dependent resources from an accelerator before you can delete
// it.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator
func (c *GlobalAccelerator) DeleteAccelerator(input *DeleteAcceleratorInput) (*DeleteAcceleratorOutput, error) {
req, out := c.DeleteAcceleratorRequest(input)
return out, req.Send()
}
// DeleteAcceleratorWithContext is the same as DeleteAccelerator with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteAccelerator for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DeleteAcceleratorWithContext(ctx aws.Context, input *DeleteAcceleratorInput, opts ...request.Option) (*DeleteAcceleratorOutput, error) {
req, out := c.DeleteAcceleratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteEndpointGroup = "DeleteEndpointGroup"
// DeleteEndpointGroupRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEndpointGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteEndpointGroup for more information on using the DeleteEndpointGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteEndpointGroupRequest method.
// req, resp := client.DeleteEndpointGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup
func (c *GlobalAccelerator) DeleteEndpointGroupRequest(input *DeleteEndpointGroupInput) (req *request.Request, output *DeleteEndpointGroupOutput) {
op := &request.Operation{
Name: opDeleteEndpointGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEndpointGroupInput{}
}
output = &DeleteEndpointGroupOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteEndpointGroup API operation for AWS Global Accelerator.
//
// Delete an endpoint group from a listener.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DeleteEndpointGroup for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * EndpointGroupNotFoundException
// The endpoint group that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup
func (c *GlobalAccelerator) DeleteEndpointGroup(input *DeleteEndpointGroupInput) (*DeleteEndpointGroupOutput, error) {
req, out := c.DeleteEndpointGroupRequest(input)
return out, req.Send()
}
// DeleteEndpointGroupWithContext is the same as DeleteEndpointGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteEndpointGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DeleteEndpointGroupWithContext(ctx aws.Context, input *DeleteEndpointGroupInput, opts ...request.Option) (*DeleteEndpointGroupOutput, error) {
req, out := c.DeleteEndpointGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteListener = "DeleteListener"
// DeleteListenerRequest generates a "aws/request.Request" representing the
// client's request for the DeleteListener operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteListener for more information on using the DeleteListener
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteListenerRequest method.
// req, resp := client.DeleteListenerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener
func (c *GlobalAccelerator) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) {
op := &request.Operation{
Name: opDeleteListener,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteListenerInput{}
}
output = &DeleteListenerOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteListener API operation for AWS Global Accelerator.
//
// Delete a listener from an accelerator.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DeleteListener for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * ListenerNotFoundException
// The listener that you specified doesn't exist.
//
// * AssociatedEndpointGroupFoundException
// The listener that you specified has an endpoint group associated with it.
// You must remove all dependent resources from a listener before you can delete
// it.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener
func (c *GlobalAccelerator) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) {
req, out := c.DeleteListenerRequest(input)
return out, req.Send()
}
// DeleteListenerWithContext is the same as DeleteListener with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteListener for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) {
req, out := c.DeleteListenerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAccelerator = "DescribeAccelerator"
// DescribeAcceleratorRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAccelerator operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAccelerator for more information on using the DescribeAccelerator
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAcceleratorRequest method.
// req, resp := client.DescribeAcceleratorRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator
func (c *GlobalAccelerator) DescribeAcceleratorRequest(input *DescribeAcceleratorInput) (req *request.Request, output *DescribeAcceleratorOutput) {
op := &request.Operation{
Name: opDescribeAccelerator,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAcceleratorInput{}
}
output = &DescribeAcceleratorOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAccelerator API operation for AWS Global Accelerator.
//
// Describe an accelerator. To see an AWS CLI example of describing an accelerator,
// scroll down to Example.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DescribeAccelerator for usage and error information.
//
// Returned Error Types:
// * AcceleratorNotFoundException
// The accelerator that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator
func (c *GlobalAccelerator) DescribeAccelerator(input *DescribeAcceleratorInput) (*DescribeAcceleratorOutput, error) {
req, out := c.DescribeAcceleratorRequest(input)
return out, req.Send()
}
// DescribeAcceleratorWithContext is the same as DescribeAccelerator with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAccelerator for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DescribeAcceleratorWithContext(ctx aws.Context, input *DescribeAcceleratorInput, opts ...request.Option) (*DescribeAcceleratorOutput, error) {
req, out := c.DescribeAcceleratorRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeAcceleratorAttributes = "DescribeAcceleratorAttributes"
// DescribeAcceleratorAttributesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAcceleratorAttributes operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeAcceleratorAttributes for more information on using the DescribeAcceleratorAttributes
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeAcceleratorAttributesRequest method.
// req, resp := client.DescribeAcceleratorAttributesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes
func (c *GlobalAccelerator) DescribeAcceleratorAttributesRequest(input *DescribeAcceleratorAttributesInput) (req *request.Request, output *DescribeAcceleratorAttributesOutput) {
op := &request.Operation{
Name: opDescribeAcceleratorAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeAcceleratorAttributesInput{}
}
output = &DescribeAcceleratorAttributesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeAcceleratorAttributes API operation for AWS Global Accelerator.
//
// Describe the attributes of an accelerator.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DescribeAcceleratorAttributes for usage and error information.
//
// Returned Error Types:
// * AcceleratorNotFoundException
// The accelerator that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes
func (c *GlobalAccelerator) DescribeAcceleratorAttributes(input *DescribeAcceleratorAttributesInput) (*DescribeAcceleratorAttributesOutput, error) {
req, out := c.DescribeAcceleratorAttributesRequest(input)
return out, req.Send()
}
// DescribeAcceleratorAttributesWithContext is the same as DescribeAcceleratorAttributes with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeAcceleratorAttributes for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DescribeAcceleratorAttributesWithContext(ctx aws.Context, input *DescribeAcceleratorAttributesInput, opts ...request.Option) (*DescribeAcceleratorAttributesOutput, error) {
req, out := c.DescribeAcceleratorAttributesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeEndpointGroup = "DescribeEndpointGroup"
// DescribeEndpointGroupRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEndpointGroup operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeEndpointGroup for more information on using the DescribeEndpointGroup
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeEndpointGroupRequest method.
// req, resp := client.DescribeEndpointGroupRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup
func (c *GlobalAccelerator) DescribeEndpointGroupRequest(input *DescribeEndpointGroupInput) (req *request.Request, output *DescribeEndpointGroupOutput) {
op := &request.Operation{
Name: opDescribeEndpointGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEndpointGroupInput{}
}
output = &DescribeEndpointGroupOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeEndpointGroup API operation for AWS Global Accelerator.
//
// Describe an endpoint group.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DescribeEndpointGroup for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * EndpointGroupNotFoundException
// The endpoint group that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup
func (c *GlobalAccelerator) DescribeEndpointGroup(input *DescribeEndpointGroupInput) (*DescribeEndpointGroupOutput, error) {
req, out := c.DescribeEndpointGroupRequest(input)
return out, req.Send()
}
// DescribeEndpointGroupWithContext is the same as DescribeEndpointGroup with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeEndpointGroup for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DescribeEndpointGroupWithContext(ctx aws.Context, input *DescribeEndpointGroupInput, opts ...request.Option) (*DescribeEndpointGroupOutput, error) {
req, out := c.DescribeEndpointGroupRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeListener = "DescribeListener"
// DescribeListenerRequest generates a "aws/request.Request" representing the
// client's request for the DescribeListener operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeListener for more information on using the DescribeListener
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeListenerRequest method.
// req, resp := client.DescribeListenerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener
func (c *GlobalAccelerator) DescribeListenerRequest(input *DescribeListenerInput) (req *request.Request, output *DescribeListenerOutput) {
op := &request.Operation{
Name: opDescribeListener,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeListenerInput{}
}
output = &DescribeListenerOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeListener API operation for AWS Global Accelerator.
//
// Describe a listener.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation DescribeListener for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * ListenerNotFoundException
// The listener that you specified doesn't exist.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener
func (c *GlobalAccelerator) DescribeListener(input *DescribeListenerInput) (*DescribeListenerOutput, error) {
req, out := c.DescribeListenerRequest(input)
return out, req.Send()
}
// DescribeListenerWithContext is the same as DescribeListener with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeListener for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) DescribeListenerWithContext(ctx aws.Context, input *DescribeListenerInput, opts ...request.Option) (*DescribeListenerOutput, error) {
req, out := c.DescribeListenerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListAccelerators = "ListAccelerators"
// ListAcceleratorsRequest generates a "aws/request.Request" representing the
// client's request for the ListAccelerators operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListAccelerators for more information on using the ListAccelerators
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListAcceleratorsRequest method.
// req, resp := client.ListAcceleratorsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators
func (c *GlobalAccelerator) ListAcceleratorsRequest(input *ListAcceleratorsInput) (req *request.Request, output *ListAcceleratorsOutput) {
op := &request.Operation{
Name: opListAccelerators,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListAcceleratorsInput{}
}
output = &ListAcceleratorsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListAccelerators API operation for AWS Global Accelerator.
//
// List the accelerators for an AWS account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Global Accelerator's
// API operation ListAccelerators for usage and error information.
//
// Returned Error Types:
// * InvalidArgumentException
// An argument that you specified is invalid.
//
// * InvalidNextTokenException
// There isn't another item to return.
//
// * InternalServiceErrorException
// There was an internal error for AWS Global Accelerator.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators
func (c *GlobalAccelerator) ListAccelerators(input *ListAcceleratorsInput) (*ListAcceleratorsOutput, error) {
req, out := c.ListAcceleratorsRequest(input)
return out, req.Send()
}
// ListAcceleratorsWithContext is the same as ListAccelerators with the addition of
// the ability to pass a context and additional request options.
//
// See ListAccelerators for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *GlobalAccelerator) ListAcceleratorsWithContext(ctx aws.Context, input *ListAcceleratorsInput, opts ...request.Option) (*ListAcceleratorsOutput, error) {
req, out := c.ListAcceleratorsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}