aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancerAttributes

interface ApplicationLoadBalancerAttributes

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancingV2.ApplicationLoadBalancerAttributes
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#ApplicationLoadBalancerAttributes
Javasoftware.amazon.awscdk.services.elasticloadbalancingv2.ApplicationLoadBalancerAttributes
Pythonaws_cdk.aws_elasticloadbalancingv2.ApplicationLoadBalancerAttributes
TypeScript (source)aws-cdk-lib » aws_elasticloadbalancingv2 » ApplicationLoadBalancerAttributes

Properties to reference an existing load balancer.

Example

// 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

NameTypeDescription
loadBalancerArnstringARN of the load balancer.
securityGroupIdstringID of the load balancer's security group.
loadBalancerCanonicalHostedZoneId?stringThe canonical hosted zone ID of this load balancer.
loadBalancerDnsName?stringThe DNS name of this load balancer.
securityGroupAllowsAllOutbound?booleanWhether the security group allows all outbound traffic or not.
vpc?IVpcThe VPC this load balancer has been created in, if available.

loadBalancerArn

Type: string

ARN of the load balancer.


securityGroupId

Type: string

ID of the load balancer's security group.


loadBalancerCanonicalHostedZoneId?

Type: string (optional, default: When not provided, LB cannot be used as Route53 Alias target.)

The canonical hosted zone ID of this load balancer.


loadBalancerDnsName?

Type: string (optional, default: When not provided, LB cannot be used as Route53 Alias target.)

The DNS name of this load balancer.


securityGroupAllowsAllOutbound?

Type: boolean (optional, default: 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.


vpc?

Type: IVpc (optional, default: If the Load Balancer was imported and a VPC was not specified, the VPC is not available.)

The VPC this load balancer has been created in, if available.