forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.go
3446 lines (2827 loc) · 109 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 (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opAddTags = "AddTags"
// AddTagsRequest generates a request for the AddTags operation.
func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
op := &request.Operation{
Name: opAddTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsInput{}
}
req = c.newRequest(op, input, output)
output = &AddTagsOutput{}
req.Data = output
return
}
// Adds 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 Load Balancer (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/add-remove-tags.html)
// 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
}
const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer"
// ApplySecurityGroupsToLoadBalancerRequest generates a request for the ApplySecurityGroupsToLoadBalancer operation.
func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *request.Request, output *ApplySecurityGroupsToLoadBalancerOutput) {
op := &request.Operation{
Name: opApplySecurityGroupsToLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ApplySecurityGroupsToLoadBalancerInput{}
}
req = c.newRequest(op, 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 Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-security-groups.html#elb-vpc-security-groups)
// 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
}
const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets"
// AttachLoadBalancerToSubnetsRequest generates a request for the AttachLoadBalancerToSubnets operation.
func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *request.Request, output *AttachLoadBalancerToSubnetsOutput) {
op := &request.Operation{
Name: opAttachLoadBalancerToSubnets,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AttachLoadBalancerToSubnetsInput{}
}
req = c.newRequest(op, 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 Add or Remove Subnets for Your Load Balancer in
// a VPC (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-manage-subnets.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
}
const opConfigureHealthCheck = "ConfigureHealthCheck"
// ConfigureHealthCheckRequest generates a request for the ConfigureHealthCheck operation.
func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *request.Request, output *ConfigureHealthCheckOutput) {
op := &request.Operation{
Name: opConfigureHealthCheck,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ConfigureHealthCheckInput{}
}
req = c.newRequest(op, 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 Configure Health Checks (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-healthchecks.html)
// 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
}
const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy"
// CreateAppCookieStickinessPolicyRequest generates a request for the CreateAppCookieStickinessPolicy operation.
func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *request.Request, output *CreateAppCookieStickinessPolicyOutput) {
op := &request.Operation{
Name: opCreateAppCookieStickinessPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateAppCookieStickinessPolicyInput{}
}
req = c.newRequest(op, 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/elb-sticky-sessions.html#enable-sticky-sessions-application)
// 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
}
const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy"
// CreateLBCookieStickinessPolicyRequest generates a request for the CreateLBCookieStickinessPolicy operation.
func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *request.Request, output *CreateLBCookieStickinessPolicyOutput) {
op := &request.Operation{
Name: opCreateLBCookieStickinessPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLBCookieStickinessPolicyInput{}
}
req = c.newRequest(op, 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/elb-sticky-sessions.html#enable-sticky-sessions-duration)
// 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
}
const opCreateLoadBalancer = "CreateLoadBalancer"
// CreateLoadBalancerRequest generates a request for the CreateLoadBalancer operation.
func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) {
op := &request.Operation{
Name: opCreateLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerInput{}
}
req = c.newRequest(op, 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 load balancer receives incoming
// traffic and routes it to the registered instances. For more information,
// see How Elastic Load Balancing Works (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/how-elb-works.html)
// in the Elastic Load Balancing Developer Guide.
//
// 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.
func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
req, out := c.CreateLoadBalancerRequest(input)
err := req.Send()
return out, err
}
const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners"
// CreateLoadBalancerListenersRequest generates a request for the CreateLoadBalancerListeners operation.
func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *request.Request, output *CreateLoadBalancerListenersOutput) {
op := &request.Operation{
Name: opCreateLoadBalancerListeners,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerListenersInput{}
}
req = c.newRequest(op, 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
}
const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy"
// CreateLoadBalancerPolicyRequest generates a request for the CreateLoadBalancerPolicy operation.
func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *request.Request, output *CreateLoadBalancerPolicyOutput) {
op := &request.Operation{
Name: opCreateLoadBalancerPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateLoadBalancerPolicyInput{}
}
req = c.newRequest(op, 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
}
const opDeleteLoadBalancer = "DeleteLoadBalancer"
// DeleteLoadBalancerRequest generates a request for the DeleteLoadBalancer operation.
func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) {
op := &request.Operation{
Name: opDeleteLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLoadBalancerInput{}
}
req = c.newRequest(op, 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
}
const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners"
// DeleteLoadBalancerListenersRequest generates a request for the DeleteLoadBalancerListeners operation.
func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *request.Request, output *DeleteLoadBalancerListenersOutput) {
op := &request.Operation{
Name: opDeleteLoadBalancerListeners,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLoadBalancerListenersInput{}
}
req = c.newRequest(op, 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
}
const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy"
// DeleteLoadBalancerPolicyRequest generates a request for the DeleteLoadBalancerPolicy operation.
func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *request.Request, output *DeleteLoadBalancerPolicyOutput) {
op := &request.Operation{
Name: opDeleteLoadBalancerPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLoadBalancerPolicyInput{}
}
req = c.newRequest(op, 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
}
const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalancer"
// DeregisterInstancesFromLoadBalancerRequest generates a request for the DeregisterInstancesFromLoadBalancer operation.
func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *request.Request, output *DeregisterInstancesFromLoadBalancerOutput) {
op := &request.Operation{
Name: opDeregisterInstancesFromLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterInstancesFromLoadBalancerInput{}
}
req = c.newRequest(op, 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
}
const opDescribeInstanceHealth = "DescribeInstanceHealth"
// DescribeInstanceHealthRequest generates a request for the DescribeInstanceHealth operation.
func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *request.Request, output *DescribeInstanceHealthOutput) {
op := &request.Operation{
Name: opDescribeInstanceHealth,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeInstanceHealthInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeInstanceHealthOutput{}
req.Data = output
return
}
// Describes the state of the specified instances with respect to the specified
// load balancer. If no instances are specified, the call describes the state
// of all instances that are currently registered with the load balancer. If
// instances are specified, their state is returned even if they are no longer
// registered with the load balancer. The state of terminated instances is not
// returned.
func (c *ELB) DescribeInstanceHealth(input *DescribeInstanceHealthInput) (*DescribeInstanceHealthOutput, error) {
req, out := c.DescribeInstanceHealthRequest(input)
err := req.Send()
return out, err
}
const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes"
// DescribeLoadBalancerAttributesRequest generates a request for the DescribeLoadBalancerAttributes operation.
func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancerAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLoadBalancerAttributesInput{}
}
req = c.newRequest(op, 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
}
const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies"
// DescribeLoadBalancerPoliciesRequest generates a request for the DescribeLoadBalancerPolicies operation.
func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *request.Request, output *DescribeLoadBalancerPoliciesOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancerPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLoadBalancerPoliciesInput{}
}
req = c.newRequest(op, 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
}
const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes"
// DescribeLoadBalancerPolicyTypesRequest generates a request for the DescribeLoadBalancerPolicyTypes operation.
func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *request.Request, output *DescribeLoadBalancerPolicyTypesOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancerPolicyTypes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeLoadBalancerPolicyTypesInput{}
}
req = c.newRequest(op, 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
}
const opDescribeLoadBalancers = "DescribeLoadBalancers"
// DescribeLoadBalancersRequest generates a request for the DescribeLoadBalancers operation.
func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
op := &request.Operation{
Name: opDescribeLoadBalancers,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"NextMarker"},
LimitToken: "",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeLoadBalancersInput{}
}
req = c.newRequest(op, 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)
page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeLoadBalancersOutput), lastPage)
})
}
const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a request for the DescribeTags operation.
func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
op := &request.Operation{
Name: opDescribeTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeTagsInput{}
}
req = c.newRequest(op, 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
}
const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets"
// DetachLoadBalancerFromSubnetsRequest generates a request for the DetachLoadBalancerFromSubnets operation.
func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *request.Request, output *DetachLoadBalancerFromSubnetsOutput) {
op := &request.Operation{
Name: opDetachLoadBalancerFromSubnets,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DetachLoadBalancerFromSubnetsInput{}
}
req = c.newRequest(op, 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
}
const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLoadBalancer"
// DisableAvailabilityZonesForLoadBalancerRequest generates a request for the DisableAvailabilityZonesForLoadBalancer operation.
func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) {
op := &request.Operation{
Name: opDisableAvailabilityZonesForLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisableAvailabilityZonesForLoadBalancerInput{}
}
req = c.newRequest(op, 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
}
const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoadBalancer"
// EnableAvailabilityZonesForLoadBalancerRequest generates a request for the EnableAvailabilityZonesForLoadBalancer operation.
func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) {
op := &request.Operation{
Name: opEnableAvailabilityZonesForLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &EnableAvailabilityZonesForLoadBalancerInput{}
}
req = c.newRequest(op, 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
}
const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes"
// ModifyLoadBalancerAttributesRequest generates a request for the ModifyLoadBalancerAttributes operation.
func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) {
op := &request.Operation{
Name: opModifyLoadBalancerAttributes,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ModifyLoadBalancerAttributesInput{}
}
req = c.newRequest(op, 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
}
const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer"
// RegisterInstancesWithLoadBalancerRequest generates a request for the RegisterInstancesWithLoadBalancer operation.
func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *request.Request, output *RegisterInstancesWithLoadBalancerOutput) {
op := &request.Operation{
Name: opRegisterInstancesWithLoadBalancer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterInstancesWithLoadBalancerInput{}
}
req = c.newRequest(op, 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 takes a little time to complete. 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
}
const opRemoveTags = "RemoveTags"
// RemoveTagsRequest generates a request for the RemoveTags operation.
func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
op := &request.Operation{
Name: opRemoveTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RemoveTagsInput{}
}
req = c.newRequest(op, input, output)
output = &RemoveTagsOutput{}
req.Data = output
return
}
// Removes 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
}
const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCertificate"
// SetLoadBalancerListenerSSLCertificateRequest generates a request for the SetLoadBalancerListenerSSLCertificate operation.
func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) (req *request.Request, output *SetLoadBalancerListenerSSLCertificateOutput) {
op := &request.Operation{
Name: opSetLoadBalancerListenerSSLCertificate,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetLoadBalancerListenerSSLCertificateInput{}
}
req = c.newRequest(op, input, output)
output = &SetLoadBalancerListenerSSLCertificateOutput{}
req.Data = output
return
}
// Sets the certificate that terminates the specified listener's SSL connections.
// The specified certificate replaces any prior certificate that was used on
// the same load balancer and port.
//
// For more information about updating your SSL certificate, see Updating an
// SSL Certificate for a Load Balancer (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/US_UpdatingLoadBalancerSSL.html)
// in the Elastic Load Balancing Developer Guide.
func (c *ELB) SetLoadBalancerListenerSSLCertificate(input *SetLoadBalancerListenerSSLCertificateInput) (*SetLoadBalancerListenerSSLCertificateOutput, error) {
req, out := c.SetLoadBalancerListenerSSLCertificateRequest(input)
err := req.Send()
return out, err
}
const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBackendServer"
// SetLoadBalancerPoliciesForBackendServerRequest generates a request for the SetLoadBalancerPoliciesForBackendServer operation.
func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) (req *request.Request, output *SetLoadBalancerPoliciesForBackendServerOutput) {
op := &request.Operation{
Name: opSetLoadBalancerPoliciesForBackendServer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetLoadBalancerPoliciesForBackendServerInput{}
}
req = c.newRequest(op, input, output)
output = &SetLoadBalancerPoliciesForBackendServerOutput{}
req.Data = output
return
}
// Replaces the set of policies associated with the specified port on which
// the back-end server is listening with a new set of policies. At this time,
// only the back-end server authentication policy type can be applied to the
// back-end ports; this policy type is composed of multiple public key policies.
//
// Each time you use SetLoadBalancerPoliciesForBackendServer to enable the
// policies, use the PolicyNames parameter to list the policies that you want
// to enable.
//
// You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify
// that the policy is associated with the back-end server.
func (c *ELB) SetLoadBalancerPoliciesForBackendServer(input *SetLoadBalancerPoliciesForBackendServerInput) (*SetLoadBalancerPoliciesForBackendServerOutput, error) {
req, out := c.SetLoadBalancerPoliciesForBackendServerRequest(input)
err := req.Send()
return out, err
}
const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener"
// SetLoadBalancerPoliciesOfListenerRequest generates a request for the SetLoadBalancerPoliciesOfListener operation.
func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) (req *request.Request, output *SetLoadBalancerPoliciesOfListenerOutput) {
op := &request.Operation{
Name: opSetLoadBalancerPoliciesOfListener,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetLoadBalancerPoliciesOfListenerInput{}
}
req = c.newRequest(op, input, output)
output = &SetLoadBalancerPoliciesOfListenerOutput{}
req.Data = output
return
}
// Associates, updates, or disables a policy with a listener for the specified
// load balancer. You can associate multiple policies with a listener.
func (c *ELB) SetLoadBalancerPoliciesOfListener(input *SetLoadBalancerPoliciesOfListenerInput) (*SetLoadBalancerPoliciesOfListenerOutput, error) {
req, out := c.SetLoadBalancerPoliciesOfListenerRequest(input)
err := req.Send()
return out, err
}
// Information about the AccessLog attribute.
type AccessLog struct {
_ struct{} `type:"structure"`
// The interval for publishing the access logs. You can specify an interval
// of either 5 minutes or 60 minutes.
//
// Default: 60 minutes
EmitInterval *int64 `type:"integer"`
// Specifies whether access log is enabled for the load balancer.
Enabled *bool `type:"boolean" required:"true"`
// The name of the Amazon S3 bucket where the access logs are stored.
S3BucketName *string `type:"string"`
// The logical hierarchy you created for your Amazon S3 bucket, for example
// my-bucket-prefix/prod. If the prefix is not provided, the log is placed at
// the root level of the bucket.
S3BucketPrefix *string `type:"string"`
}
// String returns the string representation
func (s AccessLog) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AccessLog) GoString() string {
return s.String()