# PublicSubnetAttributes

Extends: PublicSubnetAttributes
Extends: SubnetAttributes

- Source: [`aws-ec2/lib/vpc.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L2541)

## 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';
const publicSubnetAttributes: ec2.PublicSubnetAttributes = {
  subnetId: 'subnetId',

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

## Properties

- `availabilityZone`: string — The Availability Zone the subnet is located in.

  **Default:** No AZ information, cannot use AZ selection features

- `ipv4CidrBlock`: string — The IPv4 CIDR block associated with the subnet.

  **Default:** No CIDR information, cannot use CIDR filter features

- `routeTableId`: string — The ID of the route table for this particular subnet.

  **Default:** No route table information, cannot create VPC endpoints

- `subnetId`: string (required) — The subnetId for this particular subnet.
