ElasticLoadBalancing#
Client#
- class ElasticLoadBalancing.Client#
A low-level client representing Elastic Load Balancing
A load balancer can distribute incoming traffic across your EC2 instances. This enables you to increase the availability of your application. The load balancer also monitors the health of its registered instances and ensures that it routes traffic only to healthy instances. You configure your load balancer to accept incoming traffic by specifying one or more listeners, which are configured with a protocol and port number for connections from clients to the load balancer and a protocol and port number for connections from the load balancer to the instances.
Elastic Load Balancing supports three types of load balancers: Application Load Balancers, Network Load Balancers, and Classic Load Balancers. You can select a load balancer based on your application needs. For more information, see the Elastic Load Balancing User Guide.
This reference covers the 2012-06-01 API, which supports Classic Load Balancers. The 2015-12-01 API supports Application Load Balancers and Network Load Balancers.
To get started, create a load balancer with one or more listeners using CreateLoadBalancer. Register your instances with the load balancer using RegisterInstancesWithLoadBalancer.
All Elastic Load Balancing operations are idempotent, which means that they complete at most one time. If you repeat an operation, it succeeds with a 200 OK response code.
client = session.create_client('elb')
These are the available methods:
- add_tags
- apply_security_groups_to_load_balancer
- attach_load_balancer_to_subnets
- can_paginate
- close
- configure_health_check
- create_app_cookie_stickiness_policy
- create_lb_cookie_stickiness_policy
- create_load_balancer
- create_load_balancer_listeners
- create_load_balancer_policy
- delete_load_balancer
- delete_load_balancer_listeners
- delete_load_balancer_policy
- deregister_instances_from_load_balancer
- describe_account_limits
- describe_instance_health
- describe_load_balancer_attributes
- describe_load_balancer_policies
- describe_load_balancer_policy_types
- describe_load_balancers
- describe_tags
- detach_load_balancer_from_subnets
- disable_availability_zones_for_load_balancer
- enable_availability_zones_for_load_balancer
- get_paginator
- get_waiter
- modify_load_balancer_attributes
- register_instances_with_load_balancer
- remove_tags
- set_load_balancer_listener_ssl_certificate
- set_load_balancer_policies_for_backend_server
- set_load_balancer_policies_of_listener
Client Exceptions#
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
- AccessPointNotFoundException
- CertificateNotFoundException
- DependencyThrottleException
- DuplicateAccessPointNameException
- DuplicateListenerException
- DuplicatePolicyNameException
- DuplicateTagKeysException
- InvalidConfigurationRequestException
- InvalidEndPointException
- InvalidSchemeException
- InvalidSecurityGroupException
- InvalidSubnetException
- ListenerNotFoundException
- LoadBalancerAttributeNotFoundException
- OperationNotPermittedException
- PolicyNotFoundException
- PolicyTypeNotFoundException
- SubnetNotFoundException
- TooManyAccessPointsException
- TooManyPoliciesException
- TooManyTagsException
- UnsupportedProtocolException
Paginators#
Paginators are available on a client instance via the get_paginator
method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide.
The available paginators are:
Waiters#
Waiters are available on a client instance via the get_waiter
method. For more detailed instructions and examples on the usage or waiters, see the waiters user guide.
The available waiters are: