Class ApplicationLoadBalancer
Define an Application Load Balancer.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class ApplicationLoadBalancer : BaseLoadBalancer, IApplicationLoadBalancer, ILoadBalancerV2, IResource, IConstruct, IDependable, IConnectable
Syntax (vb)
Public Class ApplicationLoadBalancer
Inherits BaseLoadBalancer
Implements IApplicationLoadBalancer, ILoadBalancerV2, IResource, IConstruct, IDependable, IConnectable
Remarks
Resource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
var vpc = new Vpc(this, "VPC");
var lb = new ApplicationLoadBalancer(this, "lb", new ApplicationLoadBalancerProps { Vpc = vpc });
var listener = lb.AddListener("listener", new BaseApplicationListenerProps { Port = 80 });
listener.AddTargets("target", new AddApplicationTargetsProps {
Port = 80
});
var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
DefaultIntegration = new HttpAlbIntegration("DefaultIntegration", listener)
});
Synopsis
Constructors
ApplicationLoadBalancer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ApplicationLoadBalancer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ApplicationLoadBalancer(Construct, String, IApplicationLoadBalancerProps) |
Properties
Connections | The network connections associated with this resource. |
IpAddressType | The IP Address Type for this load balancer. |
Listeners | A list of listeners that have been added to the load balancer. |
Methods
AddListener(String, IBaseApplicationListenerProps) | Add a new listener to this load balancer. |
AddRedirect(IApplicationLoadBalancerRedirectConfig) | Add a redirection listener to this load balancer. |
AddSecurityGroup(ISecurityGroup) | Add a security group to this load balancer. |
FromApplicationLoadBalancerAttributes(Construct, String, IApplicationLoadBalancerAttributes) | Import an existing Application Load Balancer. |
FromLookup(Construct, String, IApplicationLoadBalancerLookupOptions) | Look up an application load balancer. |
Metric(String, IMetricOptions) | Return the given named metric for this Application Load Balancer. |
MetricActiveConnectionCount(IMetricOptions) | The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets. |
MetricClientTlsNegotiationErrorCount(IMetricOptions) | The number of TLS connections initiated by the client that did not establish a session with the load balancer. |
MetricConsumedLCUs(IMetricOptions) | The number of load balancer capacity units (LCU) used by your load balancer. |
MetricElbAuthError(IMetricOptions) | The number of user authentications that could not be completed. |
MetricElbAuthFailure(IMetricOptions) | 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. |
MetricElbAuthLatency(IMetricOptions) | The time elapsed, in milliseconds, to query the IdP for the ID token and user info. |
MetricElbAuthSuccess(IMetricOptions) | The number of authenticate actions that were successful. |
MetricHttpCodeElb(HttpCodeElb, IMetricOptions) | The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer. |
MetricHttpCodeTarget(HttpCodeTarget, IMetricOptions) | The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer. |
MetricHttpFixedResponseCount(IMetricOptions) | The number of fixed-response actions that were successful. |
MetricHttpRedirectCount(IMetricOptions) | The number of redirect actions that were successful. |
MetricHttpRedirectUrlLimitExceededCount(IMetricOptions) | The number of redirect actions that couldn't be completed because the URL in the response location header is larger than 8K. |
MetricIpv6ProcessedBytes(IMetricOptions) | The total number of bytes processed by the load balancer over IPv6. |
MetricIpv6RequestCount(IMetricOptions) | The number of IPv6 requests received by the load balancer. |
MetricNewConnectionCount(IMetricOptions) | The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets. |
MetricProcessedBytes(IMetricOptions) | The total number of bytes processed by the load balancer over IPv4 and IPv6. |
MetricRejectedConnectionCount(IMetricOptions) | The number of connections that were rejected because the load balancer had reached its maximum number of connections. |
MetricRequestCount(IMetricOptions) | The number of requests processed over IPv4 and IPv6. |
MetricRuleEvaluations(IMetricOptions) | The number of rules processed by the load balancer given a request rate averaged over an hour. |
MetricTargetConnectionErrorCount(IMetricOptions) | The number of connections that were not successfully established between the load balancer and target. |
MetricTargetResponseTime(IMetricOptions) | The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. |
MetricTargetTLSNegotiationErrorCount(IMetricOptions) | The number of TLS connections initiated by the load balancer that did not establish a session with the target. |
Constructors
ApplicationLoadBalancer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ApplicationLoadBalancer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ApplicationLoadBalancer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ApplicationLoadBalancer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ApplicationLoadBalancer(Construct, String, IApplicationLoadBalancerProps)
public ApplicationLoadBalancer(Construct scope, string id, IApplicationLoadBalancerProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IApplicationLoadBalancerProps
Properties
Connections
The network connections associated with this resource.
public virtual Connections_ Connections { get; }
Property Value
IpAddressType
The IP Address Type for this load balancer.
public virtual Nullable<IpAddressType> IpAddressType { get; }
Property Value
System.Nullable<IpAddressType>
Listeners
A list of listeners that have been added to the load balancer.
public virtual ApplicationListener[] Listeners { get; }
Property Value
Remarks
This list is only valid for owned constructs.
Methods
AddListener(String, IBaseApplicationListenerProps)
Add a new listener to this load balancer.
public virtual ApplicationListener AddListener(string id, IBaseApplicationListenerProps props)
Parameters
- id System.String
- props IBaseApplicationListenerProps
Returns
AddRedirect(IApplicationLoadBalancerRedirectConfig)
Add a redirection listener to this load balancer.
public virtual ApplicationListener AddRedirect(IApplicationLoadBalancerRedirectConfig props = null)
Parameters
Returns
AddSecurityGroup(ISecurityGroup)
Add a security group to this load balancer.
public virtual void AddSecurityGroup(ISecurityGroup securityGroup)
Parameters
- securityGroup ISecurityGroup
FromApplicationLoadBalancerAttributes(Construct, String, IApplicationLoadBalancerAttributes)
Import an existing Application Load Balancer.
public static IApplicationLoadBalancer FromApplicationLoadBalancerAttributes(Construct scope, string id, IApplicationLoadBalancerAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IApplicationLoadBalancerAttributes
Returns
FromLookup(Construct, String, IApplicationLoadBalancerLookupOptions)
Look up an application load balancer.
public static IApplicationLoadBalancer FromLookup(Construct scope, string id, IApplicationLoadBalancerLookupOptions options)
Parameters
- scope Constructs.Construct
- id System.String
- options IApplicationLoadBalancerLookupOptions
Returns
Metric(String, IMetricOptions)
Return the given named metric for this Application Load Balancer.
public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
Remarks
Default: Average over 5 minutes
MetricActiveConnectionCount(IMetricOptions)
The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
public virtual Metric MetricActiveConnectionCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricClientTlsNegotiationErrorCount(IMetricOptions)
The number of TLS connections initiated by the client that did not establish a session with the load balancer.
public virtual Metric MetricClientTlsNegotiationErrorCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes
MetricConsumedLCUs(IMetricOptions)
The number of load balancer capacity units (LCU) used by your load balancer.
public virtual Metric MetricConsumedLCUs(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricElbAuthError(IMetricOptions)
The number of user authentications that could not be completed.
public virtual Metric MetricElbAuthError(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
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
MetricElbAuthFailure(IMetricOptions)
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.
public virtual Metric MetricElbAuthFailure(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricElbAuthLatency(IMetricOptions)
The time elapsed, in milliseconds, to query the IdP for the ID token and user info.
public virtual Metric MetricElbAuthLatency(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
If one or more of these operations fail, this is the time to failure.
Default: Average over 5 minutes
MetricElbAuthSuccess(IMetricOptions)
The number of authenticate actions that were successful.
public virtual Metric MetricElbAuthSuccess(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
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
MetricHttpCodeElb(HttpCodeElb, IMetricOptions)
The number of HTTP 3xx/4xx/5xx codes that originate from the load balancer.
public virtual Metric MetricHttpCodeElb(HttpCodeElb code, IMetricOptions props = null)
Parameters
- code HttpCodeElb
- props IMetricOptions
Returns
Remarks
This does not include any response codes generated by the targets.
Default: Sum over 5 minutes
MetricHttpCodeTarget(HttpCodeTarget, IMetricOptions)
The number of HTTP 2xx/3xx/4xx/5xx response codes generated by all targets in the load balancer.
public virtual Metric MetricHttpCodeTarget(HttpCodeTarget code, IMetricOptions props = null)
Parameters
- code HttpCodeTarget
- props IMetricOptions
Returns
Remarks
This does not include any response codes generated by the load balancer.
Default: Sum over 5 minutes
MetricHttpFixedResponseCount(IMetricOptions)
The number of fixed-response actions that were successful.
public virtual Metric MetricHttpFixedResponseCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricHttpRedirectCount(IMetricOptions)
The number of redirect actions that were successful.
public virtual Metric MetricHttpRedirectCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricHttpRedirectUrlLimitExceededCount(IMetricOptions)
The number of redirect actions that couldn't be completed because the URL in the response location header is larger than 8K.
public virtual Metric MetricHttpRedirectUrlLimitExceededCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricIpv6ProcessedBytes(IMetricOptions)
The total number of bytes processed by the load balancer over IPv6.
public virtual Metric MetricIpv6ProcessedBytes(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricIpv6RequestCount(IMetricOptions)
The number of IPv6 requests received by the load balancer.
public virtual Metric MetricIpv6RequestCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricNewConnectionCount(IMetricOptions)
The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
public virtual Metric MetricNewConnectionCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricProcessedBytes(IMetricOptions)
The total number of bytes processed by the load balancer over IPv4 and IPv6.
public virtual Metric MetricProcessedBytes(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricRejectedConnectionCount(IMetricOptions)
The number of connections that were rejected because the load balancer had reached its maximum number of connections.
public virtual Metric MetricRejectedConnectionCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricRequestCount(IMetricOptions)
The number of requests processed over IPv4 and IPv6.
public virtual Metric MetricRequestCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
This count includes only the requests with a response generated by a target of the load balancer.
Default: Sum over 5 minutes
MetricRuleEvaluations(IMetricOptions)
The number of rules processed by the load balancer given a request rate averaged over an hour.
public virtual Metric MetricRuleEvaluations(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricTargetConnectionErrorCount(IMetricOptions)
The number of connections that were not successfully established between the load balancer and target.
public virtual Metric MetricTargetConnectionErrorCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Sum over 5 minutes
MetricTargetResponseTime(IMetricOptions)
The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received.
public virtual Metric MetricTargetResponseTime(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Average over 5 minutes
MetricTargetTLSNegotiationErrorCount(IMetricOptions)
The number of TLS connections initiated by the load balancer that did not establish a session with the target.
public virtual Metric MetricTargetTLSNegotiationErrorCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Possible causes include a mismatch of ciphers or protocols.
Default: Sum over 5 minutes