Skip to content

EC2  >  Operations  >  get_ipam_policy_allocation_rules

get_ipam_policy_allocation_rules

Operation

get_ipam_policy_allocation_rules async

get_ipam_policy_allocation_rules(request: GetIpamPolicyAllocationRulesInput | GetIpamPolicyAllocationRulesInputDict, /, *, plugins: list[Plugin] | None = None) -> GetIpamPolicyAllocationRulesOutput
get_ipam_policy_allocation_rules(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetIpamPolicyAllocationRulesInputDict]) -> GetIpamPolicyAllocationRulesOutput

Gets the allocation rules for an IPAM policy.

An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations.

Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

Parameters:

Name Type Description Default
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

Returns:

Type Description
GetIpamPolicyAllocationRulesOutput

An instance of GetIpamPolicyAllocationRulesOutput.

Input

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

Model

GetIpamPolicyAllocationRulesInput dataclass

Bases: _SerdeShape

Dataclass for GetIpamPolicyAllocationRulesInput structure.

Attributes
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.

filters class-attribute instance-attribute
filters: list[Filter] | None = ...

One or more filters for the allocation rules.

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

The ID of the IPAM policy for which to get allocation rules.

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

The locale for which to get the allocation rules.

max_results class-attribute instance-attribute
max_results: int | None = ...

The maximum number of results to return in a single call.

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

The token for the next page of results.

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

The resource type for which to get the allocation rules.

The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

  • Elastic IP addresses

Dictionaries

GetIpamPolicyAllocationRulesInputDict

Bases: TypedDict

Dictionary form of GetIpamPolicyAllocationRulesInput.

Attributes
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.

filters instance-attribute
filters: Sequence[Filter | FilterDict] | None

One or more filters for the allocation rules.

ipam_policy_id instance-attribute
ipam_policy_id: Required[str]

The ID of the IPAM policy for which to get allocation rules.

locale instance-attribute
locale: str | None

The locale for which to get the allocation rules.

max_results instance-attribute
max_results: int | None

The maximum number of results to return in a single call.

next_token instance-attribute
next_token: str | None

The token for the next page of results.

resource_type instance-attribute
resource_type: str | None

The resource type for which to get the allocation rules.

The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

  • Elastic IP addresses

Output

GetIpamPolicyAllocationRulesOutput dataclass

Bases: _SerdeShape

Dataclass for GetIpamPolicyAllocationRulesOutput structure.

Attributes

ipam_policy_documents class-attribute instance-attribute
ipam_policy_documents: list[IpamPolicyDocument] | None = ...

The IPAM policy documents containing the allocation rules.

Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

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

The token to use to retrieve the next page of results.

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.