INetworkLoadBalancer¶
-
class
aws_cdk.aws_elasticloadbalancingv2.
INetworkLoadBalancer
(*args, **kwds)¶ Bases:
aws_cdk.aws_elasticloadbalancingv2.ILoadBalancerV2
,aws_cdk.aws_ec2.IVpcEndpointServiceLoadBalancer
,typing_extensions.Protocol
A network load balancer.
Methods
-
add_listener
(id, *, port, certificates=None, default_action=None, default_target_groups=None, protocol=None, ssl_policy=None)¶ Add a listener to this load balancer.
- Parameters
id (
str
) –port (
Union
[int
,float
]) – The port on which the listener listens for requests.certificates (
Optional
[Sequence
[IListenerCertificate
]]) – Certificate list of ACM cert ARNs. Default: - No certificates.default_action (
Optional
[NetworkListenerAction
]) – Default action to take for requests to this listener. This allows full control of the default Action of the load balancer, including weighted forwarding. See theNetworkListenerAction
class for all options. Cannot be specified together withdefaultTargetGroups
. Default: - None.default_target_groups (
Optional
[Sequence
[INetworkTargetGroup
]]) – Default target groups to load balance to. All target groups will be load balanced to with equal weight and without stickiness. For a more complex configuration than that, use eitherdefaultAction
oraddAction()
. Cannot be specified together withdefaultAction
. Default: - None.protocol (
Optional
[Protocol
]) – Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP. Default: - TLS if certificates are provided. TCP otherwise.ssl_policy (
Optional
[SslPolicy
]) – SSL Policy. Default: - Current predefined security policy.
- Return type
- Returns
The newly created listener
Attributes
-
env
¶ The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Return type
-
load_balancer_arn
¶ The ARN of the load balancer that hosts the VPC Endpoint Service.
- Return type
str
-
load_balancer_canonical_hosted_zone_id
¶ The canonical hosted zone ID of this load balancer.
- Attribute
true
Example:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 Z2P70J7EXAMPLE
- Return type
str
-
load_balancer_dns_name
¶ The DNS name of this load balancer.
- Attribute
true
Example:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 my - load - balancer - 424835706.us - west - 2.elb.amazonaws.com
- Return type
str
-
node
¶ The construct tree node for this construct.
- Return type
-