forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
2444 lines (1947 loc) · 81.4 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 elb provides a client for Elastic Load Balancing.
package elb
import (
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
)
var oprw sync.Mutex
// AddTagsRequest generates a request for the AddTags operation.
func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *aws.Request, output *AddTagsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAddTags == nil {
opAddTags = &aws.Operation{
Name: "AddTags",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AddTagsInput{}
}
req = c.newRequest(opAddTags, input, output)
output = &AddTagsOutput{}
req.Data = output
return
}
// 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 Tagging (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#tagging-elb)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
req, out := c.AddTagsRequest(input)
err := req.Send()
return out, err
}
var opAddTags *aws.Operation
// ApplySecurityGroupsToLoadBalancerRequest generates a request for the ApplySecurityGroupsToLoadBalancer operation.
func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *aws.Request, output *ApplySecurityGroupsToLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opApplySecurityGroupsToLoadBalancer == nil {
opApplySecurityGroupsToLoadBalancer = &aws.Operation{
Name: "ApplySecurityGroupsToLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &ApplySecurityGroupsToLoadBalancerInput{}
}
req = c.newRequest(opApplySecurityGroupsToLoadBalancer, input, output)
output = &ApplySecurityGroupsToLoadBalancerOutput{}
req.Data = output
return
}
// 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 Manage Security Groups for Amazon VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/USVPC_ApplySG.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoadBalancerInput) (*ApplySecurityGroupsToLoadBalancerOutput, error) {
req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opApplySecurityGroupsToLoadBalancer *aws.Operation
// AttachLoadBalancerToSubnetsRequest generates a request for the AttachLoadBalancerToSubnets operation.
func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *aws.Request, output *AttachLoadBalancerToSubnetsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAttachLoadBalancerToSubnets == nil {
opAttachLoadBalancerToSubnets = &aws.Operation{
Name: "AttachLoadBalancerToSubnets",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AttachLoadBalancerToSubnetsInput{}
}
req = c.newRequest(opAttachLoadBalancerToSubnets, input, output)
output = &AttachLoadBalancerToSubnetsOutput{}
req.Data = output
return
}
// 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 Elastic Load Balancing in Amazon VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForVPC.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInput) (*AttachLoadBalancerToSubnetsOutput, error) {
req, out := c.AttachLoadBalancerToSubnetsRequest(input)
err := req.Send()
return out, err
}
var opAttachLoadBalancerToSubnets *aws.Operation
// ConfigureHealthCheckRequest generates a request for the ConfigureHealthCheck operation.
func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *aws.Request, output *ConfigureHealthCheckOutput) {
oprw.Lock()
defer oprw.Unlock()
if opConfigureHealthCheck == nil {
opConfigureHealthCheck = &aws.Operation{
Name: "ConfigureHealthCheck",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &ConfigureHealthCheckInput{}
}
req = c.newRequest(opConfigureHealthCheck, input, output)
output = &ConfigureHealthCheckOutput{}
req.Data = output
return
}
// Specifies the health check settings to use when evaluating the health state
// of your back-end instances.
//
// For more information, see Health Checks (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#healthcheck)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*ConfigureHealthCheckOutput, error) {
req, out := c.ConfigureHealthCheckRequest(input)
err := req.Send()
return out, err
}
var opConfigureHealthCheck *aws.Operation
// CreateAppCookieStickinessPolicyRequest generates a request for the CreateAppCookieStickinessPolicy operation.
func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *aws.Request, output *CreateAppCookieStickinessPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateAppCookieStickinessPolicy == nil {
opCreateAppCookieStickinessPolicy = &aws.Operation{
Name: "CreateAppCookieStickinessPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateAppCookieStickinessPolicyInput{}
}
req = c.newRequest(opCreateAppCookieStickinessPolicy, input, output)
output = &CreateAppCookieStickinessPolicyOutput{}
req.Data = output
return
}
// 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/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsAppCookies)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPolicyInput) (*CreateAppCookieStickinessPolicyOutput, error) {
req, out := c.CreateAppCookieStickinessPolicyRequest(input)
err := req.Send()
return out, err
}
var opCreateAppCookieStickinessPolicy *aws.Operation
// CreateLBCookieStickinessPolicyRequest generates a request for the CreateLBCookieStickinessPolicy operation.
func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *aws.Request, output *CreateLBCookieStickinessPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateLBCookieStickinessPolicy == nil {
opCreateLBCookieStickinessPolicy = &aws.Operation{
Name: "CreateLBCookieStickinessPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateLBCookieStickinessPolicyInput{}
}
req = c.newRequest(opCreateLBCookieStickinessPolicy, input, output)
output = &CreateLBCookieStickinessPolicyOutput{}
req.Data = output
return
}
// 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 back-end server 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/DeveloperGuide/US_StickySessions.html#US_EnableStickySessionsLBCookies)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPolicyInput) (*CreateLBCookieStickinessPolicyOutput, error) {
req, out := c.CreateLBCookieStickinessPolicyRequest(input)
err := req.Send()
return out, err
}
var opCreateLBCookieStickinessPolicy *aws.Operation
// CreateLoadBalancerRequest generates a request for the CreateLoadBalancer operation.
func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *aws.Request, output *CreateLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateLoadBalancer == nil {
opCreateLoadBalancer = &aws.Operation{
Name: "CreateLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateLoadBalancerInput{}
}
req = c.newRequest(opCreateLoadBalancer, input, output)
output = &CreateLoadBalancerOutput{}
req.Data = output
return
}
// Creates a load balancer.
//
// If the call completes successfully, a new load balancer is created with
// a unique Domain Name Service (DNS) name. The DNS name includes the name of
// the AWS region in which the load balancer was created. For example, the DNS
// name might end with either of the following:
//
// us-east-1.elb.amazonaws.com us-west-2.elb.amazonaws.com For information
// about the AWS regions supported by Elastic Load Balancing, see Regions and
// Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elb_region)
// in the Amazon Web Services General Reference.
//
// 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 Elastic Load Balancing Limits (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-limits.html)
// in the Elastic Load Balancing Developer Guide.
//
// Elastic Load Balancing supports load balancing your EC2 instances launched
// in either the EC2-Classic or EC2-VPC platform. For more information, see
// Elastic Load Balancing in EC2-Classic (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForEC2.html)
// or Elastic Load Balancing in a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/UserScenariosForVPC.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opCreateLoadBalancer *aws.Operation
// CreateLoadBalancerListenersRequest generates a request for the CreateLoadBalancerListeners operation.
func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *aws.Request, output *CreateLoadBalancerListenersOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateLoadBalancerListeners == nil {
opCreateLoadBalancerListeners = &aws.Operation{
Name: "CreateLoadBalancerListeners",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateLoadBalancerListenersInput{}
}
req = c.newRequest(opCreateLoadBalancerListeners, input, output)
output = &CreateLoadBalancerListenersOutput{}
req.Data = output
return
}
// 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 Add a Listener to Your Load Balancer (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/us-add-listener.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) CreateLoadBalancerListeners(input *CreateLoadBalancerListenersInput) (*CreateLoadBalancerListenersOutput, error) {
req, out := c.CreateLoadBalancerListenersRequest(input)
err := req.Send()
return out, err
}
var opCreateLoadBalancerListeners *aws.Operation
// CreateLoadBalancerPolicyRequest generates a request for the CreateLoadBalancerPolicy operation.
func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *aws.Request, output *CreateLoadBalancerPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateLoadBalancerPolicy == nil {
opCreateLoadBalancerPolicy = &aws.Operation{
Name: "CreateLoadBalancerPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateLoadBalancerPolicyInput{}
}
req = c.newRequest(opCreateLoadBalancerPolicy, input, output)
output = &CreateLoadBalancerPolicyOutput{}
req.Data = output
return
}
// 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 front-end listener or the back-end application server,
// depending on the policy type.
func (c *ELB) CreateLoadBalancerPolicy(input *CreateLoadBalancerPolicyInput) (*CreateLoadBalancerPolicyOutput, error) {
req, out := c.CreateLoadBalancerPolicyRequest(input)
err := req.Send()
return out, err
}
var opCreateLoadBalancerPolicy *aws.Operation
// DeleteLoadBalancerRequest generates a request for the DeleteLoadBalancer operation.
func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *aws.Request, output *DeleteLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteLoadBalancer == nil {
opDeleteLoadBalancer = &aws.Operation{
Name: "DeleteLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteLoadBalancerInput{}
}
req = c.newRequest(opDeleteLoadBalancer, input, output)
output = &DeleteLoadBalancerOutput{}
req.Data = output
return
}
// 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 back-end instances.
//
// If the load balancer does not exist or has already been deleted, the call
// to DeleteLoadBalancer still succeeds.
func (c *ELB) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) {
req, out := c.DeleteLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opDeleteLoadBalancer *aws.Operation
// DeleteLoadBalancerListenersRequest generates a request for the DeleteLoadBalancerListeners operation.
func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *aws.Request, output *DeleteLoadBalancerListenersOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteLoadBalancerListeners == nil {
opDeleteLoadBalancerListeners = &aws.Operation{
Name: "DeleteLoadBalancerListeners",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteLoadBalancerListenersInput{}
}
req = c.newRequest(opDeleteLoadBalancerListeners, input, output)
output = &DeleteLoadBalancerListenersOutput{}
req.Data = output
return
}
// Deletes the specified listeners from the specified load balancer.
func (c *ELB) DeleteLoadBalancerListeners(input *DeleteLoadBalancerListenersInput) (*DeleteLoadBalancerListenersOutput, error) {
req, out := c.DeleteLoadBalancerListenersRequest(input)
err := req.Send()
return out, err
}
var opDeleteLoadBalancerListeners *aws.Operation
// DeleteLoadBalancerPolicyRequest generates a request for the DeleteLoadBalancerPolicy operation.
func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *aws.Request, output *DeleteLoadBalancerPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteLoadBalancerPolicy == nil {
opDeleteLoadBalancerPolicy = &aws.Operation{
Name: "DeleteLoadBalancerPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteLoadBalancerPolicyInput{}
}
req = c.newRequest(opDeleteLoadBalancerPolicy, input, output)
output = &DeleteLoadBalancerPolicyOutput{}
req.Data = output
return
}
// Deletes the specified policy from the specified load balancer. This policy
// must not be enabled for any listeners.
func (c *ELB) DeleteLoadBalancerPolicy(input *DeleteLoadBalancerPolicyInput) (*DeleteLoadBalancerPolicyOutput, error) {
req, out := c.DeleteLoadBalancerPolicyRequest(input)
err := req.Send()
return out, err
}
var opDeleteLoadBalancerPolicy *aws.Operation
// DeregisterInstancesFromLoadBalancerRequest generates a request for the DeregisterInstancesFromLoadBalancer operation.
func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *aws.Request, output *DeregisterInstancesFromLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeregisterInstancesFromLoadBalancer == nil {
opDeregisterInstancesFromLoadBalancer = &aws.Operation{
Name: "DeregisterInstancesFromLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeregisterInstancesFromLoadBalancerInput{}
}
req = c.newRequest(opDeregisterInstancesFromLoadBalancer, input, output)
output = &DeregisterInstancesFromLoadBalancerOutput{}
req.Data = output
return
}
// Deregisters the specified instances from the specified load balancer. After
// the instance is deregistered, it no longer receives traffic from the load
// balancer.
//
// You can use DescribeLoadBalancers to verify that the instance is deregistered
// from the load balancer.
//
// For more information, see Deregister and Register Amazon EC2 Instances (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_DeReg_Reg_Instances.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) DeregisterInstancesFromLoadBalancer(input *DeregisterInstancesFromLoadBalancerInput) (*DeregisterInstancesFromLoadBalancerOutput, error) {
req, out := c.DeregisterInstancesFromLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opDeregisterInstancesFromLoadBalancer *aws.Operation
// DescribeInstanceHealthRequest generates a request for the DescribeInstanceHealth operation.
func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *aws.Request, output *DescribeInstanceHealthOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeInstanceHealth == nil {
opDescribeInstanceHealth = &aws.Operation{
Name: "DescribeInstanceHealth",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DescribeInstanceHealthInput{}
}
req = c.newRequest(opDescribeInstanceHealth, input, output)
output = &DescribeInstanceHealthOutput{}
req.Data = output
return
}
// Describes the state of the specified instances registered with the specified
// load balancer. If no instances are specified, the call describes the state
// of all instances registered with the load balancer, not including any terminated
// instances.
func (c *ELB) DescribeInstanceHealth(input *DescribeInstanceHealthInput) (*DescribeInstanceHealthOutput, error) {
req, out := c.DescribeInstanceHealthRequest(input)
err := req.Send()
return out, err
}
var opDescribeInstanceHealth *aws.Operation
// DescribeLoadBalancerAttributesRequest generates a request for the DescribeLoadBalancerAttributes operation.
func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *aws.Request, output *DescribeLoadBalancerAttributesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeLoadBalancerAttributes == nil {
opDescribeLoadBalancerAttributes = &aws.Operation{
Name: "DescribeLoadBalancerAttributes",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DescribeLoadBalancerAttributesInput{}
}
req = c.newRequest(opDescribeLoadBalancerAttributes, input, output)
output = &DescribeLoadBalancerAttributesOutput{}
req.Data = output
return
}
// Describes the attributes for the specified load balancer.
func (c *ELB) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) {
req, out := c.DescribeLoadBalancerAttributesRequest(input)
err := req.Send()
return out, err
}
var opDescribeLoadBalancerAttributes *aws.Operation
// DescribeLoadBalancerPoliciesRequest generates a request for the DescribeLoadBalancerPolicies operation.
func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *aws.Request, output *DescribeLoadBalancerPoliciesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeLoadBalancerPolicies == nil {
opDescribeLoadBalancerPolicies = &aws.Operation{
Name: "DescribeLoadBalancerPolicies",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DescribeLoadBalancerPoliciesInput{}
}
req = c.newRequest(opDescribeLoadBalancerPolicies, input, output)
output = &DescribeLoadBalancerPoliciesOutput{}
req.Data = output
return
}
// Describes the specified policies.
//
// If you specify a load balancer name, the action returns the descriptions
// of all policies created for the load balancer. If you specify a policy name
// associated with your load balancer, the action returns the description of
// that policy. If you don't specify a load balancer name, the action returns
// descriptions of the specified sample policies, or descriptions of all sample
// policies. The names of the sample policies have the ELBSample- prefix.
func (c *ELB) DescribeLoadBalancerPolicies(input *DescribeLoadBalancerPoliciesInput) (*DescribeLoadBalancerPoliciesOutput, error) {
req, out := c.DescribeLoadBalancerPoliciesRequest(input)
err := req.Send()
return out, err
}
var opDescribeLoadBalancerPolicies *aws.Operation
// DescribeLoadBalancerPolicyTypesRequest generates a request for the DescribeLoadBalancerPolicyTypes operation.
func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *aws.Request, output *DescribeLoadBalancerPolicyTypesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeLoadBalancerPolicyTypes == nil {
opDescribeLoadBalancerPolicyTypes = &aws.Operation{
Name: "DescribeLoadBalancerPolicyTypes",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DescribeLoadBalancerPolicyTypesInput{}
}
req = c.newRequest(opDescribeLoadBalancerPolicyTypes, input, output)
output = &DescribeLoadBalancerPolicyTypesOutput{}
req.Data = output
return
}
// Describes the specified load balancer policy types.
//
// You can use these policy types with CreateLoadBalancerPolicy to create policy
// configurations for a load balancer.
func (c *ELB) DescribeLoadBalancerPolicyTypes(input *DescribeLoadBalancerPolicyTypesInput) (*DescribeLoadBalancerPolicyTypesOutput, error) {
req, out := c.DescribeLoadBalancerPolicyTypesRequest(input)
err := req.Send()
return out, err
}
var opDescribeLoadBalancerPolicyTypes *aws.Operation
// DescribeLoadBalancersRequest generates a request for the DescribeLoadBalancers operation.
func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *aws.Request, output *DescribeLoadBalancersOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeLoadBalancers == nil {
opDescribeLoadBalancers = &aws.Operation{
Name: "DescribeLoadBalancers",
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "",
TruncationToken: "",
},
}
}
if input == nil {
input = &DescribeLoadBalancersInput{}
}
req = c.newRequest(opDescribeLoadBalancers, input, output)
output = &DescribeLoadBalancersOutput{}
req.Data = output
return
}
// Describes the specified the load balancers. If no load balancers are specified,
// the call describes all of your load balancers.
func (c *ELB) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
req, out := c.DescribeLoadBalancersRequest(input)
err := req.Send()
return out, err
}
func (c *ELB) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(p *DescribeLoadBalancersOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeLoadBalancersRequest(input)
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeLoadBalancersOutput), lastPage)
})
}
var opDescribeLoadBalancers *aws.Operation
// DescribeTagsRequest generates a request for the DescribeTags operation.
func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *aws.Request, output *DescribeTagsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDescribeTags == nil {
opDescribeTags = &aws.Operation{
Name: "DescribeTags",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DescribeTagsInput{}
}
req = c.newRequest(opDescribeTags, input, output)
output = &DescribeTagsOutput{}
req.Data = output
return
}
// Describes the tags associated with the specified load balancers.
func (c *ELB) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
req, out := c.DescribeTagsRequest(input)
err := req.Send()
return out, err
}
var opDescribeTags *aws.Operation
// DetachLoadBalancerFromSubnetsRequest generates a request for the DetachLoadBalancerFromSubnets operation.
func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *aws.Request, output *DetachLoadBalancerFromSubnetsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDetachLoadBalancerFromSubnets == nil {
opDetachLoadBalancerFromSubnets = &aws.Operation{
Name: "DetachLoadBalancerFromSubnets",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DetachLoadBalancerFromSubnetsInput{}
}
req = c.newRequest(opDetachLoadBalancerFromSubnets, input, output)
output = &DetachLoadBalancerFromSubnetsOutput{}
req.Data = output
return
}
// Removes the specified subnets from the set of configured subnets for the
// load balancer.
//
// After a subnet is removed, all EC2 instances registered with the load balancer
// in the removed subnet go into the OutOfService state. Then, the load balancer
// balances the traffic among the remaining routable subnets.
func (c *ELB) DetachLoadBalancerFromSubnets(input *DetachLoadBalancerFromSubnetsInput) (*DetachLoadBalancerFromSubnetsOutput, error) {
req, out := c.DetachLoadBalancerFromSubnetsRequest(input)
err := req.Send()
return out, err
}
var opDetachLoadBalancerFromSubnets *aws.Operation
// DisableAvailabilityZonesForLoadBalancerRequest generates a request for the DisableAvailabilityZonesForLoadBalancer operation.
func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *aws.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDisableAvailabilityZonesForLoadBalancer == nil {
opDisableAvailabilityZonesForLoadBalancer = &aws.Operation{
Name: "DisableAvailabilityZonesForLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DisableAvailabilityZonesForLoadBalancerInput{}
}
req = c.newRequest(opDisableAvailabilityZonesForLoadBalancer, input, output)
output = &DisableAvailabilityZonesForLoadBalancerOutput{}
req.Data = output
return
}
// Removes the specified Availability Zones from the set of Availability Zones
// for the specified load balancer.
//
// There must be at least one Availability Zone registered with a load balancer
// at all times. After an Availability Zone is removed, all instances registered
// with the load balancer that are in the removed Availability Zone go into
// the OutOfService state. Then, the load balancer attempts to equally balance
// the traffic among its remaining Availability Zones.
//
// For more information, see Disable an Availability Zone from a Load-Balanced
// Application (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_ShrinkLBApp04.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) DisableAvailabilityZonesForLoadBalancer(input *DisableAvailabilityZonesForLoadBalancerInput) (*DisableAvailabilityZonesForLoadBalancerOutput, error) {
req, out := c.DisableAvailabilityZonesForLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opDisableAvailabilityZonesForLoadBalancer *aws.Operation
// EnableAvailabilityZonesForLoadBalancerRequest generates a request for the EnableAvailabilityZonesForLoadBalancer operation.
func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *aws.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opEnableAvailabilityZonesForLoadBalancer == nil {
opEnableAvailabilityZonesForLoadBalancer = &aws.Operation{
Name: "EnableAvailabilityZonesForLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &EnableAvailabilityZonesForLoadBalancerInput{}
}
req = c.newRequest(opEnableAvailabilityZonesForLoadBalancer, input, output)
output = &EnableAvailabilityZonesForLoadBalancerOutput{}
req.Data = output
return
}
// Adds the specified Availability Zones to the set of Availability Zones for
// the specified load balancer.
//
// The load balancer evenly distributes requests across all its registered
// Availability Zones that contain instances.
//
// For more information, see Add Availability Zone (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_AddLBAvailabilityZone.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) EnableAvailabilityZonesForLoadBalancer(input *EnableAvailabilityZonesForLoadBalancerInput) (*EnableAvailabilityZonesForLoadBalancerOutput, error) {
req, out := c.EnableAvailabilityZonesForLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opEnableAvailabilityZonesForLoadBalancer *aws.Operation
// ModifyLoadBalancerAttributesRequest generates a request for the ModifyLoadBalancerAttributes operation.
func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *aws.Request, output *ModifyLoadBalancerAttributesOutput) {
oprw.Lock()
defer oprw.Unlock()
if opModifyLoadBalancerAttributes == nil {
opModifyLoadBalancerAttributes = &aws.Operation{
Name: "ModifyLoadBalancerAttributes",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &ModifyLoadBalancerAttributesInput{}
}
req = c.newRequest(opModifyLoadBalancerAttributes, input, output)
output = &ModifyLoadBalancerAttributesOutput{}
req.Data = output
return
}
// Modifies the attributes of the specified load balancer.
//
// You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining,
// and CrossZoneLoadBalancing by either enabling or disabling them. Or, you
// can modify the load balancer attribute ConnectionSettings by specifying an
// idle connection timeout value for your load balancer.
//
// For more information, see the following in the Elastic Load Balancing Developer
// Guide:
//
// Cross-Zone Load Balancing (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#request-routing)
// Connection Draining (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#conn-drain)
// Access Logs (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/access-log-collection.html)
// Idle Connection Timeout (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/TerminologyandKeyConcepts.html#idle-timeout)
func (c *ELB) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) {
req, out := c.ModifyLoadBalancerAttributesRequest(input)
err := req.Send()
return out, err
}
var opModifyLoadBalancerAttributes *aws.Operation
// RegisterInstancesWithLoadBalancerRequest generates a request for the RegisterInstancesWithLoadBalancer operation.
func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *aws.Request, output *RegisterInstancesWithLoadBalancerOutput) {
oprw.Lock()
defer oprw.Unlock()
if opRegisterInstancesWithLoadBalancer == nil {
opRegisterInstancesWithLoadBalancer = &aws.Operation{
Name: "RegisterInstancesWithLoadBalancer",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &RegisterInstancesWithLoadBalancerInput{}
}
req = c.newRequest(opRegisterInstancesWithLoadBalancer, input, output)
output = &RegisterInstancesWithLoadBalancerOutput{}
req.Data = output
return
}
// Adds the specified instances to the specified load balancer.
//
// The instance must be a running instance in the same network as the load
// balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances
// and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic
// instances to that VPC and then register the linked EC2-Classic instances
// with the load balancer in the VPC.
//
// Note that RegisterInstanceWithLoadBalancer completes when the request has
// been registered. Instance registration happens shortly afterwards. To check
// the state of the registered instances, use DescribeLoadBalancers or DescribeInstanceHealth.
//
// After the instance is registered, it starts receiving traffic and requests
// from the load balancer. Any instance that is not in one of the Availability
// Zones registered for the load balancer is moved to the OutOfService state.
// If an Availability Zone is added to the load balancer later, any instances
// registered with the load balancer move to the InService state.
//
// If you stop an instance registered with a load balancer and then start it,
// the IP addresses associated with the instance changes. Elastic Load Balancing
// cannot recognize the new IP address, which prevents it from routing traffic
// to the instances. We recommend that you use the following sequence: stop
// the instance, deregister the instance, start the instance, and then register
// the instance. To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.
//
// For more information, see Deregister and Register EC2 Instances (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_DeReg_Reg_Instances.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) RegisterInstancesWithLoadBalancer(input *RegisterInstancesWithLoadBalancerInput) (*RegisterInstancesWithLoadBalancerOutput, error) {
req, out := c.RegisterInstancesWithLoadBalancerRequest(input)
err := req.Send()
return out, err
}
var opRegisterInstancesWithLoadBalancer *aws.Operation
// RemoveTagsRequest generates a request for the RemoveTags operation.
func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *aws.Request, output *RemoveTagsOutput) {
oprw.Lock()
defer oprw.Unlock()
if opRemoveTags == nil {
opRemoveTags = &aws.Operation{
Name: "RemoveTags",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &RemoveTagsInput{}
}
req = c.newRequest(opRemoveTags, input, output)
output = &RemoveTagsOutput{}
req.Data = output
return
}
// Removes one or more tags from the specified load balancer.
func (c *ELB) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
req, out := c.RemoveTagsRequest(input)
err := req.Send()
return out, err
}