associate_vpc_cidr_block
¶
associate_vpc_cidr_block(
*,
config_overrides: Optional[EC2ClientConfig] = None,
cidr_block: Optional[String] = None,
ipv6_cidr_block_network_border_group: Optional[String] = None,
ipv6_pool: Optional[Ipv6PoolEc2Id] = None,
ipv6_cidr_block: Optional[String] = None,
ipv4_ipam_pool_id: Optional[IpamPoolId] = None,
ipv4_netmask_length: Optional[NetmaskLength] = None,
ipv6_ipam_pool_id: Optional[IpamPoolId] = None,
ipv6_netmask_length: Optional[NetmaskLength] = None,
vpc_id: Optional[VpcId] = None,
amazon_provided_ipv6_cidr_block: Optional[Boolean] = None,
) -> AssociateVpcCidrBlockResult
Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP).
You must specify one of the following in the request: an IPv4 CIDR block, an IPv6 pool, or an Amazon-provided IPv6 CIDR block.
For more information about associating CIDR blocks with your VPC and applicable restrictions, see IP addressing for your VPCs and subnets in the Amazon VPC User Guide.
Parameters:
-
cidr_block(Optional[String], default:None) –An IPv4 CIDR block to associate with the VPC.
-
ipv6_cidr_block_network_border_group(Optional[String], default:None) –The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the CIDR block to this location.
You must set
AmazonProvidedIpv6CidrBlocktotrueto use this parameter.You can have one IPv6 CIDR block association per network border group.
-
ipv6_pool(Optional[Ipv6PoolEc2Id], default:None) –The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
-
ipv6_cidr_block(Optional[String], default:None) –An IPv6 CIDR block from the IPv6 address pool. You must also specify
Ipv6Poolin the request.To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
-
ipv4_ipam_pool_id(Optional[IpamPoolId], default:None) –Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide.
-
ipv4_netmask_length(Optional[NetmaskLength], default:None) –The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide.
-
ipv6_ipam_pool_id(Optional[IpamPoolId], default:None) –Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide.
-
ipv6_netmask_length(Optional[NetmaskLength], default:None) –The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide.
-
vpc_id(Optional[VpcId], default:None) –The ID of the VPC.
-
amazon_provided_ipv6_cidr_block(Optional[Boolean], default:None) –Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses or the size of the CIDR block.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 | |