ElasticLoadBalancingv2Client#
Index > ElasticLoadBalancingv2 > ElasticLoadBalancingv2Client
Auto-generated documentation for ElasticLoadBalancingv2 type annotations stubs module mypy-boto3-elbv2.
ElasticLoadBalancingv2Client#
Type annotations and code completion for boto3.client("elbv2")
.
boto3 documentation
# ElasticLoadBalancingv2Client usage example
from boto3.session import Session
from mypy_boto3_elbv2.client import ElasticLoadBalancingv2Client
def get_elbv2_client() -> ElasticLoadBalancingv2Client:
return Session().client("elbv2")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("elbv2").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("elbv2")
try:
do_something(client)
except (
client.exceptions.ALPNPolicyNotSupportedException,
client.exceptions.AllocationIdNotFoundException,
client.exceptions.AvailabilityZoneNotSupportedException,
client.exceptions.CaCertificatesBundleNotFoundException,
client.exceptions.CertificateNotFoundException,
client.exceptions.ClientError,
client.exceptions.DuplicateListenerException,
client.exceptions.DuplicateLoadBalancerNameException,
client.exceptions.DuplicateTagKeysException,
client.exceptions.DuplicateTargetGroupNameException,
client.exceptions.DuplicateTrustStoreNameException,
client.exceptions.HealthUnavailableException,
client.exceptions.IncompatibleProtocolsException,
client.exceptions.InvalidCaCertificatesBundleException,
client.exceptions.InvalidConfigurationRequestException,
client.exceptions.InvalidLoadBalancerActionException,
client.exceptions.InvalidRevocationContentException,
client.exceptions.InvalidSchemeException,
client.exceptions.InvalidSecurityGroupException,
client.exceptions.InvalidSubnetException,
client.exceptions.InvalidTargetException,
client.exceptions.ListenerNotFoundException,
client.exceptions.LoadBalancerNotFoundException,
client.exceptions.OperationNotPermittedException,
client.exceptions.PriorityInUseException,
client.exceptions.ResourceInUseException,
client.exceptions.RevocationContentNotFoundException,
client.exceptions.RevocationIdNotFoundException,
client.exceptions.RuleNotFoundException,
client.exceptions.SSLPolicyNotFoundException,
client.exceptions.SubnetNotFoundException,
client.exceptions.TargetGroupAssociationLimitException,
client.exceptions.TargetGroupNotFoundException,
client.exceptions.TooManyActionsException,
client.exceptions.TooManyCertificatesException,
client.exceptions.TooManyListenersException,
client.exceptions.TooManyLoadBalancersException,
client.exceptions.TooManyRegistrationsForTargetIdException,
client.exceptions.TooManyRulesException,
client.exceptions.TooManyTagsException,
client.exceptions.TooManyTargetGroupsException,
client.exceptions.TooManyTargetsException,
client.exceptions.TooManyTrustStoreRevocationEntriesException,
client.exceptions.TooManyTrustStoresException,
client.exceptions.TooManyUniqueTargetGroupsPerLoadBalancerException,
client.exceptions.TrustStoreInUseException,
client.exceptions.TrustStoreNotFoundException,
client.exceptions.TrustStoreNotReadyException,
client.exceptions.UnsupportedProtocolException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_elbv2.client import Exceptions
def handle_error(exc: Exceptions.ALPNPolicyNotSupportedException) -> None:
...
Methods#
add_listener_certificates#
Adds the specified SSL server certificate to the certificate list for the specified HTTPS or TLS listener.
Type annotations and code completion for boto3.client("elbv2").add_listener_certificates
method.
boto3 documentation
# add_listener_certificates method definition
def add_listener_certificates(
self,
*,
ListenerArn: str,
Certificates: Sequence[CertificateTypeDef], # (1)
) -> AddListenerCertificatesOutputTypeDef: # (2)
...
# add_listener_certificates method usage example with argument unpacking
kwargs: AddListenerCertificatesInputRequestTypeDef = { # (1)
"ListenerArn": ...,
"Certificates": ...,
}
parent.add_listener_certificates(**kwargs)
add_tags#
Adds the specified tags to the specified Elastic Load Balancing resource.
Type annotations and code completion for boto3.client("elbv2").add_tags
method.
boto3 documentation
# add_tags method definition
def add_tags(
self,
*,
ResourceArns: Sequence[str],
Tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
# add_tags method usage example with argument unpacking
kwargs: AddTagsInputRequestTypeDef = { # (1)
"ResourceArns": ...,
"Tags": ...,
}
parent.add_tags(**kwargs)
add_trust_store_revocations#
Adds the specified revocation file to the specified trust store.
Type annotations and code completion for boto3.client("elbv2").add_trust_store_revocations
method.
boto3 documentation
# add_trust_store_revocations method definition
def add_trust_store_revocations(
self,
*,
TrustStoreArn: str,
RevocationContents: Sequence[RevocationContentTypeDef] = ..., # (1)
) -> AddTrustStoreRevocationsOutputTypeDef: # (2)
...
# add_trust_store_revocations method usage example with argument unpacking
kwargs: AddTrustStoreRevocationsInputRequestTypeDef = { # (1)
"TrustStoreArn": ...,
}
parent.add_trust_store_revocations(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("elbv2").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("elbv2").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_listener#
Creates a listener for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
Type annotations and code completion for boto3.client("elbv2").create_listener
method.
boto3 documentation
# create_listener method definition
def create_listener(
self,
*,
LoadBalancerArn: str,
DefaultActions: Sequence[ActionTypeDef], # (1)
Protocol: ProtocolEnumType = ..., # (2)
Port: int = ...,
SslPolicy: str = ...,
Certificates: Sequence[CertificateTypeDef] = ..., # (3)
AlpnPolicy: Sequence[str] = ...,
Tags: Sequence[TagTypeDef] = ..., # (4)
MutualAuthentication: MutualAuthenticationAttributesTypeDef = ..., # (5)
) -> CreateListenerOutputTypeDef: # (6)
...
- See ActionTypeDef
- See ProtocolEnumType
- See CertificateTypeDef
- See TagTypeDef
- See MutualAuthenticationAttributesTypeDef
- See CreateListenerOutputTypeDef
# create_listener method usage example with argument unpacking
kwargs: CreateListenerInputRequestTypeDef = { # (1)
"LoadBalancerArn": ...,
"DefaultActions": ...,
}
parent.create_listener(**kwargs)
create_load_balancer#
Creates an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
Type annotations and code completion for boto3.client("elbv2").create_load_balancer
method.
boto3 documentation
# create_load_balancer method definition
def create_load_balancer(
self,
*,
Name: str,
Subnets: Sequence[str] = ...,
SubnetMappings: Sequence[SubnetMappingTypeDef] = ..., # (1)
SecurityGroups: Sequence[str] = ...,
Scheme: LoadBalancerSchemeEnumType = ..., # (2)
Tags: Sequence[TagTypeDef] = ..., # (3)
Type: LoadBalancerTypeEnumType = ..., # (4)
IpAddressType: IpAddressTypeType = ..., # (5)
CustomerOwnedIpv4Pool: str = ...,
) -> CreateLoadBalancerOutputTypeDef: # (6)
...
- See SubnetMappingTypeDef
- See LoadBalancerSchemeEnumType
- See TagTypeDef
- See LoadBalancerTypeEnumType
- See IpAddressTypeType
- See CreateLoadBalancerOutputTypeDef
# create_load_balancer method usage example with argument unpacking
kwargs: CreateLoadBalancerInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_load_balancer(**kwargs)
create_rule#
Creates a rule for the specified listener.
Type annotations and code completion for boto3.client("elbv2").create_rule
method.
boto3 documentation
# create_rule method definition
def create_rule(
self,
*,
ListenerArn: str,
Conditions: Sequence[RuleConditionTypeDef], # (1)
Priority: int,
Actions: Sequence[ActionTypeDef], # (2)
Tags: Sequence[TagTypeDef] = ..., # (3)
) -> CreateRuleOutputTypeDef: # (4)
...
- See RuleConditionTypeDef
- See ActionTypeDef
- See TagTypeDef
- See CreateRuleOutputTypeDef
# create_rule method usage example with argument unpacking
kwargs: CreateRuleInputRequestTypeDef = { # (1)
"ListenerArn": ...,
"Conditions": ...,
"Priority": ...,
"Actions": ...,
}
parent.create_rule(**kwargs)
create_target_group#
Creates a target group.
Type annotations and code completion for boto3.client("elbv2").create_target_group
method.
boto3 documentation
# create_target_group method definition
def create_target_group(
self,
*,
Name: str,
Protocol: ProtocolEnumType = ..., # (1)
ProtocolVersion: str = ...,
Port: int = ...,
VpcId: str = ...,
HealthCheckProtocol: ProtocolEnumType = ..., # (1)
HealthCheckPort: str = ...,
HealthCheckEnabled: bool = ...,
HealthCheckPath: str = ...,
HealthCheckIntervalSeconds: int = ...,
HealthCheckTimeoutSeconds: int = ...,
HealthyThresholdCount: int = ...,
UnhealthyThresholdCount: int = ...,
Matcher: MatcherTypeDef = ..., # (3)
TargetType: TargetTypeEnumType = ..., # (4)
Tags: Sequence[TagTypeDef] = ..., # (5)
IpAddressType: TargetGroupIpAddressTypeEnumType = ..., # (6)
) -> CreateTargetGroupOutputTypeDef: # (7)
...
- See ProtocolEnumType
- See ProtocolEnumType
- See MatcherTypeDef
- See TargetTypeEnumType
- See TagTypeDef
- See TargetGroupIpAddressTypeEnumType
- See CreateTargetGroupOutputTypeDef
# create_target_group method usage example with argument unpacking
kwargs: CreateTargetGroupInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_target_group(**kwargs)
create_trust_store#
Creates a trust store.
Type annotations and code completion for boto3.client("elbv2").create_trust_store
method.
boto3 documentation
# create_trust_store method definition
def create_trust_store(
self,
*,
Name: str,
CaCertificatesBundleS3Bucket: str,
CaCertificatesBundleS3Key: str,
CaCertificatesBundleS3ObjectVersion: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateTrustStoreOutputTypeDef: # (2)
...
# create_trust_store method usage example with argument unpacking
kwargs: CreateTrustStoreInputRequestTypeDef = { # (1)
"Name": ...,
"CaCertificatesBundleS3Bucket": ...,
"CaCertificatesBundleS3Key": ...,
}
parent.create_trust_store(**kwargs)
delete_listener#
Deletes the specified listener.
Type annotations and code completion for boto3.client("elbv2").delete_listener
method.
boto3 documentation
# delete_listener method definition
def delete_listener(
self,
*,
ListenerArn: str,
) -> Dict[str, Any]:
...
# delete_listener method usage example with argument unpacking
kwargs: DeleteListenerInputRequestTypeDef = { # (1)
"ListenerArn": ...,
}
parent.delete_listener(**kwargs)
delete_load_balancer#
Deletes the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
Type annotations and code completion for boto3.client("elbv2").delete_load_balancer
method.
boto3 documentation
# delete_load_balancer method definition
def delete_load_balancer(
self,
*,
LoadBalancerArn: str,
) -> Dict[str, Any]:
...
# delete_load_balancer method usage example with argument unpacking
kwargs: DeleteLoadBalancerInputRequestTypeDef = { # (1)
"LoadBalancerArn": ...,
}
parent.delete_load_balancer(**kwargs)
delete_rule#
Deletes the specified rule.
Type annotations and code completion for boto3.client("elbv2").delete_rule
method.
boto3 documentation
# delete_rule method definition
def delete_rule(
self,
*,
RuleArn: str,
) -> Dict[str, Any]:
...
# delete_rule method usage example with argument unpacking
kwargs: DeleteRuleInputRequestTypeDef = { # (1)
"RuleArn": ...,
}
parent.delete_rule(**kwargs)
delete_target_group#
Deletes the specified target group.
Type annotations and code completion for boto3.client("elbv2").delete_target_group
method.