NetworkLoadBalancer
- class aws_cdk.aws_elasticloadbalancingv2.NetworkLoadBalancer(scope, id, *, cross_zone_enabled=None, vpc, deletion_protection=None, internet_facing=None, load_balancer_name=None, vpc_subnets=None)
Bases:
BaseLoadBalancer
Define a new network load balancer.
- Resource:
AWS::ElasticLoadBalancingV2::LoadBalancer
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_apigatewayv2_integrations import HttpNlbIntegration vpc = ec2.Vpc(self, "VPC") lb = elbv2.NetworkLoadBalancer(self, "lb", vpc=vpc) listener = lb.add_listener("listener", port=80) listener.add_targets("target", port=80 ) http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi", default_integration=HttpNlbIntegration("DefaultIntegration", listener) )
- Parameters:
scope (
Construct
)id (
str
)cross_zone_enabled (
Optional
[bool
]) – Indicates whether cross-zone load balancing is enabled. Default: falsevpc (
IVpc
) – The VPC network to place the load balancer in.deletion_protection (
Optional
[bool
]) – Indicates whether deletion protection is enabled. Default: falseinternet_facing (
Optional
[bool
]) – Whether the load balancer has an internet-routable address. Default: falseload_balancer_name (
Optional
[str
]) – Name of the load balancer. Default: - Automatically generated name.vpc_subnets (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – Which subnets place the load balancer in. Default: - the Vpc default strategy.
Methods
- add_listener(id, *, port, alpn_policy=None, 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.alpn_policy (
Optional
[AlpnPolicy
]) – Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages. ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2. Can only be specified together with Protocol TLS. Default: - Nonecertificates (
Optional
[Sequence
[IListenerCertificate
]]) – Certificate list of ACM cert ARNs. You must provide exactly one certificate if the listener protocol is HTTPS or TLS. 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
- apply_removal_policy(policy)
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Parameters:
policy (
RemovalPolicy
)- Return type:
None
- log_access_logs(bucket, prefix=None)
Enable access logging for this load balancer.
A region must be specified on the stack containing the load balancer; you cannot enable logging on environment-agnostic stacks. See https://docs.aws.amazon.com/cdk/latest/guide/environments.html
- Parameters:
bucket (
IBucket
)prefix (
Optional
[str
])
- Return type:
None
- metric(metric_name, *, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
Return the given named metric for this Network Load Balancer.
- Parameters:
metric_name (
str
)account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) – Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No labelperiod (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Average over 5 minutes
- Return type:
- metric_active_flow_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of concurrent TCP flows (or connections) from clients to targets.
This metric includes connections in the SYN_SENT and ESTABLISHED states. TCP connections are not terminated at the load balancer, so a client opening a TCP connection to a target counts as a single flow.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Average over 5 minutes
- Return type:
- metric_consumed_lc_us(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The number of load balancer capacity units (LCU) used by your load balancer.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_healthy_host_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
(deprecated) The number of targets that are considered healthy.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Average over 5 minutes
- Deprecated:
use
NetworkTargetGroup.metricHealthyHostCount
instead- Stability:
deprecated
- Return type:
- metric_new_flow_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of new TCP flows (or connections) established from clients to targets in the time period.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_processed_bytes(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of bytes processed by the load balancer, including TCP/IP headers.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_tcp_client_reset_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of reset (RST) packets sent from a client to a target.
These resets are generated by the client and forwarded by the load balancer.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_tcp_elb_reset_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of reset (RST) packets generated by the load balancer.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_tcp_target_reset_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
The total number of reset (RST) packets sent from a target to a client.
These resets are generated by the target and forwarded by the load balancer.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Sum over 5 minutes
- Return type:
- metric_un_healthy_host_count(*, account=None, color=None, dimensions=None, dimensions_map=None, label=None, period=None, region=None, statistic=None, unit=None)
(deprecated) The number of targets that are considered unhealthy.
- Parameters:
account (
Optional
[str
]) – Account which this metric comes from. Default: - Deployment account.color (
Optional
[str
]) – The hex color code, prefixed with ‘#’ (e.g. ‘#00ff00’), to use when this metric is rendered on a graph. TheColor
class has a set of standard colors that can be used here. Default: - Automatic colordimensions (
Optional
[Mapping
[str
,Any
]]) – (deprecated) Dimensions of the metric. Default: - No dimensions.dimensions_map (
Optional
[Mapping
[str
,str
]]) – Dimensions of the metric. Default: - No dimensions.label (
Optional
[str
]) –Label for this metric when added to a Graph in a Dashboard. You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph’s legend. Default: - No label
period (
Optional
[Duration
]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)region (
Optional
[str
]) – Region which this metric comes from. Default: - Deployment region.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: Averageunit (
Optional
[Unit
]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
- Default:
Average over 5 minutes
- Deprecated:
use
NetworkTargetGroup.metricUnHealthyHostCount
instead- Stability:
deprecated
- Return type:
- 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:
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
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.
- load_balancer_arn
The ARN of this load balancer.
Example value:
arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188
- Attribute:
true
- load_balancer_canonical_hosted_zone_id
The canonical hosted zone ID of this load balancer.
Example value:
Z2P70J7EXAMPLE
- Attribute:
true
- load_balancer_dns_name
The DNS name of this load balancer.
Example value:
my-load-balancer-424835706.us-west-2.elb.amazonaws.com
- Attribute:
true
- load_balancer_full_name
The full name of this load balancer.
Example value:
app/my-load-balancer/50dc6c495c0c9188
- Attribute:
true
- load_balancer_name
The name of this load balancer.
Example value:
my-load-balancer
- Attribute:
true
- load_balancer_security_groups
true
- Type:
attribute
- node
The construct tree node associated with this construct.
- stack
The stack in which this resource is defined.
- vpc
The VPC this load balancer has been created in.
This property is always defined (not
null
orundefined
) for sub-classes ofBaseLoadBalancer
.
Static Methods
- classmethod from_lookup(scope, id, *, load_balancer_arn=None, load_balancer_tags=None)
Looks up the network load balancer.
- Parameters:
scope (
Construct
)id (
str
)load_balancer_arn (
Optional
[str
]) – Find by load balancer’s ARN. Default: - does not search by load balancer arnload_balancer_tags (
Optional
[Mapping
[str
,str
]]) – Match load balancer tags. Default: - does not match load balancers by tags
- Return type:
- classmethod from_network_load_balancer_attributes(scope, id, *, load_balancer_arn, load_balancer_canonical_hosted_zone_id=None, load_balancer_dns_name=None, vpc=None)
- Parameters:
scope (
Construct
)id (
str
)load_balancer_arn (
str
) – ARN of the load balancer.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.vpc (
Optional
[IVpc
]) – The VPC to associate with the load balancer. Default: - When not provided, listeners cannot be created on imported load balancers.
- Return type:
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Parameters:
x (
Any
)- Return type:
bool
- classmethod is_resource(construct)
Check whether the given construct is a Resource.
- Parameters:
construct (
IConstruct
)- Return type:
bool