Skip to content

allocate_ipam_pool_cidr

Operation

allocate_ipam_pool_cidr

allocate_ipam_pool_cidr(request: AllocateIpamPoolCidrInput | AllocateIpamPoolCidrInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AllocateIpamPoolCidrInputDict]) -> AllocateIpamPoolCidrOutput

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.

Note

This action creates an allocation with strong consistency. The returned CIDR will not overlap with any other allocations from the same pool.

Parameters:

Name Type Description Default
request AllocateIpamPoolCidrInput | AllocateIpamPoolCidrInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[AllocateIpamPoolCidrInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
AllocateIpamPoolCidrOutput

An instance of AllocateIpamPoolCidrOutput.

allocate_ipam_pool_cidr async

allocate_ipam_pool_cidr(request: AllocateIpamPoolCidrInput | AllocateIpamPoolCidrInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[AllocateIpamPoolCidrInputDict]) -> AllocateIpamPoolCidrOutput

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.

Note

This action creates an allocation with strong consistency. The returned CIDR will not overlap with any other allocations from the same pool.

Parameters:

Name Type Description Default
request AllocateIpamPoolCidrInput | AllocateIpamPoolCidrInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[AllocateIpamPoolCidrInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
AllocateIpamPoolCidrOutput

An instance of AllocateIpamPoolCidrOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

AllocateIpamPoolCidrInputDict

Bases: TypedDict

Dictionary form of AllocateIpamPoolCidrInput.

Attributes

allowed_cidrs instance-attribute
allowed_cidrs: Sequence[str] | None

Include a particular CIDR range that can be returned by the pool. Allowed CIDRs are only allowed if using netmask length for allocation.

cidr instance-attribute
cidr: str | 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.

client_token instance-attribute
client_token: str | None

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

This field is autopopulated if not provided.

description instance-attribute
description: str | None

A description for the allocation.

disallowed_cidrs instance-attribute
disallowed_cidrs: Sequence[str] | None

Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using netmask length for allocation.

dry_run instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

ipam_pool_id instance-attribute
ipam_pool_id: Required[str]

The ID of the IPAM pool from which you would like to allocate a CIDR.

netmask_length instance-attribute
netmask_length: int | 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.

preview_next_cidr instance-attribute
preview_next_cidr: bool | None

A preview of the next available CIDR in a pool.

tag_specifications instance-attribute
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | 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 Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

If you specify tags, the request is authorized against the allocation resource in addition to the pool resource.

AllocateIpamPoolCidrInput dataclass

Bases: _SerdeShape

Dataclass for AllocateIpamPoolCidrInput structure.

Attributes

allowed_cidrs class-attribute instance-attribute
allowed_cidrs: list[str] | None = ...

Include a particular CIDR range that can be returned by the pool. Allowed CIDRs are only allowed if using netmask length for allocation.

cidr class-attribute instance-attribute
cidr: str | 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.

client_token class-attribute instance-attribute
client_token: str | None = ...

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

This field is autopopulated if not provided.

description class-attribute instance-attribute
description: str | None = ...

A description for the allocation.

disallowed_cidrs class-attribute instance-attribute
disallowed_cidrs: list[str] | None = ...

Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using netmask length for allocation.

dry_run class-attribute instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

ipam_pool_id class-attribute instance-attribute
ipam_pool_id: str | None = ...

The ID of the IPAM pool from which you would like to allocate a CIDR.

netmask_length class-attribute instance-attribute
netmask_length: int | 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.

preview_next_cidr class-attribute instance-attribute
preview_next_cidr: bool | None = ...

A preview of the next available CIDR in a pool.

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | 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 Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

If you specify tags, the request is authorized against the allocation resource in addition to the pool resource.

Output

AllocateIpamPoolCidrOutput dataclass

Bases: _SerdeShape

Dataclass for AllocateIpamPoolCidrOutput structure.

Attributes

ipam_pool_allocation class-attribute instance-attribute
ipam_pool_allocation: IpamPoolAllocation | None = ...

Information about the allocation created.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.