forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
6475 lines (5635 loc) · 227 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 elb
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"
)
const opAddTags = "AddTags"
// AddTagsRequest generates a "aws/request.Request" representing the
// client's request for the AddTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 AddTags for more information on using the AddTags
// 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 AddTagsRequest method.
// req, resp := client.AddTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags
func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
op := &request.Operation{
Name: opAddTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsInput{}
}
output = &AddTagsOutput{}
req = c.newRequest(op, input, output)
return
}
// AddTags API operation for Elastic Load Balancing.
//
// Adds the specified tags to the specified load balancer. Each load balancer
// can have a maximum of 10 tags.
//
// Each tag consists of a key and an optional value. If a tag with the same
// key is already associated with the load balancer, AddTags updates its value.
//
// For more information, see Tag Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation AddTags for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeTooManyTagsException "TooManyTags"
// The quota for the number of tags that can be assigned to a load balancer
// has been reached.
//
// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys"
// A tag key was specified more than once.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags
func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
req, out := c.AddTagsRequest(input)
return out, req.Send()
}
// AddTagsWithContext is the same as AddTags with the addition of
// the ability to pass a context and additional request options.
//
// See AddTags 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 *ELB) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
req, out := c.AddTagsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer"
// ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the
// client's request for the ApplySecurityGroupsToLoadBalancer operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 ApplySecurityGroupsToLoadBalancer for more information on using the ApplySecurityGroupsToLoadBalancer
// 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 ApplySecurityGroupsToLoadBalancerRequest method.
// req, resp := client.ApplySecurityGroupsToLoadBalancerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer
func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *request.Request, output *ApplySecurityGroupsToLoadBalancerOutput) {
op := &request.Operation{
Name: opApplySecurityGroupsToLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ApplySecurityGroupsToLoadBalancerInput{}
}
output = &ApplySecurityGroupsToLoadBalancerOutput{}
req = c.newRequest(op, input, output)
return
}
// ApplySecurityGroupsToLoadBalancer API operation for Elastic Load Balancing.
//
// Associates one or more security groups with your load balancer in a virtual
// private cloud (VPC). The specified security groups override the previously
// associated security groups.
//
// For more information, see Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation ApplySecurityGroupsToLoadBalancer for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup"
// One or more of the specified security groups do not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer
func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoadBalancerInput) (*ApplySecurityGroupsToLoadBalancerOutput, error) {
req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input)
return out, req.Send()
}
// ApplySecurityGroupsToLoadBalancerWithContext is the same as ApplySecurityGroupsToLoadBalancer with the addition of
// the ability to pass a context and additional request options.
//
// See ApplySecurityGroupsToLoadBalancer 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 *ELB) ApplySecurityGroupsToLoadBalancerWithContext(ctx aws.Context, input *ApplySecurityGroupsToLoadBalancerInput, opts ...request.Option) (*ApplySecurityGroupsToLoadBalancerOutput, error) {
req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets"
// AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the
// client's request for the AttachLoadBalancerToSubnets operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 AttachLoadBalancerToSubnets for more information on using the AttachLoadBalancerToSubnets
// 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 AttachLoadBalancerToSubnetsRequest method.
// req, resp := client.AttachLoadBalancerToSubnetsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets
func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *request.Request, output *AttachLoadBalancerToSubnetsOutput) {
op := &request.Operation{
Name: opAttachLoadBalancerToSubnets,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AttachLoadBalancerToSubnetsInput{}
}
output = &AttachLoadBalancerToSubnetsOutput{}
req = c.newRequest(op, input, output)
return
}
// AttachLoadBalancerToSubnets API operation for Elastic Load Balancing.
//
// Adds one or more subnets to the set of configured subnets for the specified
// load balancer.
//
// The load balancer evenly distributes requests across all registered subnets.
// For more information, see Add or Remove Subnets for Your Load Balancer in
// a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation AttachLoadBalancerToSubnets for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// * ErrCodeSubnetNotFoundException "SubnetNotFound"
// One or more of the specified subnets do not exist.
//
// * ErrCodeInvalidSubnetException "InvalidSubnet"
// The specified VPC has no associated Internet gateway.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets
func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInput) (*AttachLoadBalancerToSubnetsOutput, error) {
req, out := c.AttachLoadBalancerToSubnetsRequest(input)
return out, req.Send()
}
// AttachLoadBalancerToSubnetsWithContext is the same as AttachLoadBalancerToSubnets with the addition of
// the ability to pass a context and additional request options.
//
// See AttachLoadBalancerToSubnets 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 *ELB) AttachLoadBalancerToSubnetsWithContext(ctx aws.Context, input *AttachLoadBalancerToSubnetsInput, opts ...request.Option) (*AttachLoadBalancerToSubnetsOutput, error) {
req, out := c.AttachLoadBalancerToSubnetsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opConfigureHealthCheck = "ConfigureHealthCheck"
// ConfigureHealthCheckRequest generates a "aws/request.Request" representing the
// client's request for the ConfigureHealthCheck operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 ConfigureHealthCheck for more information on using the ConfigureHealthCheck
// 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 ConfigureHealthCheckRequest method.
// req, resp := client.ConfigureHealthCheckRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck
func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *request.Request, output *ConfigureHealthCheckOutput) {
op := &request.Operation{
Name: opConfigureHealthCheck,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ConfigureHealthCheckInput{}
}
output = &ConfigureHealthCheckOutput{}
req = c.newRequest(op, input, output)
return
}
// ConfigureHealthCheck API operation for Elastic Load Balancing.
//
// Specifies the health check settings to use when evaluating the health state
// of your EC2 instances.
//
// For more information, see Configure Health Checks for Your Load Balancer
// (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation ConfigureHealthCheck for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck
func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*ConfigureHealthCheckOutput, error) {
req, out := c.ConfigureHealthCheckRequest(input)
return out, req.Send()
}
// ConfigureHealthCheckWithContext is the same as ConfigureHealthCheck with the addition of
// the ability to pass a context and additional request options.
//
// See ConfigureHealthCheck 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 *ELB) ConfigureHealthCheckWithContext(ctx aws.Context, input *ConfigureHealthCheckInput, opts ...request.Option) (*ConfigureHealthCheckOutput, error) {
req, out := c.ConfigureHealthCheckRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy"
// CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the
// client's request for the CreateAppCookieStickinessPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateAppCookieStickinessPolicy for more information on using the CreateAppCookieStickinessPolicy
// 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 CreateAppCookieStickinessPolicyRequest method.
// req, resp := client.CreateAppCookieStickinessPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy
func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *request.Request, output *CreateAppCookieStickinessPolicyOutput) {
op := &request.Operation{
Name: opCreateAppCookieStickinessPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAppCookieStickinessPolicyInput{}
}
output = &CreateAppCookieStickinessPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateAppCookieStickinessPolicy API operation for Elastic Load Balancing.
//
// Generates a stickiness policy with sticky session lifetimes that follow that
// of an application-generated cookie. This policy can be associated only with
// HTTP/HTTPS listeners.
//
// This policy is similar to the policy created by CreateLBCookieStickinessPolicy,
// except that the lifetime of the special Elastic Load Balancing cookie, AWSELB,
// follows the lifetime of the application-generated cookie specified in the
// policy configuration. The load balancer only inserts a new stickiness cookie
// when the application response includes a new application cookie.
//
// If the application cookie is explicitly removed or expires, the session stops
// being sticky until a new application cookie is issued.
//
// For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation CreateAppCookieStickinessPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName"
// A policy with the specified name already exists for this load balancer.
//
// * ErrCodeTooManyPoliciesException "TooManyPolicies"
// The quota for the number of policies for this load balancer has been reached.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy
func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPolicyInput) (*CreateAppCookieStickinessPolicyOutput, error) {
req, out := c.CreateAppCookieStickinessPolicyRequest(input)
return out, req.Send()
}
// CreateAppCookieStickinessPolicyWithContext is the same as CreateAppCookieStickinessPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See CreateAppCookieStickinessPolicy 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 *ELB) CreateAppCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateAppCookieStickinessPolicyInput, opts ...request.Option) (*CreateAppCookieStickinessPolicyOutput, error) {
req, out := c.CreateAppCookieStickinessPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy"
// CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the
// client's request for the CreateLBCookieStickinessPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateLBCookieStickinessPolicy for more information on using the CreateLBCookieStickinessPolicy
// 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 CreateLBCookieStickinessPolicyRequest method.
// req, resp := client.CreateLBCookieStickinessPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy
func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *request.Request, output *CreateLBCookieStickinessPolicyOutput) {
op := &request.Operation{
Name: opCreateLBCookieStickinessPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLBCookieStickinessPolicyInput{}
}
output = &CreateLBCookieStickinessPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLBCookieStickinessPolicy API operation for Elastic Load Balancing.
//
// Generates a stickiness policy with sticky session lifetimes controlled by
// the lifetime of the browser (user-agent) or a specified expiration period.
// This policy can be associated only with HTTP/HTTPS listeners.
//
// When a load balancer implements this policy, the load balancer uses a special
// cookie to track the instance for each request. When the load balancer receives
// a request, it first checks to see if this cookie is present in the request.
// If so, the load balancer sends the request to the application server specified
// in the cookie. If not, the load balancer sends the request to a server that
// is chosen based on the existing load-balancing algorithm.
//
// A cookie is inserted into the response for binding subsequent requests from
// the same user to that server. The validity of the cookie is based on the
// cookie expiration time, which is specified in the policy configuration.
//
// For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation CreateLBCookieStickinessPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName"
// A policy with the specified name already exists for this load balancer.
//
// * ErrCodeTooManyPoliciesException "TooManyPolicies"
// The quota for the number of policies for this load balancer has been reached.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy
func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPolicyInput) (*CreateLBCookieStickinessPolicyOutput, error) {
req, out := c.CreateLBCookieStickinessPolicyRequest(input)
return out, req.Send()
}
// CreateLBCookieStickinessPolicyWithContext is the same as CreateLBCookieStickinessPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLBCookieStickinessPolicy 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 *ELB) CreateLBCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateLBCookieStickinessPolicyInput, opts ...request.Option) (*CreateLBCookieStickinessPolicyOutput, error) {
req, out := c.CreateLBCookieStickinessPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLoadBalancer = "CreateLoadBalancer"
// CreateLoadBalancerRequest generates a "aws/request.Request" representing the
// client's request for the CreateLoadBalancer operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateLoadBalancer for more information on using the CreateLoadBalancer
// 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 CreateLoadBalancerRequest method.
// req, resp := client.CreateLoadBalancerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer
func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) {
op := &request.Operation{
Name: opCreateLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerInput{}
}
output = &CreateLoadBalancerOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLoadBalancer API operation for Elastic Load Balancing.
//
// Creates a Classic Load Balancer.
//
// You can add listeners, security groups, subnets, and tags when you create
// your load balancer, or you can add them later using CreateLoadBalancerListeners,
// ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.
//
// To describe your current load balancers, see DescribeLoadBalancers. When
// you are finished with a load balancer, you can delete it using DeleteLoadBalancer.
//
// You can create up to 20 load balancers per region per account. You can request
// an increase for the number of load balancers for your account. For more information,
// see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation CreateLoadBalancer for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateAccessPointNameException "DuplicateLoadBalancerName"
// The specified load balancer name already exists for this account.
//
// * ErrCodeTooManyAccessPointsException "TooManyLoadBalancers"
// The quota for the number of load balancers has been reached.
//
// * ErrCodeCertificateNotFoundException "CertificateNotFound"
// The specified ARN does not refer to a valid SSL certificate in AWS Identity
// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if
// you recently uploaded the certificate to IAM, this error might indicate that
// the certificate is not fully available yet.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// * ErrCodeSubnetNotFoundException "SubnetNotFound"
// One or more of the specified subnets do not exist.
//
// * ErrCodeInvalidSubnetException "InvalidSubnet"
// The specified VPC has no associated Internet gateway.
//
// * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup"
// One or more of the specified security groups do not exist.
//
// * ErrCodeInvalidSchemeException "InvalidScheme"
// The specified value for the schema is not valid. You can only specify a scheme
// for load balancers in a VPC.
//
// * ErrCodeTooManyTagsException "TooManyTags"
// The quota for the number of tags that can be assigned to a load balancer
// has been reached.
//
// * ErrCodeDuplicateTagKeysException "DuplicateTagKeys"
// A tag key was specified more than once.
//
// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
// The specified protocol or signature version is not supported.
//
// * ErrCodeOperationNotPermittedException "OperationNotPermitted"
// This operation is not allowed.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer
func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)
return out, req.Send()
}
// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLoadBalancer 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 *ELB) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners"
// CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the
// client's request for the CreateLoadBalancerListeners operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateLoadBalancerListeners for more information on using the CreateLoadBalancerListeners
// 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 CreateLoadBalancerListenersRequest method.
// req, resp := client.CreateLoadBalancerListenersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners
func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *request.Request, output *CreateLoadBalancerListenersOutput) {
op := &request.Operation{
Name: opCreateLoadBalancerListeners,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerListenersInput{}
}
output = &CreateLoadBalancerListenersOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLoadBalancerListeners API operation for Elastic Load Balancing.
//
// Creates one or more listeners for the specified load balancer. If a listener
// with the specified port does not already exist, it is created; otherwise,
// the properties of the new listener must match the properties of the existing
// listener.
//
// For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html)
// in the Classic Load Balancer Guide.
//
// 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 Elastic Load Balancing's
// API operation CreateLoadBalancerListeners for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodeDuplicateListenerException "DuplicateListener"
// A listener already exists for the specified load balancer name and port,
// but with a different instance port, protocol, or SSL certificate.
//
// * ErrCodeCertificateNotFoundException "CertificateNotFound"
// The specified ARN does not refer to a valid SSL certificate in AWS Identity
// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if
// you recently uploaded the certificate to IAM, this error might indicate that
// the certificate is not fully available yet.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
// The specified protocol or signature version is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners
func (c *ELB) CreateLoadBalancerListeners(input *CreateLoadBalancerListenersInput) (*CreateLoadBalancerListenersOutput, error) {
req, out := c.CreateLoadBalancerListenersRequest(input)
return out, req.Send()
}
// CreateLoadBalancerListenersWithContext is the same as CreateLoadBalancerListeners with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLoadBalancerListeners 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 *ELB) CreateLoadBalancerListenersWithContext(ctx aws.Context, input *CreateLoadBalancerListenersInput, opts ...request.Option) (*CreateLoadBalancerListenersOutput, error) {
req, out := c.CreateLoadBalancerListenersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy"
// CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the
// client's request for the CreateLoadBalancerPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 CreateLoadBalancerPolicy for more information on using the CreateLoadBalancerPolicy
// 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 CreateLoadBalancerPolicyRequest method.
// req, resp := client.CreateLoadBalancerPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy
func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *request.Request, output *CreateLoadBalancerPolicyOutput) {
op := &request.Operation{
Name: opCreateLoadBalancerPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerPolicyInput{}
}
output = &CreateLoadBalancerPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLoadBalancerPolicy API operation for Elastic Load Balancing.
//
// Creates a policy with the specified attributes for the specified load balancer.
//
// Policies are settings that are saved for your load balancer and that can
// be applied to the listener or the application server, depending on the policy
// type.
//
// 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 Elastic Load Balancing's
// API operation CreateLoadBalancerPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeAccessPointNotFoundException "LoadBalancerNotFound"
// The specified load balancer does not exist.
//
// * ErrCodePolicyTypeNotFoundException "PolicyTypeNotFound"
// One or more of the specified policy types do not exist.
//
// * ErrCodeDuplicatePolicyNameException "DuplicatePolicyName"
// A policy with the specified name already exists for this load balancer.
//
// * ErrCodeTooManyPoliciesException "TooManyPolicies"
// The quota for the number of policies for this load balancer has been reached.
//
// * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
// The requested configuration change is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy
func (c *ELB) CreateLoadBalancerPolicy(input *CreateLoadBalancerPolicyInput) (*CreateLoadBalancerPolicyOutput, error) {
req, out := c.CreateLoadBalancerPolicyRequest(input)
return out, req.Send()
}
// CreateLoadBalancerPolicyWithContext is the same as CreateLoadBalancerPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLoadBalancerPolicy 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 *ELB) CreateLoadBalancerPolicyWithContext(ctx aws.Context, input *CreateLoadBalancerPolicyInput, opts ...request.Option) (*CreateLoadBalancerPolicyOutput, error) {
req, out := c.CreateLoadBalancerPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLoadBalancer = "DeleteLoadBalancer"
// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLoadBalancer operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DeleteLoadBalancer for more information on using the DeleteLoadBalancer
// 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 DeleteLoadBalancerRequest method.
// req, resp := client.DeleteLoadBalancerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer
func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) {
op := &request.Operation{
Name: opDeleteLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLoadBalancerInput{}
}
output = &DeleteLoadBalancerOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteLoadBalancer API operation for Elastic Load Balancing.
//
// Deletes the specified load balancer.
//
// If you are attempting to recreate a load balancer, you must reconfigure all
// settings. The DNS name associated with a deleted load balancer are no longer
// usable. The name and associated DNS record of the deleted load balancer no
// longer exist and traffic sent to any of its IP addresses is no longer delivered
// to your instances.
//
// If the load balancer does not exist or has already been deleted, the call
// to DeleteLoadBalancer still succeeds.
//
// 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 Elastic Load Balancing's
// API operation DeleteLoadBalancer for usage and error information.
// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer
func (c *ELB) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) {
req, out := c.DeleteLoadBalancerRequest(input)
return out, req.Send()
}
// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLoadBalancer 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 *ELB) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) {
req, out := c.DeleteLoadBalancerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners"
// DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLoadBalancerListeners operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
//
// 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 DeleteLoadBalancerListeners for more information on using the DeleteLoadBalancerListeners
// API call, and error handling.