> **Experimental**
>
> `@aws-cdk/aws-ec2-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# SubnetV2Attributes

Properties required to import a subnet.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/subnet-v2.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-ec2-alpha/lib/subnet-v2.ts#L417)

## Example

```ts
SubnetV2.fromSubnetV2Attributes(this, 'ImportedSubnet', {
  subnetId: 'subnet-0123456789abcdef0',
  availabilityZone: 'us-west-2a',
  ipv4CidrBlock: '10.2.0.0/24',
  routeTableId: 'rtb-0871c310f98da2cbb',
  subnetType: SubnetType.PRIVATE_ISOLATED,
});
```

## Properties

- `availabilityZone`: string (required) — The Availability Zone this subnet is located in.

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

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

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

- `ipv6CidrBlock`: 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.

- `subnetName`: string — Name of the given subnet.

  **Default:** no subnet name

- `subnetType`: [SubnetType](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetType.html) (required) — The type of subnet (public or private) that this subnet represents.
