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#
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)
can_paginate#
Check if an operation can be paginated.
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:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("elb").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
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)