IApplicationLoadBalancer

class aws_cdk.aws_elasticloadbalancingv2.IApplicationLoadBalancer(*args, **kwargs)

Bases: aws_cdk.aws_elasticloadbalancingv2.ILoadBalancerV2, aws_cdk.aws_ec2.IConnectable, typing_extensions.Protocol

An application load balancer.

__init__(*args, **kwargs)

Methods

add_listener(id, *, certificate_arns=None, certificates=None, default_target_groups=None, open=None, port=None, protocol=None, ssl_policy=None)

Add a new listener to this load balancer.

Parameters
  • id (str) –

  • certificate_arns (Optional[List[str]]) – The certificates to use on this listener. Default: - No certificates.

  • certificates (Optional[List[IListenerCertificate]]) – Certificate list of ACM cert ARNs. Default: - No certificates.

  • default_target_groups (Optional[List[IApplicationTargetGroup]]) – Default target groups to load balance to. Default: - None.

  • open (Optional[bool]) – Allow anyone to connect to this listener. If this is specified, the listener will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet. If you want to be more selective about who can access this load balancer, set this to false and use the listener’s connections object to selectively grant access to the listener. Default: true

  • port (Union[int, float, None]) – The port on which the listener listens for requests. Default: - Determined from protocol if known.

  • protocol (Optional[ApplicationProtocol]) – The protocol to use. Default: - Determined from port if known.

  • ssl_policy (Optional[SslPolicy]) – The security policy that defines which ciphers and protocols are supported. Default: - The current predefined security policy.

Return type

ApplicationListener

Attributes

connections
Return type

Connections

load_balancer_arn

The ARN of this load balancer.

Return type

str

load_balancer_canonical_hosted_zone_id

The canonical hosted zone ID of this load balancer.

attribute: :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: :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 node in the tree.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

vpc

The VPC this load balancer has been created in (if available).

If this interface is the result of an import call to fromApplicationLoadBalancerAttributes, the vpc attribute will be undefined unless specified in the optional properties of that method.

Return type

Optional[IVpc]