create_ipam_pool
¶
create_ipam_pool(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
ipam_scope_id: Optional[IpamScopeId] = None,
locale: Optional[String] = None,
source_ipam_pool_id: Optional[IpamPoolId] = None,
description: Optional[String] = None,
address_family: Optional[AddressFamily] = None,
auto_import: Optional[Boolean] = None,
publicly_advertisable: Optional[Boolean] = None,
allocation_min_netmask_length: Optional[IpamNetmaskLength] = None,
allocation_max_netmask_length: Optional[IpamNetmaskLength] = None,
allocation_default_netmask_length: Optional[IpamNetmaskLength] = None,
allocation_resource_tags: Optional[RequestIpamResourceTagList] = None,
tag_specifications: Optional[TagSpecificationList] = None,
client_token: Optional[String] = None,
aws_service: Optional[IpamPoolAwsService] = None,
public_ip_source: Optional[IpamPoolPublicIpSource] = None,
source_resource: Optional[IpamPoolSourceResourceRequest] = None,
) -> CreateIpamPoolResult
Create an IP address pool for Amazon VPC IP Address Manager (IPAM). In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each.
For more information, see Create a top-level pool in the Amazon VPC IPAM User Guide.
Parameters:
-
dry_run(Optional[Boolean], default:None) –A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
ipam_scope_id(Optional[IpamScopeId], default:None) –The ID of the scope in which you would like to create the IPAM pool.
-
locale(Optional[String], default:None) –The locale for the pool should be one of the following:
-
An Amazon Web Services Region where you want this IPAM pool to be available for allocations.
-
The network border group for an Amazon Web Services Local Zone where you want this IPAM pool to be available for allocations (supported Local Zones). This option is only available for IPAM IPv4 pools in the public scope.
Possible values: Any Amazon Web Services Region or supported Amazon Web Services Local Zone. Default is
noneand means any locale. -
-
source_ipam_pool_id(Optional[IpamPoolId], default:None) –The ID of the source IPAM pool. Use this option to create a pool within an existing pool. Note that the CIDR you provision for the pool within the source pool must be available in the source pool's CIDR range.
-
description(Optional[String], default:None) –A description for the IPAM pool.
-
address_family(Optional[AddressFamily], default:None) –The IP protocol assigned to this IPAM pool. You must choose either IPv4 or IPv6 protocol for a pool.
-
auto_import(Optional[Boolean], default:None) –If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.
A locale must be set on the pool for this feature to work.
-
publicly_advertisable(Optional[Boolean], default:None) –Determines if the pool is publicly advertisable. The request can only contain
PubliclyAdvertisableifAddressFamilyisipv6andPublicIpSourceisbyoip. -
allocation_min_netmask_length(Optional[IpamNetmaskLength], default:None) –The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
-
allocation_max_netmask_length(Optional[IpamNetmaskLength], default:None) –The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
-
allocation_default_netmask_length(Optional[IpamNetmaskLength], default:None) –The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
-
allocation_resource_tags(Optional[RequestIpamResourceTagList], default:None) –Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
Ownerand the valueTeamA, specifytag:Ownerfor the filter name andTeamAfor the filter value. -
client_token(Optional[String], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
-
aws_service(Optional[IpamPoolAwsService], default:None) –Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
-
public_ip_source(Optional[IpamPoolPublicIpSource], default:None) –The IP address source for pools in the public scope. Only used for provisioning IP address CIDRs to pools in the public scope. Default is
byoip. For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide. By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool if PublicIpSource isamazon. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide. -
source_resource(Optional[IpamPoolSourceResourceRequest], default:None) –The resource used to provision CIDRs to a resource planning pool.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 | |