ApplicationLoadBalancerAttributes Struct
Properties to reference an existing load balancer.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
declare const vpc: ec2.Vpc;
const applicationLoadBalancerAttributes: elbv2.ApplicationLoadBalancerAttributes = {
loadBalancerArn: 'loadBalancerArn',
securityGroupId: 'securityGroupId',
// the properties below are optional
loadBalancerCanonicalHostedZoneId: 'loadBalancerCanonicalHostedZoneId',
loadBalancerDnsName: 'loadBalancerDnsName',
securityGroupAllowsAllOutbound: false,
vpc: vpc,
};
Properties
loadBalancerArnstringload_balancer_arnstrloadBalancerArnStringLoadBalancerArnstringLoadBalancerArn*stringrequired#ARN of the load balancer.
loadBalancerCanonicalHostedZoneIdstringload_balancer_canonical_hosted_zone_idstrloadBalancerCanonicalHostedZoneIdStringLoadBalancerCanonicalHostedZoneIdstringLoadBalancerCanonicalHostedZoneId*string= When not provided, LB cannot be …#The canonical hosted zone ID of this load balancer.
default
Default: When not provided, LB cannot be used as Route53 Alias target.
loadBalancerDnsNamestringload_balancer_dns_namestrloadBalancerDnsNameStringLoadBalancerDnsNamestringLoadBalancerDnsName*string= When not provided, LB cannot be …#The DNS name of this load balancer.
default
Default: When not provided, LB cannot be used as Route53 Alias target.
securityGroupAllowsAllOutboundbooleansecurity_group_allows_all_outboundboolsecurityGroupAllowsAllOutboundBooleanSecurityGroupAllowsAllOutboundboolSecurityGroupAllowsAllOutbound*bool= true#Whether the security group allows all outbound traffic or not.
Unless set to false, no egress rules will be added to the security group.
securityGroupIdstringsecurity_group_idstrsecurityGroupIdStringSecurityGroupIdstringSecurityGroupId*stringrequired#ID of the load balancer's security group.