Skip to content
v2.274.0

ApplicationLoadBalancer L2 construct ​

Define an Application Load Balancer.

Example ​

ts
declare const vpc: ec2.Vpc;

const securityGroup1 = new ec2.SecurityGroup(this, 'SecurityGroup1', { vpc });
const lb = new elbv2.ApplicationLoadBalancer(this, 'LB', {
  vpc,
  internetFacing: true,
  securityGroup: securityGroup1, // Optional - will be automatically created otherwise
});

const securityGroup2 = new ec2.SecurityGroup(this, 'SecurityGroup2', { vpc });
lb.addSecurityGroup(securityGroup2);
python
# vpc: ec2.Vpc


security_group1 = ec2.SecurityGroup(self, "SecurityGroup1", vpc=vpc)
lb = elbv2.ApplicationLoadBalancer(self, "LB",
    vpc=vpc,
    internet_facing=True,
    security_group=security_group1
)

security_group2 = ec2.SecurityGroup(self, "SecurityGroup2", vpc=vpc)
lb.add_security_group(security_group2)
java
Vpc vpc;


SecurityGroup securityGroup1 = SecurityGroup.Builder.create(this, "SecurityGroup1").vpc(vpc).build();
ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "LB")
        .vpc(vpc)
        .internetFacing(true)
        .securityGroup(securityGroup1)
        .build();

SecurityGroup securityGroup2 = SecurityGroup.Builder.create(this, "SecurityGroup2").vpc(vpc).build();
lb.addSecurityGroup(securityGroup2);
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;


var securityGroup1 = new SecurityGroup(this, "SecurityGroup1", new SecurityGroupProps { Vpc = vpc });
var lb = new ApplicationLoadBalancer(this, "LB", new ApplicationLoadBalancerProps {
    Vpc = vpc,
    InternetFacing = true,
    SecurityGroup = securityGroup1
});

var securityGroup2 = new SecurityGroup(this, "SecurityGroup2", new SecurityGroupProps { Vpc = vpc });
lb.AddSecurityGroup(securityGroup2);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc


securityGroup1 := ec2.NewSecurityGroup(this, jsii.String("SecurityGroup1"), &SecurityGroupProps{
	Vpc: Vpc,
})
lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &ApplicationLoadBalancerProps{
	Vpc: Vpc,
	InternetFacing: jsii.Boolean(true),
	SecurityGroup: securityGroup1,
})

securityGroup2 := ec2.NewSecurityGroup(this, jsii.String("SecurityGroup2"), &SecurityGroupProps{
	Vpc: Vpc,
})
lb.AddSecurityGroup(securityGroup2)

Initializer ​

ts
new ApplicationLoadBalancer(scope: Construct, id: string, props: ApplicationLoadBalancerProps)
python
ApplicationLoadBalancer(scope: Construct, id: str, props: ApplicationLoadBalancerProps)
java
new ApplicationLoadBalancer(Construct scope, String id, ApplicationLoadBalancerProps props)
csharp
new ApplicationLoadBalancer(Construct scope, string id, ApplicationLoadBalancerProps props)
go
NewApplicationLoadBalancer(Scope Construct, Id *string, Props ApplicationLoadBalancerProps)

Construct Props ​

clientKeepAliveoptionalDurationclient_keep_aliveoptionalDurationclientKeepAliveoptionalDurationClientKeepAliveoptionalDurationClientKeepAliveoptionalDuration= Duration.seconds(3600)#
The client keep alive duration.

The valid range is 60 to 604800 seconds (1 minute to 7 days).

crossZoneEnabledoptionalbooleancross_zone_enabledoptionalboolcrossZoneEnabledoptionalBooleanCrossZoneEnabledoptionalboolCrossZoneEnabledoptional*bool#
Indicates whether cross-zone load balancing is enabled.

Default: false for Network Load Balancers and true for Application Load Balancers. This can not be false for Application Load Balancers.

deletionProtectionoptionalbooleandeletion_protectionoptionalbooldeletionProtectionoptionalBooleanDeletionProtectionoptionalboolDeletionProtectionoptional*bool= false#
Indicates whether deletion protection is enabled.
denyAllIgwTrafficoptionalbooleandeny_all_igw_trafficoptionalbooldenyAllIgwTrafficoptionalBooleanDenyAllIgwTrafficoptionalboolDenyAllIgwTrafficoptional*bool#
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).

Default: false for internet-facing load balancers and true for internal load balancers

desyncMitigationModeoptionalDesyncMitigationModedesync_mitigation_modeoptionalDesyncMitigationModedesyncMitigationModeoptionalDesyncMitigationModeDesyncMitigationModeoptionalDesyncMitigationModeDesyncMitigationModeoptionalDesyncMitigationMode= DesyncMitigationMode.DEFENSIVE#
Determines how the load balancer handles requests that might pose a security risk to your application.
dropInvalidHeaderFieldsoptionalbooleandrop_invalid_header_fieldsoptionalbooldropInvalidHeaderFieldsoptionalBooleanDropInvalidHeaderFieldsoptionalboolDropInvalidHeaderFieldsoptional*bool= false#
Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).
http2Enabledoptionalbooleanhttp2_enabledoptionalboolhttp2EnabledoptionalBooleanHttp2EnabledoptionalboolHttp2Enabledoptional*bool= true#
Indicates whether HTTP/2 is enabled.
idleTimeoutoptionalDurationidle_timeoutoptionalDurationidleTimeoutoptionalDurationIdleTimeoutoptionalDurationIdleTimeoutoptionalDuration= 60#
The load balancer idle timeout, in seconds.
internetFacingoptionalbooleaninternet_facingoptionalboolinternetFacingoptionalBooleanInternetFacingoptionalboolInternetFacingoptional*bool= false#
Whether the load balancer has an internet-routable address.
ipAddressTypeoptionalIpAddressTypeip_address_typeoptionalIpAddressTypeipAddressTypeoptionalIpAddressTypeIpAddressTypeoptionalIpAddressTypeIpAddressTypeoptionalIpAddressType= IpAddressType.IPV4#
The type of IP addresses to use.
loadBalancerNameoptionalstringload_balancer_nameoptionalstrloadBalancerNameoptionalStringLoadBalancerNameoptionalstringLoadBalancerNameoptional*string#
Name of the load balancer.

Default: Automatically generated name.

minimumCapacityUnitoptionalnumberminimum_capacity_unitoptionalint | floatminimumCapacityUnitoptionalNumberMinimumCapacityUnitoptionaldoubleMinimumCapacityUnitoptional*float64#
The minimum capacity (LCU) for a load balancer.

Default: undefined - ELB default is 0 LCU

preserveHostHeaderoptionalbooleanpreserve_host_headeroptionalboolpreserveHostHeaderoptionalBooleanPreserveHostHeaderoptionalboolPreserveHostHeaderoptional*bool= false#
Indicates whether the Application Load Balancer should preserve the host header in the HTTP request and send it to the target without any change.
preserveXffClientPortoptionalbooleanpreserve_xff_client_portoptionalboolpreserveXffClientPortoptionalBooleanPreserveXffClientPortoptionalboolPreserveXffClientPortoptional*bool= false#
Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.
securityGroupoptionalISecurityGroupsecurity_groupoptionalISecurityGroupsecurityGroupoptionalISecurityGroupSecurityGroupoptionalISecurityGroupSecurityGroupoptionalISecurityGroup#
Security group to associate with this load balancer.

Default: A security group is created

vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC network to place the load balancer in.
vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection#
Which subnets place the load balancer in.

Default: the Vpc default strategy.

wafFailOpenoptionalbooleanwaf_fail_openoptionalboolwafFailOpenoptionalBooleanWafFailOpenoptionalboolWafFailOpenoptional*bool= false#
Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF.
xAmznTlsVersionAndCipherSuiteHeadersoptionalbooleanx_amzn_tls_version_and_cipher_suite_headersoptionalboolxAmznTlsVersionAndCipherSuiteHeadersoptionalBooleanXAmznTlsVersionAndCipherSuiteHeadersoptionalboolXAmznTlsVersionAndCipherSuiteHeadersoptional*bool= false#
Indicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target.
notes

The x-amzn-tls-version header has information about the TLS protocol version negotiated with the client, and the x-amzn-tls-cipher-suite header has information about the cipher suite negotiated with the client.

Both headers are in OpenSSL format.

xffHeaderProcessingModeoptionalXffHeaderProcessingModexff_header_processing_modeoptionalXffHeaderProcessingModexffHeaderProcessingModeoptionalXffHeaderProcessingModeXffHeaderProcessingModeoptionalXffHeaderProcessingModeXffHeaderProcessingModeoptionalXffHeaderProcessingMode= XffHeaderProcessingMode.APPEND#
Enables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target.

Properties ​

connectionsConnectionsconnectionsConnectionsconnectionsConnectionsConnectionsConnectionsConnectionsConnectionsrequired#
The network connections associated with this resource.
The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

ipAddressTypemay be undefinedIpAddressTypeip_address_typemay be undefinedIpAddressTypeipAddressTypemay be undefinedIpAddressTypeIpAddressTypemay be undefinedIpAddressTypeIpAddressTypemay be undefinedIpAddressType#
The IP Address Type for this load balancer.
notes

If the @aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault feature flag is set (the default for new projects), and addListener() is called with open: true, the load balancer's security group will automatically include both IPv4 and IPv6 ingress rules when using IpAddressType.DUAL_STACK_WITHOUT_PUBLIC_IPV4.

For existing projects that only have IPv4 rules, you can opt-in to IPv6 ingress rules by enabling the feature flag in your cdk.json file. Note that enabling this feature flag will modify existing security group rules.

isApplicationLoadBalancerbooleanis_application_load_balancerboolisApplicationLoadBalancerBooleanIsApplicationLoadBalancerboolIsApplicationLoadBalancer*boolrequired#
Indicates that this is an Application Load Balancer.

Will always return true, but is necessary to prevent accidental structural equality in TypeScript.

listenersApplicationListener[]listenerstyping.List[ApplicationListener]listenersList<ApplicationListener>ListenersApplicationListener[]Listeners*[]ApplicationListenerrequired#
A list of listeners that have been added to the load balancer.

This list is only valid for owned constructs.

loadBalancerArnstringload_balancer_arnstrloadBalancerArnStringLoadBalancerArnstringLoadBalancerArn*stringrequired#
The ARN of this load balancer.

Example value: arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188

loadBalancerCanonicalHostedZoneIdstringload_balancer_canonical_hosted_zone_idstrloadBalancerCanonicalHostedZoneIdStringLoadBalancerCanonicalHostedZoneIdstringLoadBalancerCanonicalHostedZoneId*stringrequired#
The canonical hosted zone ID of this load balancer.

Example value: Z2P70J7EXAMPLE

loadBalancerDnsNamestringload_balancer_dns_namestrloadBalancerDnsNameStringLoadBalancerDnsNamestringLoadBalancerDnsName*stringrequired#
The DNS name of this load balancer.

Example value: my-load-balancer-424835706.us-west-2.elb.amazonaws.com

loadBalancerFullNamestringload_balancer_full_namestrloadBalancerFullNameStringLoadBalancerFullNamestringLoadBalancerFullName*stringrequired#
The full name of this load balancer.

Example value: app/my-load-balancer/50dc6c495c0c9188

loadBalancerNamestringload_balancer_namestrloadBalancerNameStringLoadBalancerNamestringLoadBalancerName*stringrequired#
The name of this load balancer.

Example value: my-load-balancer

loadBalancerRefLoadBalancerReferenceload_balancer_refLoadBalancerReferenceloadBalancerRefLoadBalancerReferenceLoadBalancerRefLoadBalancerReferenceLoadBalancerRefLoadBalancerReferencerequired#
A reference to this load balancer.
loadBalancerSecurityGroupsstring[]load_balancer_security_groupstyping.List[str]loadBalancerSecurityGroupsList<String>LoadBalancerSecurityGroupsstring[]LoadBalancerSecurityGroups*[]*stringrequired#
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
vpcmay be undefinedIVpcvpcmay be undefinedIVpcvpcmay be undefinedIVpcVpcmay be undefinedIVpcVpcmay be undefinedIVpc#
The VPC this load balancer has been created in.

This property is always defined (not null or undefined) for sub-classes of BaseLoadBalancer.

Methods ​

addListener(id: string, props: BaseApplicationListenerProps): ApplicationListenerdef add_listener(self, id: str, props: BaseApplicationListenerProps) -> ApplicationListenerpublic ApplicationListener addListener(String id, BaseApplicationListenerProps props)public ApplicationListener AddListener(string id, BaseApplicationListenerProps props)func AddListener(Id *string, Props BaseApplicationListenerProps) ApplicationListener#
Add a new listener to this load balancer.
addRedirect(props?: ApplicationLoadBalancerRedirectConfig): ApplicationListenerdef add_redirect(self, props: typing.Optional[ApplicationLoadBalancerRedirectConfig] = None) -> ApplicationListenerpublic ApplicationListener addRedirect(ApplicationLoadBalancerRedirectConfig props)public ApplicationListener AddRedirect(ApplicationLoadBalancerRedirectConfig? props = null)func AddRedirect(Props ApplicationLoadBalancerRedirectConfig) ApplicationListener#
Add a redirection listener to this load balancer.
addSecurityGroup(securityGroup: ISecurityGroup): voiddef add_security_group(self, security_group: ISecurityGroup) -> Nonepublic void addSecurityGroup(ISecurityGroup securityGroup)public void AddSecurityGroup(ISecurityGroup securityGroup)func AddSecurityGroup(SecurityGroup ISecurityGroup)#
Add a security group to this load balancer.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Override the cross-stack reference strength for this resource.
notes · 1 parameter

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

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).

fromApplicationLoadBalancerAttributes(scope: Construct, id: string, attrs: ApplicationLoadBalancerAttributes): IApplicationLoadBalancer@staticmethod def from_application_load_balancer_attributes(scope: Construct, id: str, attrs: ApplicationLoadBalancerAttributes) -> IApplicationLoadBalancerpublic static IApplicationLoadBalancer fromApplicationLoadBalancerAttributes(Construct scope, String id, ApplicationLoadBalancerAttributes attrs)public static IApplicationLoadBalancer FromApplicationLoadBalancerAttributes(Construct scope, string id, ApplicationLoadBalancerAttributes attrs)func FromApplicationLoadBalancerAttributes(Scope Construct, Id *string, Attrs ApplicationLoadBalancerAttributes) IApplicationLoadBalancerstatic#
Import an existing Application Load Balancer.
fromLookup(scope: Construct, id: string, options: ApplicationLoadBalancerLookupOptions): IApplicationLoadBalancer@staticmethod def from_lookup(scope: Construct, id: str, options: ApplicationLoadBalancerLookupOptions) -> IApplicationLoadBalancerpublic static IApplicationLoadBalancer fromLookup(Construct scope, String id, ApplicationLoadBalancerLookupOptions options)public static IApplicationLoadBalancer FromLookup(Construct scope, string id, ApplicationLoadBalancerLookupOptions options)func FromLookup(Scope Construct, Id *string, Options ApplicationLoadBalancerLookupOptions) IApplicationLoadBalancerstatic#
Look up an application load balancer.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#
Returns true if the construct was created by CDK, and false otherwise.
isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#
Check whether the given construct is a Resource.
logAccessLogs(bucket: IBucket, prefix?: string): voiddef log_access_logs(self, bucket: IBucket, prefix: typing.Optional[str] = None) -> Nonepublic void logAccessLogs(IBucket bucket, String prefix)public void LogAccessLogs(IBucket bucket, string? prefix = null)func LogAccessLogs(Bucket IBucket, Prefix *string)#
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

logConnectionLogs(bucket: IBucket, prefix?: string): voiddef log_connection_logs(self, bucket: IBucket, prefix: typing.Optional[str] = None) -> Nonepublic void logConnectionLogs(IBucket bucket, String prefix)public void LogConnectionLogs(IBucket bucket, string? prefix = null)func LogConnectionLogs(Bucket IBucket, Prefix *string)#
Enable connection 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.

metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.custom`` instead
metricActiveConnectionCount(props?: MetricOptions): Metricdef metric_active_connection_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricActiveConnectionCount(MetricOptions props)public Metric MetricActiveConnectionCount(MetricOptions? props = null)func MetricActiveConnectionCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.activeConnectionCount`` instead
metricClientTlsNegotiationErrorCount(props?: MetricOptions): Metricdef metric_client_tls_negotiation_error_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricClientTlsNegotiationErrorCount(MetricOptions props)public Metric MetricClientTlsNegotiationErrorCount(MetricOptions? props = null)func MetricClientTlsNegotiationErrorCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.clientTlsNegotiationErrorCount`` instead

Possible causes include a mismatch of ciphers or protocols.

metricConsumedLCUs(props?: MetricOptions): Metricdef metric_consumed_lc_us(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricConsumedLCUs(MetricOptions props)public Metric MetricConsumedLCUs(MetricOptions? props = null)func MetricConsumedLCUs(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.consumedLCUs`` instead
metricElbAuthError(props?: MetricOptions): Metricdef metric_elb_auth_error(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricElbAuthError(MetricOptions props)public Metric MetricElbAuthError(MetricOptions? props = null)func MetricElbAuthError(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.elbAuthError`` instead

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.

metricElbAuthFailure(props?: MetricOptions): Metricdef metric_elb_auth_failure(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricElbAuthFailure(MetricOptions props)public Metric MetricElbAuthFailure(MetricOptions? props = null)func MetricElbAuthFailure(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.elbAuthFailure`` instead
metricElbAuthLatency(props?: MetricOptions): Metricdef metric_elb_auth_latency(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricElbAuthLatency(MetricOptions props)public Metric MetricElbAuthLatency(MetricOptions? props = null)func MetricElbAuthLatency(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.elbAuthLatency`` instead

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

metricElbAuthSuccess(props?: MetricOptions): Metricdef metric_elb_auth_success(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricElbAuthSuccess(MetricOptions props)public Metric MetricElbAuthSuccess(MetricOptions? props = null)func MetricElbAuthSuccess(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.elbAuthSuccess`` instead

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

metricHttpCodeElb(code: HttpCodeElb, props?: MetricOptions): Metricdef metric_http_code_elb(self, code: HttpCodeElb, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHttpCodeElb(HttpCodeElb code, MetricOptions props)public Metric MetricHttpCodeElb(HttpCodeElb code, MetricOptions? props = null)func MetricHttpCodeElb(Code HttpCodeElb, Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.httpCodeElb`` instead

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

metricHttpCodeTarget(code: HttpCodeTarget, props?: MetricOptions): Metricdef metric_http_code_target(self, code: HttpCodeTarget, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHttpCodeTarget(HttpCodeTarget code, MetricOptions props)public Metric MetricHttpCodeTarget(HttpCodeTarget code, MetricOptions? props = null)func MetricHttpCodeTarget(Code HttpCodeTarget, Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.httpCodeTarget`` instead

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

metricHttpFixedResponseCount(props?: MetricOptions): Metricdef metric_http_fixed_response_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHttpFixedResponseCount(MetricOptions props)public Metric MetricHttpFixedResponseCount(MetricOptions? props = null)func MetricHttpFixedResponseCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.httpFixedResponseCount`` instead
metricHttpRedirectCount(props?: MetricOptions): Metricdef metric_http_redirect_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHttpRedirectCount(MetricOptions props)public Metric MetricHttpRedirectCount(MetricOptions? props = null)func MetricHttpRedirectCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.httpRedirectCount`` instead
metricHttpRedirectUrlLimitExceededCount(props?: MetricOptions): Metricdef metric_http_redirect_url_limit_exceeded_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricHttpRedirectUrlLimitExceededCount(MetricOptions props)public Metric MetricHttpRedirectUrlLimitExceededCount(MetricOptions? props = null)func MetricHttpRedirectUrlLimitExceededCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.httpRedirectUrlLimitExceededCount`` instead
metricIpv6ProcessedBytes(props?: MetricOptions): Metricdef metric_ipv6_processed_bytes(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricIpv6ProcessedBytes(MetricOptions props)public Metric MetricIpv6ProcessedBytes(MetricOptions? props = null)func MetricIpv6ProcessedBytes(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.ipv6ProcessedBytes`` instead
metricIpv6RequestCount(props?: MetricOptions): Metricdef metric_ipv6_request_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricIpv6RequestCount(MetricOptions props)public Metric MetricIpv6RequestCount(MetricOptions? props = null)func MetricIpv6RequestCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.ipv6RequestCount`` instead
metricNewConnectionCount(props?: MetricOptions): Metricdef metric_new_connection_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricNewConnectionCount(MetricOptions props)public Metric MetricNewConnectionCount(MetricOptions? props = null)func MetricNewConnectionCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.newConnectionCount`` instead
metricProcessedBytes(props?: MetricOptions): Metricdef metric_processed_bytes(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricProcessedBytes(MetricOptions props)public Metric MetricProcessedBytes(MetricOptions? props = null)func MetricProcessedBytes(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.processedBytes`` instead
metricRejectedConnectionCount(props?: MetricOptions): Metricdef metric_rejected_connection_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRejectedConnectionCount(MetricOptions props)public Metric MetricRejectedConnectionCount(MetricOptions? props = null)func MetricRejectedConnectionCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.rejectedConnectionCount`` instead
metricRequestCount(props?: MetricOptions): Metricdef metric_request_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRequestCount(MetricOptions props)public Metric MetricRequestCount(MetricOptions? props = null)func MetricRequestCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.requestCount`` instead

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

metricRuleEvaluations(props?: MetricOptions): Metricdef metric_rule_evaluations(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricRuleEvaluations(MetricOptions props)public Metric MetricRuleEvaluations(MetricOptions? props = null)func MetricRuleEvaluations(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.ruleEvaluations`` instead
metricTargetConnectionErrorCount(props?: MetricOptions): Metricdef metric_target_connection_error_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTargetConnectionErrorCount(MetricOptions props)public Metric MetricTargetConnectionErrorCount(MetricOptions? props = null)func MetricTargetConnectionErrorCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.targetConnectionErrorCount`` instead
metricTargetResponseTime(props?: MetricOptions): Metricdef metric_target_response_time(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTargetResponseTime(MetricOptions props)public Metric MetricTargetResponseTime(MetricOptions? props = null)func MetricTargetResponseTime(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.targetResponseTime`` instead
metricTargetTLSNegotiationErrorCount(props?: MetricOptions): Metricdef metric_target_tls_negotiation_error_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTargetTLSNegotiationErrorCount(MetricOptions props)public Metric MetricTargetTLSNegotiationErrorCount(MetricOptions? props = null)func MetricTargetTLSNegotiationErrorCount(Props MetricOptions) Metricdeprecated#
Use ``ApplicationLoadBalancer.metrics.targetTLSNegotiationErrorCount`` instead

Possible causes include a mismatch of ciphers or protocols.

removeAttribute(key: string): voiddef remove_attribute(self, key: str) -> Nonepublic void removeAttribute(String key)public void RemoveAttribute(string key)func RemoveAttribute(Key *string)#
Remove an attribute from the load balancer.
setAttribute(key: string, value?: string): voiddef set_attribute(self, key: str, value: typing.Optional[str] = None) -> Nonepublic void setAttribute(String key, String value)public void SetAttribute(string key, string? value = null)func SetAttribute(Key *string, Value *string)#
Set a non-standard attribute on the load balancer.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.