1VM::EC2::REST::elastic_Ulsoeard_Cboanltarnicbeurt(e3d)PVeMr:l:EDCo2c:u:mReEnStTa:t:ieolnastic_load_balancer(3)
2
3
4

NAME VM::EC2::REST::elastic_load_balancer

SYNOPSIS

7        use VM::EC2 ':elb';
8

METHODS

10       The methods in this module allow you to retrieve information about
11       Elastic Load Balancers, create new ELBs, and change the properties of
12       the ELBs.
13
14       Implemented:
15        AddTags
16        ApplySecurityGroupsToLoadBalancer
17        AttachLoadBalancerToSubnets
18        ConfigureHealthCheck
19        CreateAppCookieStickinessPolicy
20        CreateLBCookieStickinessPolicy
21        CreateLoadBalancer
22        CreateLoadBalancerListeners
23        CreateLoadBalancerPolicy
24        DeleteLoadBalancer
25        DeleteLoadBalancerListeners
26        DeleteLoadBalancerPolicy
27        DeregisterInstancesFromLoadBalancer
28        DescribeInstanceHealth
29        DescribeLoadBalancerAttributes
30        DescribeLoadBalancerPolicies
31        DescribeLoadBalancerPolicyTypes
32        DescribeLoadBalancers
33        DescribeTags
34        DetachLoadBalancerFromSubnets
35        DisableAvailabilityZonesForLoadBalancer
36        EnableAvailabilityZonesForLoadBalancer
37        ModifyLoadBalancerAttributes
38        RegisterInstancesWithLoadBalancer
39        RemoveTags
40        SetLoadBalancerListenerSSLCertificate
41        SetLoadBalancerPoliciesForBackendServer
42        SetLoadBalancerPoliciesOfListener
43
44       Unimplemented:
45        (none)
46
47       The primary object manipulated by these methods is VM::EC2::ELB. Please
48       see the VM::EC2::ELB manual page
49
50   $success = $ec2->tag_load_balancer(-load_balancer_names => $name, -tags =>
51       { key => value, [key2 => value2], ... })
52       Adds one or more tags for the specified load balancer.  Each load
53       balancer can have a maximum of 10 tags.  Each tag consists of a key and
54       an optional value.
55
56       Tag keys must be unique for each load balancer.  If a tag with the same
57       key is already associated with the load balancer, this action will
58       update the value of the key.
59
60       Arguments:
61
62        -load_balancer_names    The name of the load balancer to tag. You can specify a
63                                maximum of one load balancer name.
64
65        -tags                   Hashref of tag key/value pairs.
66
67       Returns true on success.
68
69   %tags = $ec2->describe_load_balancer_tags(-load_balancer_name=>\@names)
70   %tags = $ec2->describe_load_balancer_tags(@names)
71       Describes the tags associated with one or more load balancers.
72
73       Arguments:
74
75        -load_balancer_names    The name of the load balancers to retrieve tags for.
76
77       Returns a hash of hashes in this format:
78
79       {
80          'LBName' =>
81          {
82              TagName => TagValue,
83              TagName => TagValue,
84          } }
85
86   $success = $ec2->remove_load_balancer_tags(-load_balancer_names => $name,
87       -tags => [ name1,[name2,name3,...] ])
88   $success = $ec2->remove_load_balancer_tags(-load_balancer_names => $name,
89       -tags => $tag)
90   $attrs = $ec2->describe_load_balancer_attributes(-load_balancer_name =>
91       $name)
92       Returns detailed information about all of the attributes associated
93       with the specified load balancer.
94
95       Arguments:
96
97           -load_balancer_name     Name of the ELB to return information on.
98
99       Returns a VM::EC2::ELB::Attributes object.
100
101   $attr = $ec2->modify_load_balancer_attributes(%args)
102       Modifies the attributes of a specified load balancer.
103
104       Arguments:
105
106        -load_balancer_name        Name of the ELB to change attributes on. (Required)
107
108       One or more of the following arguments are required:
109
110        -access_log                A hashref of attribute values for AccessLog
111                                   ex: -access_log => { Enabled => 'false' }
112
113        -connection_draining       A hashref of attribute values for ConnectionDraining
114                                   ex: -connection_draining => { Enabled => 'false' }
115
116        -connection_settings       A hashref of attribute values for ConnectionSettings
117                                   ex: -connection_settings => { IdleTimeout => 30 }
118
119        -cross_zone_load_balancing A hashref of attribute values for
120                                   CrossZoneLoadBalancing.  ex:
121                                   -cross_zone_load_balancing => { Enabled => 'true' }
122
123       Returns a VM::EC2::ELB::Attributes object.
124
125   @lbs = $ec2->describe_load_balancers(-load_balancer_name=>\@names)
126   @lbs = $ec2->describe_load_balancers(@names)
127       Provides detailed configuration information for the specified ELB(s).
128
129       Optional parameters are:
130
131           -load_balancer_names     Name of the ELB to return information on.
132                                    This can be a string scalar, or an arrayref.
133
134           -lb_name,-lb_names,
135             -load_balancer_name    Aliases for -load_balancer_names
136
137       Returns a series of VM::EC2::ELB objects.
138
139   $success = $ec2->delete_load_balancer(-load_balancer_name=>$name)
140   $success = $ec2->delete_load_balancer($name)
141       Deletes the specified ELB.
142
143       Arguments:
144
145        -load_balancer_name    -- The name of the ELB to delete
146
147        -lb_name               -- Alias for -load_balancer_name
148
149       Returns true on successful deletion.  NOTE:  This API call will return
150       success regardless of existence of the ELB.
151
152   $healthcheck = $ec2->configure_health_check(-load_balancer_name  => $name,
153       -healthy_threshold   => $cnt, -interval            => $secs, -target
154       => $target, -timeout             => $secs, -unhealthy_threshold =>
155       $cnt)
156       Defines an application healthcheck for the instances.
157
158       All Parameters are required.
159
160           -load_balancer_name    Name of the ELB.
161
162           -healthy_threashold    Specifies the number of consecutive health probe successes
163                                  required before moving the instance to the Healthy state.
164
165           -interval              Specifies the approximate interval, in seconds, between
166                                  health checks of an individual instance.
167
168           -target                Must be a string in the form: Protocol:Port[/PathToPing]
169                                   - Valid Protocol types are: HTTP, HTTPS, TCP, SSL
170                                   - Port must be in range 1-65535
171                                   - PathToPing is only applicable to HTTP or HTTPS protocol
172                                     types and must be 1024 characters long or fewer.
173
174           -timeout               Specifies the amount of time, in seconds, during which no
175                                  response means a failed health probe.
176
177           -unhealthy_threashold  Specifies the number of consecutive health probe failures
178                                  required before moving the instance to the Unhealthy state.
179
180           -lb_name               Alias for -load_balancer_name
181
182       Returns a VM::EC2::ELB::HealthCheck object.
183
184   $success = $ec2->create_app_cookie_stickiness_policy(-load_balancer_name =>
185       $name, -cookie_name        => $cookie, -policy_name        => $policy)
186       Generates a stickiness policy with sticky session lifetimes that follow
187       that of an application-generated cookie. This policy can be associated
188       only with HTTP/HTTPS listeners.
189
190       Required arguments:
191
192           -load_balancer_name    Name of the ELB.
193
194           -cookie_name           Name of the application cookie used for stickiness.
195
196           -policy_name           The name of the policy being created. The name must
197                                  be unique within the set of policies for this ELB.
198
199           -lb_name               Alias for -load_balancer_name
200
201       Returns true on successful execution.
202
203   $success = $ec2->create_lb_cookie_stickiness_policy(-load_balancer_name
204       => $name, -cookie_expiration_period => $secs, -policy_name
205       => $policy)
206       Generates a stickiness policy with sticky session lifetimes controlled
207       by the lifetime of the browser (user-agent) or a specified expiration
208       period. This policy can be associated only with HTTP/HTTPS listeners.
209
210       Required arguments:
211
212           -load_balancer_name         Name of the ELB.
213
214           -cookie_expiration_period   The time period in seconds after which the
215                                       cookie should be considered stale. Not
216                                       specifying this parameter indicates that the
217                                       sticky session will last for the duration of
218                                       the browser session.  OPTIONAL
219
220           -policy_name                The name of the policy being created. The name
221                                       must be unique within the set of policies for
222                                       this ELB.
223
224           -lb_name                    Alias for -load_balancer_name
225
226       Returns true on successful execution.
227
228   $lb = $ec2->create_load_balancer(-load_balancer_name => $name, -listeners
229       => \@listeners, -availability_zones => \@zones, -scheme             =>
230       $scheme, )
231       Creates a new ELB.
232
233       Required arguments:
234
235           -load_balancer_name         Name of the ELB.
236
237           -listeners                  Must either be a L<VM::EC2::ELB:Listener> object
238                                       (or arrayref of objects) or a hashref (or arrayref
239                                       of hashrefs) containing the following keys:
240
241                     Protocol            -- Value as one of: HTTP, HTTPS, TCP, or SSL
242                     LoadBalancerPort    -- Value in range 1-65535
243                     InstancePort        -- Value in range 1-65535
244                       and optionally:
245                     InstanceProtocol    -- Value as one of: HTTP, HTTPS, TCP, or SSL
246                     SSLCertificateId    -- Certificate ID from AWS IAM certificate list
247
248
249           -availability_zones    Literal string or array of strings containing valid
250                                  availability zones.  Optional if subnets are
251                                  specified in a VPC usage scenario.
252
253       Optional arguments:
254
255           -scheme                The type of ELB.  By default, Elastic Load Balancing
256                                  creates an Internet-facing LoadBalancer with a
257                                  publicly resolvable DNS name, which resolves to
258                                  public IP addresses.  Specify the value 'internal'
259                                  for this option to create an internal LoadBalancer
260                                  with a DNS name that resolves to private IP addresses.
261                                  This option is only available in a VPC.
262
263           -security_groups       The security groups assigned to your ELB within your
264                                  VPC.  String or arrayref.
265
266           -subnets               A list of subnet IDs in your VPC to attach to your
267                                  ELB.  String or arrayref.  REQUIRED if availability
268                                  zones are not specified above.
269
270           -tags                  A list of tags to assign to the load balancer.
271                                  Hashref of tag key/value pairs.
272                                  ex: { Name => Value, Name => Value, ... }
273
274       Argument aliases:
275
276           -zones                 Alias for -availability_zones
277           -lb_name               Alias for -load_balancer_name
278
279       Returns a VM::EC2::ELB object if successful.
280
281   $success = $ec2->create_load_balancer_listeners(-load_balancer_name =>
282       $name, -listeners          => \@listeners)
283       Creates one or more listeners on a ELB for the specified port. If a
284       listener with the given port does not already exist, it will be
285       created; otherwise, the properties of the new listener must match the
286       properties of the existing listener.
287
288        -listeners    Must either be a L<VM::EC2::ELB:Listener> object (or arrayref of
289                      objects) or a hash (or arrayref of hashes) containing the
290                      following keys:
291
292                    Protocol            -- Value as one of: HTTP, HTTPS, TCP, or SSL
293                    LoadBalancerPort    -- Value in range 1-65535
294                    InstancePort        -- Value in range 1-65535
295                     and optionally:
296                    InstanceProtocol    -- Value as one of: HTTP, HTTPS, TCP, or SSL
297                    SSLCertificateId    -- Certificate ID from AWS IAM certificate list
298
299        -lb_name      Alias for -load_balancer_name
300
301       Returns true on successful execution.
302
303   $success = $ec2->delete_load_balancer_listeners(-load_balancer_name  =>
304       $name, -load_balancer_ports => \@ports)
305       Deletes listeners from the ELB for the specified port.
306
307       Arguments:
308
309        -load_balancer_name     The name of the ELB
310
311        -load_balancer_ports    An arrayref of strings or literal string containing
312                                the port numbers.
313
314        -ports                  Alias for -load_balancer_ports
315
316        -lb_name                Alias for -load_balancer_name
317
318       Returns true on successful execution.
319
320   @z = $ec2->disable_availability_zones_for_load_balancer(-load_balancer_name
321       => $name, -availability_zones => \@zones)
322       Removes the specified EC2 Availability Zones from the set of configured
323       Availability Zones for the ELB.  There must be at least one
324       Availability Zone registered with a LoadBalancer at all times.
325       Instances registered with the ELB that are in the removed Availability
326       Zone go into the OutOfService state.
327
328       Arguments:
329
330        -load_balancer_name    The name of the ELB
331
332        -availability_zones    Arrayref or literal string of availability zone names
333                               (ie. us-east-1a)
334
335        -zones                 Alias for -availability_zones
336
337        -lb_name               Alias for -load_balancer_name
338
339       Returns an array of VM::EC2::AvailabilityZone objects now associated
340       with the ELB.
341
342   @z = $ec2->enable_availability_zones_for_load_balancer(-load_balancer_name
343       => $name, -availability_zones => \@zones)
344       Adds one or more EC2 Availability Zones to the ELB.  The ELB evenly
345       distributes requests across all its registered Availability Zones that
346       contain instances.
347
348       Arguments:
349
350        -load_balancer_name    The name of the ELB
351
352        -availability_zones    Array or literal string of availability zone names
353                               (ie. us-east-1a)
354
355        -zones                 Alias for -availability_zones
356
357        -lb_name               Alias for -load_balancer_name
358
359       Returns an array of VM::EC2::AvailabilityZone objects now associated
360       with the ELB.
361
362   @i = $ec2->register_instances_with_load_balancer(-load_balancer_name =>
363       $name, -instances          => \@instance_ids)
364       Adds new instances to the ELB.  If the instance is in an availability
365       zone that is not registered with the ELB will be in the OutOfService
366       state.  Once the zone is added to the ELB the instance will go into the
367       InService state.
368
369       Arguments:
370
371        -load_balancer_name    The name of the ELB
372
373        -instances             An arrayref or literal string of Instance IDs.
374
375        -lb_name               Alias for -load_balancer_name
376
377       Returns an array of instances now associated with the ELB in the form
378       of VM::EC2::Instance objects.
379
380   @i = $ec2->deregister_instances_from_load_balancer(-load_balancer_name =>
381       $name, -instances          => \@instance_ids)
382       Deregisters instances from the ELB. Once the instance is deregistered,
383       it will stop receiving traffic from the ELB.
384
385       Arguments:
386
387        -load_balancer_name    The name of the ELB
388
389        -instances             An arrayref or literal string of Instance IDs.
390
391        -lb_name               Alias for -load_balancer_name
392
393       Returns an array of instances now associated with the ELB in the form
394       of VM::EC2::Instance objects.
395
396   $success =
397       $ec2->set_load_balancer_listener_ssl_certificate(-load_balancer_name =>
398       $name, -load_balancer_port => $port, -ssl_certificate_id => $cert_id)
399       Sets the certificate that terminates the specified listener's SSL
400       connections.  The specified certificate replaces any prior certificate
401       that was used on the same ELB and port.
402
403       Required arguments:
404
405        -load_balancer_name    The name of the the ELB.
406
407        -load_balancer_port    The port that uses the specified SSL certificate.
408
409        -ssl_certificate_id    The ID of the SSL certificate chain to use.  See the
410                               AWS Identity and Access Management documentation under
411                               Managing Server Certificates for more information.
412
413       Alias arguments:
414
415        -lb_name    Alias for -load_balancer_name
416
417        -port       Alias for -load_balancer_port
418
419        -cert_id    Alias for -ssl_certificate_id
420
421       Returns true on successful execution.
422
423   @states = $ec2->describe_instance_health(-load_balancer_name => $name,
424       -instances          => \@instance_ids)
425       Returns the current state of the instances of the specified
426       LoadBalancer. If no instances are specified, the state of all the
427       instances for the ELB is returned.
428
429       Required arguments:
430
431           -load_balancer_name     The name of the ELB
432
433       Optional parameters:
434
435           -instances              Literal string or arrayref of Instance IDs
436
437           -lb_name                Alias for -load_balancer_name
438
439           -instance_id            Alias for -instances
440
441       Returns an array of VM::EC2::ELB::InstanceState objects.
442
443   $success = $ec2->create_load_balancer_policy(-load_balancer_name => $name,
444       -policy_name        => $policy, -policy_type_name   => $type_name,
445       -policy_attributes  => \@attrs)
446       Creates a new policy that contains the necessary attributes depending
447       on the policy type. Policies are settings that are saved for your ELB
448       and that can be applied to the front-end listener, or the back-end
449       application server, depending on your policy type.
450
451       Required Arguments:
452
453        -load_balancer_name   The name associated with the LoadBalancer for which the
454                              policy is being created. This name must be unique within
455                              the client AWS account.
456
457        -policy_name          The name of the ELB policy being created. The name must
458                              be unique within the set of policies for this ELB.
459
460        -policy_type_name     The name of the base policy type being used to create
461                              this policy. To get the list of policy types, use the
462                              describe_load_balancer_policy_types function.
463
464       Optional Arguments:
465
466        -policy_attributes    or hashref containing AttributeName and AttributeValue
467                                or
468                              Arrayref of VM::EC2::ELB::PolicyAttribute object or single object
469
470        -lb_name              Alias for -load_balancer_name
471
472       Returns true if successful.
473
474   $success = $ec2->delete_load_balancer_policy(-load_balancer_name => $name,
475       -policy_name        => $policy)
476       Deletes a policy from the ELB. The specified policy must not be enabled
477       for any listeners.
478
479       Arguments:
480
481        -load_balancer_name    The name of the ELB
482
483        -policy_name           The name of the ELB policy
484
485        -lb_name               Alias for -load_balancer_name
486
487       Returns true if successful.
488
489   @policy_descs = $ec2->describe_load_balancer_policies(-load_balancer_name
490       => $name, -policy_names       => \@names)
491       Returns detailed descriptions of ELB policies. If you specify an ELB
492       name, the operation returns either the descriptions of the specified
493       policies, or descriptions of all the policies created for the ELB. If
494       you don't specify a ELB name, the operation returns descriptions of the
495       specified sample policies, or descriptions of all the sample policies.
496       The names of the sample policies have the ELBSample- prefix.
497
498       Optional Arguments:
499
500        -load_balancer_name  The name of the ELB.
501
502        -policy_names        The names of ELB policies created or ELB sample policy names.
503
504        -lb_name             Alias for -load_balancer_name
505
506       Returns an array of VM::EC2::ELB::PolicyDescription objects if
507       successful.
508
509   @policy_types =
510       $ec2->describe_load_balancer_policy_types(-policy_type_names =>
511       \@names)
512       Returns meta-information on the specified ELB policies defined by the
513       Elastic Load Balancing service. The policy types that are returned from
514       this action can be used in a create_load_balander_policy call to
515       instantiate specific policy configurations that will be applied to an
516       ELB.
517
518       Required arguemnts:
519
520        -load_balancer_name    The name of the ELB.
521
522       Optional arguments:
523
524        -policy_type_names    Literal string or arrayref of policy type names
525
526        -names                Alias for -policy_type_names
527
528       Returns an array of VM::EC2::ELB::PolicyTypeDescription objects if
529       successful.
530
531   $success = $ec2->set_load_balancer_policies_of_listener(-load_balancer_name
532       => $name, -load_balancer_port => $port, -policy_names       => \@names)
533       Associates, updates, or disables a policy with a listener on the ELB.
534       Multiple policies may be associated with a listener.
535
536       Required arguments:
537
538        -load_balancer_name    The name associated with the ELB.
539
540        -load_balancer_port    The external port of the LoadBalancer with which this
541                               policy applies to.
542
543        -policy_names          List of policies to be associated with the listener.
544                               Currently this list can have at most one policy. If the
545                               list is empty, the current policy is removed from the
546                               listener.  String or arrayref.
547
548       Returns true if successful.
549
550   @sgs = $ec2->apply_security_groups_to_load_balancer(-load_balancer_name =>
551       $name, -security_groups    => \@groups)
552       Associates one or more security groups with your ELB in VPC.  The
553       provided security group IDs will override any currently applied
554       security groups.
555
556       Required arguments:
557
558        -load_balancer_name The name associated with the ELB.
559
560        -security_groups    A list of security group IDs to associate with your ELB in
561                            VPC. The security group IDs must be provided as the ID and
562                            not the security group name (For example, sg-123456).
563                            String or arrayref.
564
565       Returns a series of VM::EC2::SecurityGroup objects.
566
567   @subnets = $ec2->attach_load_balancer_to_subnets(-load_balancer_name =>
568       $name, -subnets            => \@subnets)
569       Adds one or more subnets to the set of configured subnets for the ELB.
570
571       Required arguments:
572
573        -load_balancer_name    The name associated with the ELB.
574
575        -subnets               A list of subnet IDs to add for the ELB.  String or
576                               arrayref.
577
578       Returns a series of VM::EC2::VPC::Subnet objects corresponding to the
579       subnets the ELB is now attached to.
580
581   @subnets = $ec2->detach_load_balancer_from_subnets(-load_balancer_name =>
582       $name, -subnets            => \@subnets)
583       Removes subnets from the set of configured subnets in the VPC for the
584       ELB.
585
586       Required arguments:
587
588        -load_balancer_name    The name associated with the ELB.
589
590        -subnets               A list of subnet IDs to add for the ELB.  String or
591                               arrayref.
592
593       Returns a series of VM::EC2::VPC::Subnet objects corresponding to the
594       subnets the ELB is now attached to.
595
596   $success =
597       $ec2->set_load_balancer_policies_for_backend_server(-instance_port
598       => $port, -load_balancer_name => $name, -policy_names       =>
599       \@policies)
600       Replaces the current set of policies associated with a port on which
601       the back- end server is listening with a new set of policies. After the
602       policies have been created, they can be applied here as a list.  At
603       this time, only the back- end server authentication policy type can be
604       applied to the back-end ports; this policy type is composed of multiple
605       public key policies.
606
607       Required arguments:
608
609        -load_balancer_name    The name associated with the ELB.
610
611        -instance_port         The port number associated with the back-end server.
612
613        -policy_names          List of policy names to be set. If the list is empty,
614                               then all current polices are removed from the back-end
615                               server.
616
617       Aliases:
618
619        -port      Alias for -instance_port
620        -lb_name   Alias for -load_balancer_name
621
622       Returns true if successful.
623

SEE ALSO

625       VM::EC2
626

AUTHOR

628       Lance Kinley <lkinley@loyaltymethods.com<gt>.  Lincoln Stein
629       <lincoln.stein@gmail.com>.
630
631       Copyright (c) 2012 Loyalty Methods, Inc.  Copyright (c) 2012 Ontario
632       Institute for Cancer Research
633
634       This package and its accompanying libraries is free software; you can
635       redistribute it and/or modify it under the terms of the GPL (either
636       version 1, or at your option, any later version) or the Artistic
637       License 2.0.  Refer to LICENSE for the full license text. In addition,
638       please see DISCLAIMER.txt for disclaimers of warranty.
639
640
641
642perl v5.32.0                      2020-0V7M-:2:8EC2::REST::elastic_load_balancer(3)
Impressum