package awsec2alpha


// Options for configuring an IPAM pool.
//
// Example:
//   stack := awscdk.Newstack()
//   ipam := awsec2alpha.NewIpam(this, jsii.String("Ipam"), &IpamProps{
//   	OperatingRegions: []*string{
//   		jsii.String("us-west-1"),
//   	},
//   })
//   ipamPublicPool := ipam.PublicScope.AddPool(jsii.String("PublicPoolA"), &PoolOptions{
//   	AddressFamily: awsec2alpha.AddressFamily_IP_V6,
//   	AwsService: awsec2alpha.AwsServiceName_EC2,
//   	Locale: jsii.String("us-west-1"),
//   	PublicIpSource: awsec2alpha.IpamPoolPublicIpSource_AMAZON,
//   })
//   ipamPublicPool.ProvisionCidr(jsii.String("PublicPoolACidrA"), &IpamPoolCidrProvisioningOptions{
//   	NetmaskLength: jsii.Number(52),
//   })
//
//   ipamPrivatePool := ipam.PrivateScope.AddPool(jsii.String("PrivatePoolA"), &PoolOptions{
//   	AddressFamily: awsec2alpha.AddressFamily_IP_V4,
//   })
//   ipamPrivatePool.ProvisionCidr(jsii.String("PrivatePoolACidrA"), &IpamPoolCidrProvisioningOptions{
//   	NetmaskLength: jsii.Number(8),
//   })
//
//   awsec2alpha.NewVpcV2(this, jsii.String("Vpc"), &VpcV2Props{
//   	PrimaryAddressBlock: awsec2alpha.IpAddresses_Ipv4(jsii.String("10.0.0.0/24")),
//   	SecondaryAddressBlocks: []iIpAddresses{
//   		awsec2alpha.IpAddresses_AmazonProvidedIpv6(&SecondaryAddressProps{
//   			CidrBlockName: jsii.String("AmazonIpv6"),
//   		}),
//   		awsec2alpha.IpAddresses_Ipv6Ipam(&IpamOptions{
//   			IpamPool: ipamPublicPool,
//   			NetmaskLength: jsii.Number(52),
//   			CidrBlockName: jsii.String("ipv6Ipam"),
//   		}),
//   		awsec2alpha.IpAddresses_Ipv4Ipam(&IpamOptions{
//   			IpamPool: ipamPrivatePool,
//   			NetmaskLength: jsii.Number(8),
//   			CidrBlockName: jsii.String("ipv4Ipam"),
//   		}),
//   	},
//   })
//
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html
//
// Experimental.
type PoolOptions struct {
	// addressFamily - The address family of the pool (ipv4 or ipv6).
	// Experimental.
	AddressFamily AddressFamily `field:"required" json:"addressFamily" yaml:"addressFamily"`
	// Limits which service in AWS that the pool can be used in.
	//
	// "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-awsservice
	//
	// Default: - required in case of an IPv6, throws an error if not provided.
	//
	// Experimental.
	AwsService AwsServiceName `field:"optional" json:"awsService" yaml:"awsService"`
	// IPAM Pool resource name to be used for tagging.
	// Default: - autogenerated by CDK if not provided.
	//
	// Experimental.
	IpamPoolName *string `field:"optional" json:"ipamPoolName" yaml:"ipamPoolName"`
	// Information about the CIDRs provisioned to the pool.
	// Default: - No CIDRs are provisioned.
	//
	// Experimental.
	Ipv4ProvisionedCidrs *[]*string `field:"optional" json:"ipv4ProvisionedCidrs" yaml:"ipv4ProvisionedCidrs"`
	// The locale (AWS Region) of the pool.
	//
	// Should be one of the IPAM operating region.
	//  Only resources in the same Region as the locale of the pool can get IP address allocations from the pool.
	// You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region.
	// Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.
	// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipampool.html#cfn-ec2-ipampool-locale
	//
	// Default: - Current operating region of IPAM.
	//
	// Experimental.
	Locale *string `field:"optional" json:"locale" yaml:"locale"`
	// The IP address source for pools in the public scope.
	//
	// Only used for IPv6 address
	// Only allowed values to this are 'byoip' or 'amazon'.
	// Default: amazon.
	//
	// Experimental.
	PublicIpSource IpamPoolPublicIpSource `field:"optional" json:"publicIpSource" yaml:"publicIpSource"`
}

