ApplicationLoadBalancer

class aws_cdk.aws_elasticloadbalancingv2.ApplicationLoadBalancer(scope, id, *, http2_enabled=None, idle_timeout=None, ip_address_type=None, security_group=None, vpc, deletion_protection=None, internet_facing=None, load_balancer_name=None, vpc_subnets=None)

Bases: aws_cdk.aws_elasticloadbalancingv2.BaseLoadBalancer

Define an Application Load Balancer.

resource: :resource:: AWS::ElasticLoadBalancingV2::LoadBalancer

__init__(scope, id, *, http2_enabled=None, idle_timeout=None, ip_address_type=None, security_group=None, vpc, deletion_protection=None, internet_facing=None, load_balancer_name=None, vpc_subnets=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • http2_enabled (Optional[bool]) – Indicates whether HTTP/2 is enabled. Default: true

  • idle_timeout (Optional[Duration]) – The load balancer idle timeout, in seconds. Default: 60

  • ip_address_type (Optional[IpAddressType]) – The type of IP addresses to use. Only applies to application load balancers. Default: IpAddressType.Ipv4

  • security_group (Optional[ISecurityGroup]) – Security group to associate with this load balancer. Default: A security group is created

  • vpc (IVpc) – The VPC network to place the load balancer in.

  • deletion_protection (Optional[bool]) – Indicates whether deletion protection is enabled. Default: false

  • internet_facing (Optional[bool]) – Whether the load balancer has an internet-routable address. Default: false

  • load_balancer_name (Optional[str]) – Name of the load balancer. Default: - Automatically generated name.

  • vpc_subnets (Optional[SubnetSelection]) – Where in the VPC to place the load balancer. Default: - Public subnets if internetFacing, otherwise private subnets.

Return type

None

Methods

add_listener(id, *, certificate_arns=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) –

  • props

  • certificate_arns (Optional[List[str]]) – The certificates to use on this listener. 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

log_access_logs(bucket, prefix=None)

Enable access logging for this load balancer.

Parameters
  • bucket (IBucket) –

  • prefix (Optional[str]) –

Return type

None

metric(metric_name, *, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

Return the given named metric for this Application Load Balancer.

Parameters
  • metric_name (str) –

  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Average over 5 minutes

Return type

Metric

metric_active_connection_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_client_tls_negotiation_error_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of TLS connections initiated by the client that did not establish a session with the load balancer.

Possible causes include a mismatch of ciphers or protocols.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_consumed_lc_us(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of load balancer capacity units (LCU) used by your load balancer.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_elb_auth_error(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of user authentications that could not be completed.

Because an authenticate action was misconfigured, the load balancer couldn’t establish a connection with the IdP, or the load balancer couldn’t complete the authentication flow due to an internal error.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_elb_auth_failure(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of user authentications that could not be completed because the IdP denied access to the user or an authorization code was used more than once.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_elb_auth_latency(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The time elapsed, in milliseconds, to query the IdP for the ID token and user info.

If one or more of these operations fail, this is the time to failure.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Average over 5 minutes

Return type

Metric

metric_elb_auth_success(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of authenticate actions that were successful.

This metric is incremented at the end of the authentication workflow, after the load balancer has retrieved the user claims from the IdP.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_http_code_elb(code, *, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer.

This does not include any response codes generated by the targets.

Parameters
  • code (HttpCodeElb) –

  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_http_code_target(code, *, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer.

This does not include any response codes generated by the load balancer.

Parameters
  • code (HttpCodeTarget) –

  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_http_fixed_response_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of fixed-response actions that were successful.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_http_redirect_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of redirect actions that were successful.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_http_redirect_url_limit_exceeded_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of redirect actions that couldn’t be completed because the URL in the response location header is larger than 8K.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_ipv6_processed_bytes(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The total number of bytes processed by the load balancer over IPv6.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_ipv6_request_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of IPv6 requests received by the load balancer.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_new_connection_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_processed_bytes(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The total number of bytes processed by the load balancer over IPv4 and IPv6.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_rejected_connection_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of connections that were rejected because the load balancer had reached its maximum number of connections.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_request_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of requests processed over IPv4 and IPv6.

This count includes only the requests with a response generated by a target of the load balancer.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_rule_evaluations(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of rules processed by the load balancer given a request rate averaged over an hour.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_target_connection_error_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of connections that were not successfully established between the load balancer and target.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

metric_target_response_time(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Average over 5 minutes

Return type

Metric

metric_target_tls_negotiation_error_count(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

The number of TLS connections initiated by the load balancer that did not establish a session with the target.

Possible causes include a mismatch of ciphers or protocols.

Parameters
  • props

  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

default :default: Sum over 5 minutes

Return type

Metric

remove_attribute(key)

Remove an attribute from the load balancer.

Parameters

key (str) –

Return type

None

set_attribute(key, value=None)

Set a non-standard attribute on the load balancer.

Parameters
  • key (str) –

  • value (Optional[str]) –

see :see: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

connections
Return type

Connections

load_balancer_arn

The ARN of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 arn:aws:elasticloadbalancing:us-west-2123456789012loadbalancer / app / my - internal - load - balancer / 50dc6c495c0c9188

Return type

str

load_balancer_canonical_hosted_zone_id

The canonical hosted zone ID of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. 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 may have issues. See https://github.com/aws/jsii/issues/826 my - load - balancer - 424835706.us - west - 2.elb.amazonaws.com

Return type

str

load_balancer_full_name

The full name of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 app / my - load - balancer / 50dc6c495c0c9188

Return type

str

load_balancer_name

The name of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 my - load - balancer

Return type

str

load_balancer_security_groups

attribute: :attribute:: true

Return type

List[str]

node

Construct tree node which offers APIs for interacting with the construct 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 the Load Balancer was imported, the VPC is not available.

Return type

Optional[IVpc]

Static Methods

classmethod from_application_load_balancer_attributes(scope, id, *, load_balancer_arn, security_group_id, load_balancer_canonical_hosted_zone_id=None, load_balancer_dns_name=None, security_group_allows_all_outbound=None)

Import an existing Application Load Balancer.

Parameters
  • scope (Construct) –

  • id (str) –

  • attrs

  • load_balancer_arn (str) – ARN of the load balancer.

  • security_group_id (str) – ID of the load balancer’s security group.

  • load_balancer_canonical_hosted_zone_id (Optional[str]) – The canonical hosted zone ID of this load balancer. Default: - When not provided, LB cannot be used as Route53 Alias target.

  • load_balancer_dns_name (Optional[str]) – The DNS name of this load balancer. Default: - When not provided, LB cannot be used as Route53 Alias target.

  • security_group_allows_all_outbound (Optional[bool]) – Whether the security group allows all outbound traffic or not. Unless set to false, no egress rules will be added to the security group. Default: true

Return type

IApplicationLoadBalancer

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool