Skip to content

EC2  >  Operations  >  modify_ipam_policy_allocation_rules

modify_ipam_policy_allocation_rules

Operation

modify_ipam_policy_allocation_rules async

modify_ipam_policy_allocation_rules(input: ModifyIpamPolicyAllocationRulesInput, plugins: list[Plugin] | None = None) -> ModifyIpamPolicyAllocationRulesOutput

Modifies the allocation rules in 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
input ModifyIpamPolicyAllocationRulesInput

An instance of ModifyIpamPolicyAllocationRulesInput.

required
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
ModifyIpamPolicyAllocationRulesOutput

An instance of ModifyIpamPolicyAllocationRulesOutput.

Input

ModifyIpamPolicyAllocationRulesInput dataclass

Bases: _SerdeShape

Dataclass for ModifyIpamPolicyAllocationRulesInput structure.

Attributes

allocation_rules class-attribute instance-attribute
allocation_rules: list[IpamPolicyAllocationRuleRequest] | None = ...

The new allocation rules to apply to the IPAM policy.

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.

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_policy_id class-attribute instance-attribute
ipam_policy_id: str | None = ...

The ID of the IPAM policy whose allocation rules you want to modify.

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

The locale for which to modify the allocation rules.

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

The resource type for which to modify 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

ModifyIpamPolicyAllocationRulesOutput dataclass

Bases: _SerdeShape

Dataclass for ModifyIpamPolicyAllocationRulesOutput structure.

Attributes

ipam_policy_document class-attribute instance-attribute
ipam_policy_document: IpamPolicyDocument | None = ...

The modified IPAM policy containing the updated allocation rules.

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.