@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:46.986Z") public class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplicationLoadBalancer
Example:
import software.amazon.awscdk.services.apigatewayv2.integrations.HttpAlbIntegration; Vpc vpc = new Vpc(this, "VPC"); ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "lb").vpc(vpc).build(); ApplicationListener listener = lb.addListener("listener", BaseApplicationListenerProps.builder().port(80).build()); listener.addTargets("target", AddApplicationTargetsProps.builder() .port(80) .build()); HttpApi httpEndpoint = HttpApi.Builder.create(this, "HttpProxyPrivateApi") .defaultIntegration(new HttpAlbIntegration("DefaultIntegration", listener)) .build();
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationLoadBalancer.Builder
A fluent builder for
ApplicationLoadBalancer . |
IApplicationLoadBalancer.Jsii$Default, IApplicationLoadBalancer.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
ApplicationLoadBalancer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
ApplicationLoadBalancer(software.amazon.jsii.JsiiObjectRef objRef) |
|
ApplicationLoadBalancer(software.constructs.Construct scope,
java.lang.String id,
ApplicationLoadBalancerProps props) |
Modifier and Type | Method and Description |
---|---|
ApplicationListener |
addListener(java.lang.String id,
BaseApplicationListenerProps props)
Add a new listener to this load balancer.
|
ApplicationListener |
addRedirect()
Add a redirection listener to this load balancer.
|
ApplicationListener |
addRedirect(ApplicationLoadBalancerRedirectConfig props)
Add a redirection listener to this load balancer.
|
void |
addSecurityGroup(ISecurityGroup securityGroup)
Add a security group to this load balancer.
|
static IApplicationLoadBalancer |
fromApplicationLoadBalancerAttributes(software.constructs.Construct scope,
java.lang.String id,
ApplicationLoadBalancerAttributes attrs)
Import an existing Application Load Balancer.
|
static IApplicationLoadBalancer |
fromLookup(software.constructs.Construct scope,
java.lang.String id,
ApplicationLoadBalancerLookupOptions options)
Look up an application load balancer.
|
Connections |
getConnections()
The network connections associated with this resource.
|
IpAddressType |
getIpAddressType()
The IP Address Type for this load balancer.
|
java.util.List<ApplicationListener> |
getListeners()
A list of listeners that have been added to the load balancer.
|
Metric |
metric(java.lang.String metricName)
Return the given named metric for this Application Load Balancer.
|
Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this Application Load Balancer.
|
Metric |
metricActiveConnectionCount()
The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
|
Metric |
metricActiveConnectionCount(MetricOptions props)
The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
|
Metric |
metricClientTlsNegotiationErrorCount()
The number of TLS connections initiated by the client that did not establish a session with the load balancer.
|
Metric |
metricClientTlsNegotiationErrorCount(MetricOptions props)
The number of TLS connections initiated by the client that did not establish a session with the load balancer.
|
Metric |
metricConsumedLCUs()
The number of load balancer capacity units (LCU) used by your load balancer.
|
Metric |
metricConsumedLCUs(MetricOptions props)
The number of load balancer capacity units (LCU) used by your load balancer.
|
Metric |
metricElbAuthError()
The number of user authentications that could not be completed.
|
Metric |
metricElbAuthError(MetricOptions props)
The number of user authentications that could not be completed.
|
Metric |
metricElbAuthFailure()
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.
|
Metric |
metricElbAuthFailure(MetricOptions props)
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.
|
Metric |
metricElbAuthLatency()
The time elapsed, in milliseconds, to query the IdP for the ID token and user info.
|
Metric |
metricElbAuthLatency(MetricOptions props)
The time elapsed, in milliseconds, to query the IdP for the ID token and user info.
|
Metric |
metricElbAuthSuccess()
The number of authenticate actions that were successful.
|
Metric |
metricElbAuthSuccess(MetricOptions props)
The number of authenticate actions that were successful.
|
Metric |
metricHttpCodeElb(HttpCodeElb code)
The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer.
|
Metric |
metricHttpCodeElb(HttpCodeElb code,
MetricOptions props)
The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer.
|
Metric |
metricHttpCodeTarget(HttpCodeTarget code)
The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer.
|
Metric |
metricHttpCodeTarget(HttpCodeTarget code,
MetricOptions props)
The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer.
|
Metric |
metricHttpFixedResponseCount()
The number of fixed-response actions that were successful.
|
Metric |
metricHttpFixedResponseCount(MetricOptions props)
The number of fixed-response actions that were successful.
|
Metric |
metricHttpRedirectCount()
The number of redirect actions that were successful.
|
Metric |
metricHttpRedirectCount(MetricOptions props)
The number of redirect actions that were successful.
|
Metric |
metricHttpRedirectUrlLimitExceededCount()
The number of redirect actions that couldn't be completed because the URL in the response location header is larger than 8K.
|
Metric |
metricHttpRedirectUrlLimitExceededCount(MetricOptions props)
The number of redirect actions that couldn't be completed because the URL in the response location header is larger than 8K.
|
Metric |
metricIpv6ProcessedBytes()
The total number of bytes processed by the load balancer over IPv6.
|
Metric |
metricIpv6ProcessedBytes(MetricOptions props)
The total number of bytes processed by the load balancer over IPv6.
|
Metric |
metricIpv6RequestCount()
The number of IPv6 requests received by the load balancer.
|
Metric |
metricIpv6RequestCount(MetricOptions props)
The number of IPv6 requests received by the load balancer.
|
Metric |
metricNewConnectionCount()
The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
|
Metric |
metricNewConnectionCount(MetricOptions props)
The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
|
Metric |
metricProcessedBytes()
The total number of bytes processed by the load balancer over IPv4 and IPv6.
|
Metric |
metricProcessedBytes(MetricOptions props)
The total number of bytes processed by the load balancer over IPv4 and IPv6.
|
Metric |
metricRejectedConnectionCount()
The number of connections that were rejected because the load balancer had reached its maximum number of connections.
|
Metric |
metricRejectedConnectionCount(MetricOptions props)
The number of connections that were rejected because the load balancer had reached its maximum number of connections.
|
Metric |
metricRequestCount()
The number of requests processed over IPv4 and IPv6.
|
Metric |
metricRequestCount(MetricOptions props)
The number of requests processed over IPv4 and IPv6.
|
Metric |
metricRuleEvaluations()
The number of rules processed by the load balancer given a request rate averaged over an hour.
|
Metric |
metricRuleEvaluations(MetricOptions props)
The number of rules processed by the load balancer given a request rate averaged over an hour.
|
Metric |
metricTargetConnectionErrorCount()
The number of connections that were not successfully established between the load balancer and target.
|
Metric |
metricTargetConnectionErrorCount(MetricOptions props)
The number of connections that were not successfully established between the load balancer and target.
|
Metric |
metricTargetResponseTime()
The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received.
|
Metric |
metricTargetResponseTime(MetricOptions props)
The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received.
|
Metric |
metricTargetTLSNegotiationErrorCount()
The number of TLS connections initiated by the load balancer that did not establish a session with the target.
|
Metric |
metricTargetTLSNegotiationErrorCount(MetricOptions props)
The number of TLS connections initiated by the load balancer that did not establish a session with the target.
|
getLoadBalancerArn, getLoadBalancerCanonicalHostedZoneId, getLoadBalancerDnsName, getLoadBalancerFullName, getLoadBalancerName, getLoadBalancerSecurityGroups, getVpc, logAccessLogs, logAccessLogs, removeAttribute, setAttribute, setAttribute, validate
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoadBalancerArn, getVpc
getLoadBalancerCanonicalHostedZoneId, getLoadBalancerDnsName
applyRemovalPolicy, getEnv, getStack
getNode
protected ApplicationLoadBalancer(software.amazon.jsii.JsiiObjectRef objRef)
protected ApplicationLoadBalancer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public ApplicationLoadBalancer(software.constructs.Construct scope, java.lang.String id, ApplicationLoadBalancerProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IApplicationLoadBalancer fromApplicationLoadBalancerAttributes(software.constructs.Construct scope, java.lang.String id, ApplicationLoadBalancerAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public static IApplicationLoadBalancer fromLookup(software.constructs.Construct scope, java.lang.String id, ApplicationLoadBalancerLookupOptions options)
scope
- This parameter is required.id
- This parameter is required.options
- This parameter is required.public ApplicationListener addListener(java.lang.String id, BaseApplicationListenerProps props)
addListener
in interface IApplicationLoadBalancer
id
- This parameter is required.props
- This parameter is required.public ApplicationListener addRedirect(ApplicationLoadBalancerRedirectConfig props)
props
- public ApplicationListener addRedirect()
public void addSecurityGroup(ISecurityGroup securityGroup)
securityGroup
- This parameter is required.public Metric metric(java.lang.String metricName, MetricOptions props)
Default: Average over 5 minutes
metricName
- This parameter is required.props
- public Metric metric(java.lang.String metricName)
Default: Average over 5 minutes
metricName
- This parameter is required.public Metric metricActiveConnectionCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricActiveConnectionCount()
Default: Sum over 5 minutes
public Metric metricClientTlsNegotiationErrorCount(MetricOptions props)
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes
props
- public Metric metricClientTlsNegotiationErrorCount()
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes
public Metric metricConsumedLCUs(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricConsumedLCUs()
Default: Sum over 5 minutes
public Metric metricElbAuthError(MetricOptions props)
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.
Default: Sum over 5 minutes
props
- public Metric metricElbAuthError()
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.
Default: Sum over 5 minutes
public Metric metricElbAuthFailure(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricElbAuthFailure()
Default: Sum over 5 minutes
public Metric metricElbAuthLatency(MetricOptions props)
If one or more of these operations fail, this is the time to failure.
Default: Average over 5 minutes
props
- public Metric metricElbAuthLatency()
If one or more of these operations fail, this is the time to failure.
Default: Average over 5 minutes
public Metric metricElbAuthSuccess(MetricOptions props)
This metric is incremented at the end of the authentication workflow, after the load balancer has retrieved the user claims from the IdP.
Default: Sum over 5 minutes
props
- public Metric metricElbAuthSuccess()
This metric is incremented at the end of the authentication workflow, after the load balancer has retrieved the user claims from the IdP.
Default: Sum over 5 minutes
public Metric metricHttpCodeElb(HttpCodeElb code, MetricOptions props)
This does not include any response codes generated by the targets.
Default: Sum over 5 minutes
code
- This parameter is required.props
- public Metric metricHttpCodeElb(HttpCodeElb code)
This does not include any response codes generated by the targets.
Default: Sum over 5 minutes
code
- This parameter is required.public Metric metricHttpCodeTarget(HttpCodeTarget code, MetricOptions props)
This does not include any response codes generated by the load balancer.
Default: Sum over 5 minutes
code
- This parameter is required.props
- public Metric metricHttpCodeTarget(HttpCodeTarget code)
This does not include any response codes generated by the load balancer.
Default: Sum over 5 minutes
code
- This parameter is required.public Metric metricHttpFixedResponseCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricHttpFixedResponseCount()
Default: Sum over 5 minutes
public Metric metricHttpRedirectCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricHttpRedirectCount()
Default: Sum over 5 minutes
public Metric metricHttpRedirectUrlLimitExceededCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricHttpRedirectUrlLimitExceededCount()
Default: Sum over 5 minutes
public Metric metricIpv6ProcessedBytes(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricIpv6ProcessedBytes()
Default: Sum over 5 minutes
public Metric metricIpv6RequestCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricIpv6RequestCount()
Default: Sum over 5 minutes
public Metric metricNewConnectionCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricNewConnectionCount()
Default: Sum over 5 minutes
public Metric metricProcessedBytes(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricProcessedBytes()
Default: Sum over 5 minutes
public Metric metricRejectedConnectionCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricRejectedConnectionCount()
Default: Sum over 5 minutes
public Metric metricRequestCount(MetricOptions props)
This count includes only the requests with a response generated by a target of the load balancer.
Default: Sum over 5 minutes
props
- public Metric metricRequestCount()
This count includes only the requests with a response generated by a target of the load balancer.
Default: Sum over 5 minutes
public Metric metricRuleEvaluations(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricRuleEvaluations()
Default: Sum over 5 minutes
public Metric metricTargetConnectionErrorCount(MetricOptions props)
Default: Sum over 5 minutes
props
- public Metric metricTargetConnectionErrorCount()
Default: Sum over 5 minutes
public Metric metricTargetResponseTime(MetricOptions props)
Default: Average over 5 minutes
props
- public Metric metricTargetResponseTime()
Default: Average over 5 minutes
public Metric metricTargetTLSNegotiationErrorCount(MetricOptions props)
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes
props
- public Metric metricTargetTLSNegotiationErrorCount()
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes
public Connections getConnections()
getConnections
in interface IConnectable
public java.util.List<ApplicationListener> getListeners()
This list is only valid for owned constructs.
getListeners
in interface IApplicationLoadBalancer
public IpAddressType getIpAddressType()
getIpAddressType
in interface IApplicationLoadBalancer