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

Additional props needed for BYOIP IPv6 address props.

Extends: [SecondaryAddressProps](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.SecondaryAddressProps.html)
Used as argument in: [IpAddresses.ipv6ByoipPool](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-ec2-alpha.IpAddresses.html#ipv6byoippool)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/vpc-v2.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2.ts#L30)

## Example

TypeScript:

```ts
const myVpc = new VpcV2(this, 'Vpc', {
  primaryAddressBlock: IpAddresses.ipv4('10.1.0.0/16'),
  secondaryAddressBlocks: [IpAddresses.ipv6ByoipPool({
    cidrBlockName: 'MyByoipCidrBlock',
    ipv6PoolId: 'ipv6pool-ec2-someHashValue',
    ipv6CidrBlock: '2001:db8::/32'
  })],
  enableDnsHostnames: true,
  enableDnsSupport: true,
});
```

Python:

```python
my_vpc = VpcV2(self, "Vpc",
    primary_address_block=IpAddresses.ipv4("10.1.0.0/16"),
    secondary_address_blocks=[IpAddresses.ipv6_byoip_pool(
        cidr_block_name="MyByoipCidrBlock",
        ipv6_pool_id="ipv6pool-ec2-someHashValue",
        ipv6_cidr_block="2001:db8::/32"
    )],
    enable_dns_hostnames=True,
    enable_dns_support=True
)
```

Java:

```java
VpcV2 myVpc = VpcV2.Builder.create(this, "Vpc")
        .primaryAddressBlock(IpAddresses.ipv4("10.1.0.0/16"))
        .secondaryAddressBlocks(List.of(IpAddresses.ipv6ByoipPool(Ipv6PoolSecondaryAddressProps.builder()
                .cidrBlockName("MyByoipCidrBlock")
                .ipv6PoolId("ipv6pool-ec2-someHashValue")
                .ipv6CidrBlock("2001:db8::/32")
                .build())))
        .enableDnsHostnames(true)
        .enableDnsSupport(true)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.ec2.Alpha
var myVpc = new VpcV2(this, "Vpc", new VpcV2Props {
    PrimaryAddressBlock = IpAddresses.Ipv4("10.1.0.0/16"),
    SecondaryAddressBlocks = new [] { IpAddresses.Ipv6ByoipPool(new Ipv6PoolSecondaryAddressProps {
        CidrBlockName = "MyByoipCidrBlock",
        Ipv6PoolId = "ipv6pool-ec2-someHashValue",
        Ipv6CidrBlock = "2001:db8::/32"
    }) },
    EnableDnsHostnames = true,
    EnableDnsSupport = true
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsec2alpha/v2
myVpc := awsec2alpha.NewVpcV2(this, jsii.String("Vpc"), &VpcV2Props{
	PrimaryAddressBlock: awsec2alpha.IpAddresses_Ipv4(jsii.String("10.1.0.0/16")),
	SecondaryAddressBlocks: []IIpAddresses{
		awsec2alpha.IpAddresses_Ipv6ByoipPool(&Ipv6PoolSecondaryAddressProps{
			CidrBlockName: jsii.String("MyByoipCidrBlock"),
			Ipv6PoolId: jsii.String("ipv6pool-ec2-someHashValue"),
			Ipv6CidrBlock: jsii.String("2001:db8::/32"),
		}),
	},
	EnableDnsHostnames: jsii.Boolean(true),
	EnableDnsSupport: jsii.Boolean(true),
})
```

## Properties

- `cidrBlockName`: string (required) — Required to set Secondary cidr block resource name in order to generate unique logical id for the resource.

- `ipv6CidrBlock`: string (required) — A valid IPv6 CIDR block from the IPv6 address pool onboarded to AWS using BYOIP.

  The most specific IPv6 address range that you can bring is /48 for CIDRs that are publicly advertisable
  and /56 for CIDRs that are not publicly advertisable.

- `ipv6PoolId`: string (required) — ID of the IPv6 address pool from which to allocate the IPv6 CIDR block.

  Note: BYOIP Pool ID is different from the IPAM Pool ID.
  To onboard your IPv6 address range to your AWS account please refer to the below documentation
