allocate_ipam_pool_cidr
¶
allocate_ipam_pool_cidr(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
ipam_pool_id: Optional[IpamPoolId] = None,
cidr: Optional[String] = None,
netmask_length: Optional[Integer] = None,
client_token: Optional[String] = None,
description: Optional[String] = None,
preview_next_cidr: Optional[Boolean] = None,
allowed_cidrs: Optional[IpamPoolAllocationAllowedCidrs] = None,
disallowed_cidrs: Optional[IpamPoolAllocationDisallowedCidrs] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> AllocateIpamPoolCidrResult
Allocate a CIDR from an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations.
In IPAM, an allocation is a CIDR assignment from an IPAM pool to another IPAM pool or to a resource. For more information, see Allocate CIDRs in the Amazon VPC IPAM User Guide.
This action creates an allocation with strong consistency. The returned CIDR will not overlap with any other allocations from the same pool.
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_pool_id(Optional[IpamPoolId], default:None) –The ID of the IPAM pool from which you would like to allocate a CIDR.
-
cidr(Optional[String], default:None) –The CIDR you would like to allocate from the IPAM pool. Note the following:
-
If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
-
If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible values: Any available IPv4 or IPv6 CIDR.
-
-
netmask_length(Optional[Integer], default:None) –The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:
-
If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
-
If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
-
-
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.
-
description(Optional[String], default:None) –A description for the allocation.
-
preview_next_cidr(Optional[Boolean], default:None) –A preview of the next available CIDR in a pool.
-
allowed_cidrs(Optional[IpamPoolAllocationAllowedCidrs], default:None) –Include a particular CIDR range that can be returned by the pool. Allowed CIDRs are only allowed if using netmask length for allocation.
-
disallowed_cidrs(Optional[IpamPoolAllocationDisallowedCidrs], default:None) –Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using netmask length for allocation.
-
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.If you specify tags, the request is authorized against the allocation resource in addition to the pool resource.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 | |