# AvailabilityZoneAddress

Configuration for a specific Availability Zone in a Regional NAT Gateway.

This is used to manually specify which EIPs to use in each AZ.

- Source: [`aws-ec2/lib/nat.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/nat.ts#L196)
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

TypeScript:

```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';
const availabilityZoneAddress: ec2.AvailabilityZoneAddress = {
  allocationIds: ['allocationIds'],

  // the properties below are optional
  availabilityZone: 'availabilityZone',
  availabilityZoneId: 'availabilityZoneId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

availability_zone_address = ec2.AvailabilityZoneAddress(
    allocation_ids=["allocationIds"],

    # the properties below are optional
    availability_zone="availabilityZone",
    availability_zone_id="availabilityZoneId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

AvailabilityZoneAddress availabilityZoneAddress = AvailabilityZoneAddress.builder()
        .allocationIds(List.of("allocationIds"))

        // the properties below are optional
        .availabilityZone("availabilityZone")
        .availabilityZoneId("availabilityZoneId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var availabilityZoneAddress = new AvailabilityZoneAddress {
    AllocationIds = new [] { "allocationIds" },

    // the properties below are optional
    AvailabilityZone = "availabilityZone",
    AvailabilityZoneId = "availabilityZoneId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

availabilityZoneAddress := &AvailabilityZoneAddress{
	AllocationIds: []*string{
		jsii.String("allocationIds"),
	},

	// the properties below are optional
	AvailabilityZone: jsii.String("availabilityZone"),
	AvailabilityZoneId: jsii.String("availabilityZoneId"),
}
```

## Properties

- `allocationIds`: string[] (required) — The allocation IDs of the Elastic IP addresses to be used for handling outbound NAT traffic in this specific Availability Zone.

- `availabilityZone`: string — The Availability Zone where this specific NAT gateway configuration will be active.

  **Default:** Use availabilityZoneId instead

  Either `availabilityZone` or `availabilityZoneId` must be specified.

- `availabilityZoneId`: string — The ID of the Availability Zone where this specific NAT gateway configuration will be active.

  **Default:** Use availabilityZone instead

  Either `availabilityZone` or `availabilityZoneId` must be specified.
