# BaseLoadBalancerProps

Shared properties of both Application and Network Load Balancers.

Extends: BaseLoadBalancerProps
Used as props by: BaseLoadBalancer

- Source: [`aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/shared/base-load-balancer.ts#L98)
- Type last changed: v2.179.0 · 18 Feb 2025

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

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

## Properties

- `crossZoneEnabled`: boolean — 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.

- `deletionProtection`: boolean = false — Indicates whether deletion protection is enabled.

- `denyAllIgwTraffic`: boolean — 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

- `internetFacing`: boolean = false — Whether the load balancer has an internet-routable address.

- `loadBalancerName`: string — Name of the load balancer.

  **Default:** Automatically generated name.

- `minimumCapacityUnit`: number — The minimum capacity (LCU) for a load balancer.

  **Default:** undefined - ELB default is 0 LCU

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC network to place the load balancer in.

- `vpcSubnets`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — Which subnets place the load balancer in.

  **Default:** the Vpc default strategy.
