ElasticLoadBalancingClient#
Index > ElasticLoadBalancing > ElasticLoadBalancingClient
Auto-generated documentation for ElasticLoadBalancing type annotations stubs module mypy-boto3-elb.
ElasticLoadBalancingClient#
Type annotations and code completion for boto3.client("elb")
.
boto3 documentation
# ElasticLoadBalancingClient usage example
from boto3.session import Session
from mypy_boto3_elb.client import ElasticLoadBalancingClient
def get_elb_client() -> ElasticLoadBalancingClient:
return Session().client("elb")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("elb").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("elb")
try:
do_something(client)
except (
client.exceptions.AccessPointNotFoundException,
client.exceptions.CertificateNotFoundException,
client.exceptions.ClientError,
client.exceptions.DependencyThrottleException,
client.exceptions.DuplicateAccessPointNameException,
client.exceptions.DuplicateListenerException,
client.exceptions.DuplicatePolicyNameException,
client.exceptions.DuplicateTagKeysException,
client.exceptions.InvalidConfigurationRequestException,
client.exceptions.InvalidEndPointException,
client.exceptions.InvalidSchemeException,
client.exceptions.InvalidSecurityGroupException,
client.exceptions.InvalidSubnetException,
client.exceptions.ListenerNotFoundException,
client.exceptions.LoadBalancerAttributeNotFoundException,
client.exceptions.OperationNotPermittedException,
client.exceptions.PolicyNotFoundException,
client.exceptions.PolicyTypeNotFoundException,
client.exceptions.SubnetNotFoundException,
client.exceptions.TooManyAccessPointsException,
client.exceptions.TooManyPoliciesException,
client.exceptions.TooManyTagsException,
client.exceptions.UnsupportedProtocolException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_elb.client import Exceptions
def handle_error(exc: Exceptions.AccessPointNotFoundException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("elb").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("elb").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
add_tags#
Adds the specified tags to the specified load balancer.
Type annotations and code completion for boto3.client("elb").add_tags
method.
boto3 documentation
# add_tags method definition
def add_tags(
self,
*,
LoadBalancerNames: Sequence[str],
Tags: Sequence[TagTypeDef], # (1)
) -> dict[str, Any]:
...
- See TagTypeDef
# add_tags method usage example with argument unpacking
kwargs: AddTagsInputRequestTypeDef = { # (1)
"LoadBalancerNames": ...,
"Tags": ...,
}
parent.add_tags(**kwargs)
apply_security_groups_to_load_balancer#
Associates one or more security groups with your load balancer in a virtual private cloud (VPC).
Type annotations and code completion for boto3.client("elb").apply_security_groups_to_load_balancer
method.
boto3 documentation
# apply_security_groups_to_load_balancer method definition
def apply_security_groups_to_load_balancer(
self,
*,
LoadBalancerName: str,
SecurityGroups: Sequence[str],
) -> ApplySecurityGroupsToLoadBalancerOutputTypeDef: # (1)
...
# apply_security_groups_to_load_balancer method usage example with argument unpacking
kwargs: ApplySecurityGroupsToLoadBalancerInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"SecurityGroups": ...,
}
parent.apply_security_groups_to_load_balancer(**kwargs)
attach_load_balancer_to_subnets#
Adds one or more subnets to the set of configured subnets for the specified load balancer.
Type annotations and code completion for boto3.client("elb").attach_load_balancer_to_subnets
method.
boto3 documentation
# attach_load_balancer_to_subnets method definition
def attach_load_balancer_to_subnets(
self,
*,
LoadBalancerName: str,
Subnets: Sequence[str],
) -> AttachLoadBalancerToSubnetsOutputTypeDef: # (1)
...
# attach_load_balancer_to_subnets method usage example with argument unpacking
kwargs: AttachLoadBalancerToSubnetsInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Subnets": ...,
}
parent.attach_load_balancer_to_subnets(**kwargs)
configure_health_check#
Specifies the health check settings to use when evaluating the health state of your EC2 instances.
Type annotations and code completion for boto3.client("elb").configure_health_check
method.
boto3 documentation
# configure_health_check method definition
def configure_health_check(
self,
*,
LoadBalancerName: str,
HealthCheck: HealthCheckTypeDef, # (1)
) -> ConfigureHealthCheckOutputTypeDef: # (2)
...
# configure_health_check method usage example with argument unpacking
kwargs: ConfigureHealthCheckInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"HealthCheck": ...,
}
parent.configure_health_check(**kwargs)
create_app_cookie_stickiness_policy#
Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie.
Type annotations and code completion for boto3.client("elb").create_app_cookie_stickiness_policy
method.
boto3 documentation
# create_app_cookie_stickiness_policy method definition
def create_app_cookie_stickiness_policy(
self,
*,
LoadBalancerName: str,
PolicyName: str,
CookieName: str,
) -> dict[str, Any]:
...
# create_app_cookie_stickiness_policy method usage example with argument unpacking
kwargs: CreateAppCookieStickinessPolicyInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"PolicyName": ...,
"CookieName": ...,
}
parent.create_app_cookie_stickiness_policy(**kwargs)
create_lb_cookie_stickiness_policy#
Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period.
Type annotations and code completion for boto3.client("elb").create_lb_cookie_stickiness_policy
method.
boto3 documentation
# create_lb_cookie_stickiness_policy method definition
def create_lb_cookie_stickiness_policy(
self,
*,
LoadBalancerName: str,
PolicyName: str,
CookieExpirationPeriod: int = ...,
) -> dict[str, Any]:
...
# create_lb_cookie_stickiness_policy method usage example with argument unpacking
kwargs: CreateLBCookieStickinessPolicyInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"PolicyName": ...,
}
parent.create_lb_cookie_stickiness_policy(**kwargs)
create_load_balancer#
Creates a Classic Load Balancer.
Type annotations and code completion for boto3.client("elb").create_load_balancer
method.
boto3 documentation
# create_load_balancer method definition
def create_load_balancer(
self,
*,
LoadBalancerName: str,
Listeners: Sequence[ListenerTypeDef], # (1)
AvailabilityZones: Sequence[str] = ...,
Subnets: Sequence[str] = ...,
SecurityGroups: Sequence[str] = ...,
Scheme: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateAccessPointOutputTypeDef: # (3)
...
- See ListenerTypeDef
- See TagTypeDef
- See CreateAccessPointOutputTypeDef
# create_load_balancer method usage example with argument unpacking
kwargs: CreateAccessPointInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Listeners": ...,
}
parent.create_load_balancer(**kwargs)
create_load_balancer_listeners#
Creates one or more listeners for the specified load balancer.
Type annotations and code completion for boto3.client("elb").create_load_balancer_listeners
method.
boto3 documentation
# create_load_balancer_listeners method definition
def create_load_balancer_listeners(
self,
*,
LoadBalancerName: str,
Listeners: Sequence[ListenerTypeDef], # (1)
) -> dict[str, Any]:
...
- See ListenerTypeDef
# create_load_balancer_listeners method usage example with argument unpacking
kwargs: CreateLoadBalancerListenerInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Listeners": ...,
}
parent.create_load_balancer_listeners(**kwargs)
create_load_balancer_policy#
Creates a policy with the specified attributes for the specified load balancer.
Type annotations and code completion for boto3.client("elb").create_load_balancer_policy
method.
boto3 documentation
# create_load_balancer_policy method definition
def create_load_balancer_policy(
self,
*,
LoadBalancerName: str,
PolicyName: str,
PolicyTypeName: str,
PolicyAttributes: Sequence[PolicyAttributeTypeDef] = ..., # (1)
) -> dict[str, Any]:
...
# create_load_balancer_policy method usage example with argument unpacking
kwargs: CreateLoadBalancerPolicyInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"PolicyName": ...,
"PolicyTypeName": ...,
}
parent.create_load_balancer_policy(**kwargs)
delete_load_balancer#
Deletes the specified load balancer.
Type annotations and code completion for boto3.client("elb").delete_load_balancer
method.
boto3 documentation
# delete_load_balancer method definition
def delete_load_balancer(
self,
*,
LoadBalancerName: str,
) -> dict[str, Any]:
...
# delete_load_balancer method usage example with argument unpacking
kwargs: DeleteAccessPointInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
}
parent.delete_load_balancer(**kwargs)
delete_load_balancer_listeners#
Deletes the specified listeners from the specified load balancer.
Type annotations and code completion for boto3.client("elb").delete_load_balancer_listeners
method.
boto3 documentation
# delete_load_balancer_listeners method definition
def delete_load_balancer_listeners(
self,
*,
LoadBalancerName: str,
LoadBalancerPorts: Sequence[int],
) -> dict[str, Any]:
...
# delete_load_balancer_listeners method usage example with argument unpacking
kwargs: DeleteLoadBalancerListenerInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"LoadBalancerPorts": ...,
}
parent.delete_load_balancer_listeners(**kwargs)
delete_load_balancer_policy#
Deletes the specified policy from the specified load balancer.
Type annotations and code completion for boto3.client("elb").delete_load_balancer_policy
method.
boto3 documentation
# delete_load_balancer_policy method definition
def delete_load_balancer_policy(
self,
*,
LoadBalancerName: str,
PolicyName: str,
) -> dict[str, Any]:
...
# delete_load_balancer_policy method usage example with argument unpacking
kwargs: DeleteLoadBalancerPolicyInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"PolicyName": ...,
}
parent.delete_load_balancer_policy(**kwargs)
deregister_instances_from_load_balancer#
Deregisters the specified instances from the specified load balancer.
Type annotations and code completion for boto3.client("elb").deregister_instances_from_load_balancer
method.
boto3 documentation
# deregister_instances_from_load_balancer method definition
def deregister_instances_from_load_balancer(
self,
*,
LoadBalancerName: str,
Instances: Sequence[InstanceTypeDef], # (1)
) -> DeregisterEndPointsOutputTypeDef: # (2)
...
# deregister_instances_from_load_balancer method usage example with argument unpacking
kwargs: DeregisterEndPointsInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Instances": ...,
}
parent.deregister_instances_from_load_balancer(**kwargs)
describe_account_limits#
Describes the current Elastic Load Balancing resource limits for your AWS account.
Type annotations and code completion for boto3.client("elb").describe_account_limits
method.
boto3 documentation
# describe_account_limits method definition
def describe_account_limits(
self,
*,
Marker: str = ...,
PageSize: int = ...,
) -> DescribeAccountLimitsOutputTypeDef: # (1)
...
# describe_account_limits method usage example with argument unpacking
kwargs: DescribeAccountLimitsInputRequestTypeDef = { # (1)
"Marker": ...,
}
parent.describe_account_limits(**kwargs)
describe_instance_health#
Describes the state of the specified instances with respect to the specified load balancer.
Type annotations and code completion for boto3.client("elb").describe_instance_health
method.
boto3 documentation
# describe_instance_health method definition
def describe_instance_health(
self,
*,
LoadBalancerName: str,
Instances: Sequence[InstanceTypeDef] = ..., # (1)
) -> DescribeEndPointStateOutputTypeDef: # (2)
...
# describe_instance_health method usage example with argument unpacking
kwargs: DescribeEndPointStateInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
}
parent.describe_instance_health(**kwargs)
describe_load_balancer_attributes#
Describes the attributes for the specified load balancer.
Type annotations and code completion for boto3.client("elb").describe_load_balancer_attributes
method.
boto3 documentation
# describe_load_balancer_attributes method definition
def describe_load_balancer_attributes(
self,
*,
LoadBalancerName: str,
) -> DescribeLoadBalancerAttributesOutputTypeDef: # (1)
...
# describe_load_balancer_attributes method usage example with argument unpacking
kwargs: DescribeLoadBalancerAttributesInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
}
parent.describe_load_balancer_attributes(**kwargs)
describe_load_balancer_policies#
Describes the specified policies.
Type annotations and code completion for boto3.client("elb").describe_load_balancer_policies
method.
boto3 documentation
# describe_load_balancer_policies method definition
def describe_load_balancer_policies(
self,
*,
LoadBalancerName: str = ...,
PolicyNames: Sequence[str] = ...,
) -> DescribeLoadBalancerPoliciesOutputTypeDef: # (1)
...
# describe_load_balancer_policies method usage example with argument unpacking
kwargs: DescribeLoadBalancerPoliciesInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
}
parent.describe_load_balancer_policies(**kwargs)
describe_load_balancer_policy_types#
Describes the specified load balancer policy types or all load balancer policy types.
Type annotations and code completion for boto3.client("elb").describe_load_balancer_policy_types
method.
boto3 documentation
# describe_load_balancer_policy_types method definition
def describe_load_balancer_policy_types(
self,
*,
PolicyTypeNames: Sequence[str] = ...,
) -> DescribeLoadBalancerPolicyTypesOutputTypeDef: # (1)
...
# describe_load_balancer_policy_types method usage example with argument unpacking
kwargs: DescribeLoadBalancerPolicyTypesInputRequestTypeDef = { # (1)
"PolicyTypeNames": ...,
}
parent.describe_load_balancer_policy_types(**kwargs)
describe_load_balancers#
Describes the specified the load balancers.
Type annotations and code completion for boto3.client("elb").describe_load_balancers
method.
boto3 documentation
# describe_load_balancers method definition
def describe_load_balancers(
self,
*,
LoadBalancerNames: Sequence[str] = ...,
Marker: str = ...,
PageSize: int = ...,
) -> DescribeAccessPointsOutputTypeDef: # (1)
...
# describe_load_balancers method usage example with argument unpacking
kwargs: DescribeAccessPointsInputRequestTypeDef = { # (1)
"LoadBalancerNames": ...,
}
parent.describe_load_balancers(**kwargs)
describe_tags#
Describes the tags associated with the specified load balancers.
Type annotations and code completion for boto3.client("elb").describe_tags
method.
boto3 documentation
# describe_tags method definition
def describe_tags(
self,
*,
LoadBalancerNames: Sequence[str],
) -> DescribeTagsOutputTypeDef: # (1)
...
# describe_tags method usage example with argument unpacking
kwargs: DescribeTagsInputRequestTypeDef = { # (1)
"LoadBalancerNames": ...,
}
parent.describe_tags(**kwargs)
detach_load_balancer_from_subnets#
Removes the specified subnets from the set of configured subnets for the load balancer.
Type annotations and code completion for boto3.client("elb").detach_load_balancer_from_subnets
method.
boto3 documentation
# detach_load_balancer_from_subnets method definition
def detach_load_balancer_from_subnets(
self,
*,
LoadBalancerName: str,
Subnets: Sequence[str],
) -> DetachLoadBalancerFromSubnetsOutputTypeDef: # (1)
...
# detach_load_balancer_from_subnets method usage example with argument unpacking
kwargs: DetachLoadBalancerFromSubnetsInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Subnets": ...,
}
parent.detach_load_balancer_from_subnets(**kwargs)
disable_availability_zones_for_load_balancer#
Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.
Type annotations and code completion for boto3.client("elb").disable_availability_zones_for_load_balancer
method.
boto3 documentation
# disable_availability_zones_for_load_balancer method definition
def disable_availability_zones_for_load_balancer(
self,
*,
LoadBalancerName: str,
AvailabilityZones: Sequence[str],
) -> RemoveAvailabilityZonesOutputTypeDef: # (1)
...
# disable_availability_zones_for_load_balancer method usage example with argument unpacking
kwargs: RemoveAvailabilityZonesInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"AvailabilityZones": ...,
}
parent.disable_availability_zones_for_load_balancer(**kwargs)
enable_availability_zones_for_load_balancer#
Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.
Type annotations and code completion for boto3.client("elb").enable_availability_zones_for_load_balancer
method.
boto3 documentation
# enable_availability_zones_for_load_balancer method definition
def enable_availability_zones_for_load_balancer(
self,
*,
LoadBalancerName: str,
AvailabilityZones: Sequence[str],
) -> AddAvailabilityZonesOutputTypeDef: # (1)
...
# enable_availability_zones_for_load_balancer method usage example with argument unpacking
kwargs: AddAvailabilityZonesInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"AvailabilityZones": ...,
}
parent.enable_availability_zones_for_load_balancer(**kwargs)
modify_load_balancer_attributes#
Modifies the attributes of the specified load balancer.
Type annotations and code completion for boto3.client("elb").modify_load_balancer_attributes
method.
boto3 documentation
# modify_load_balancer_attributes method definition
def modify_load_balancer_attributes(
self,
*,
LoadBalancerName: str,
LoadBalancerAttributes: LoadBalancerAttributesTypeDef, # (1)
) -> ModifyLoadBalancerAttributesOutputTypeDef: # (2)
...
# modify_load_balancer_attributes method usage example with argument unpacking
kwargs: ModifyLoadBalancerAttributesInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"LoadBalancerAttributes": ...,
}
parent.modify_load_balancer_attributes(**kwargs)
register_instances_with_load_balancer#
Adds the specified instances to the specified load balancer.
Type annotations and code completion for boto3.client("elb").register_instances_with_load_balancer
method.
boto3 documentation
# register_instances_with_load_balancer method definition
def register_instances_with_load_balancer(
self,
*,
LoadBalancerName: str,
Instances: Sequence[InstanceTypeDef], # (1)
) -> RegisterEndPointsOutputTypeDef: # (2)
...
# register_instances_with_load_balancer method usage example with argument unpacking
kwargs: RegisterEndPointsInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"Instances": ...,
}
parent.register_instances_with_load_balancer(**kwargs)
remove_tags#
Removes one or more tags from the specified load balancer.
Type annotations and code completion for boto3.client("elb").remove_tags
method.
boto3 documentation
# remove_tags method definition
def remove_tags(
self,
*,
LoadBalancerNames: Sequence[str],
Tags: Sequence[TagKeyOnlyTypeDef], # (1)
) -> dict[str, Any]:
...
# remove_tags method usage example with argument unpacking
kwargs: RemoveTagsInputRequestTypeDef = { # (1)
"LoadBalancerNames": ...,
"Tags": ...,
}
parent.remove_tags(**kwargs)
set_load_balancer_listener_ssl_certificate#
Sets the certificate that terminates the specified listener's SSL connections.
Type annotations and code completion for boto3.client("elb").set_load_balancer_listener_ssl_certificate
method.
boto3 documentation
# set_load_balancer_listener_ssl_certificate method definition
def set_load_balancer_listener_ssl_certificate(
self,
*,
LoadBalancerName: str,
LoadBalancerPort: int,
SSLCertificateId: str,
) -> dict[str, Any]:
...
# set_load_balancer_listener_ssl_certificate method usage example with argument unpacking
kwargs: SetLoadBalancerListenerSSLCertificateInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"LoadBalancerPort": ...,
"SSLCertificateId": ...,
}
parent.set_load_balancer_listener_ssl_certificate(**kwargs)
set_load_balancer_policies_for_backend_server#
Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies.
Type annotations and code completion for boto3.client("elb").set_load_balancer_policies_for_backend_server
method.
boto3 documentation
# set_load_balancer_policies_for_backend_server method definition
def set_load_balancer_policies_for_backend_server(
self,
*,
LoadBalancerName: str,
InstancePort: int,
PolicyNames: Sequence[str],
) -> dict[str, Any]:
...
# set_load_balancer_policies_for_backend_server method usage example with argument unpacking
kwargs: SetLoadBalancerPoliciesForBackendServerInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"InstancePort": ...,
"PolicyNames": ...,
}
parent.set_load_balancer_policies_for_backend_server(**kwargs)
set_load_balancer_policies_of_listener#
Replaces the current set of policies for the specified load balancer port with the specified set of policies.
Type annotations and code completion for boto3.client("elb").set_load_balancer_policies_of_listener
method.
boto3 documentation
# set_load_balancer_policies_of_listener method definition
def set_load_balancer_policies_of_listener(
self,
*,
LoadBalancerName: str,
LoadBalancerPort: int,
PolicyNames: Sequence[str],
) -> dict[str, Any]:
...
# set_load_balancer_policies_of_listener method usage example with argument unpacking
kwargs: SetLoadBalancerPoliciesOfListenerInputRequestTypeDef = { # (1)
"LoadBalancerName": ...,
"LoadBalancerPort": ...,
"PolicyNames": ...,
}
parent.set_load_balancer_policies_of_listener(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("elb").get_paginator
method with overloads.
client.get_paginator("describe_account_limits")
-> DescribeAccountLimitsPaginatorclient.get_paginator("describe_load_balancers")
-> DescribeLoadBalancersPaginator
get_waiter#
Type annotations and code completion for boto3.client("elb").get_waiter
method with overloads.
client.get_waiter("any_instance_in_service")
-> AnyInstanceInServiceWaiterclient.get_waiter("instance_deregistered")
-> InstanceDeregisteredWaiterclient.get_waiter("instance_in_service")
-> InstanceInServiceWaiter