aws-cdk-lib.aws_elasticloadbalancingv2.BaseLoadBalancerProps

interface BaseLoadBalancerProps

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

Shared properties of both Application and Network Load Balancers.

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 subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const baseLoadBalancerProps: elbv2.BaseLoadBalancerProps = {
  vpc: vpc,

  // the properties below are optional
  deletionProtection: false,
  internetFacing: false,
  loadBalancerName: 'loadBalancerName',
  vpcSubnets: {
    availabilityZones: ['availabilityZones'],
    onePerAz: false,
    subnetFilters: [subnetFilter],
    subnetGroupName: 'subnetGroupName',
    subnets: [subnet],
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
  },
};

Properties

NameTypeDescription
vpcIVpcThe VPC network to place the load balancer in.
deletionProtection?booleanIndicates whether deletion protection is enabled.
internetFacing?booleanWhether the load balancer has an internet-routable address.
loadBalancerName?stringName of the load balancer.
vpcSubnets?SubnetSelectionWhich subnets place the load balancer in.

vpc

Type: IVpc

The VPC network to place the load balancer in.


deletionProtection?

Type: boolean (optional, default: false)

Indicates whether deletion protection is enabled.


internetFacing?

Type: boolean (optional, default: false)

Whether the load balancer has an internet-routable address.


loadBalancerName?

Type: string (optional, default: Automatically generated name.)

Name of the load balancer.


vpcSubnets?

Type: SubnetSelection (optional, default: the Vpc default strategy.)

Which subnets place the load balancer in.