EC2 / Client / modify_ipam_policy_allocation_rules
modify_ipam_policy_allocation_rules¶
- EC2.Client.modify_ipam_policy_allocation_rules(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.modify_ipam_policy_allocation_rules( DryRun=True|False, IpamPolicyId='string', Locale='string', ResourceType='alb'|'eip'|'rds'|'rnat', AllocationRules=[ { 'SourceIpamPoolId': 'string' }, ] )
- Parameters:
DryRun (boolean) – 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.IpamPolicyId (string) –
[REQUIRED]
The ID of the IPAM policy whose allocation rules you want to modify.
Locale (string) –
[REQUIRED]
The locale for which to modify the allocation rules.
ResourceType (string) –
[REQUIRED]
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
AllocationRules (list) –
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.
(dict) –
Information about a requested IPAM policy allocation rule.
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.
SourceIpamPoolId (string) –
The ID of the source IPAM pool for the requested allocation rule.
An IPAM pool is a collection of IP addresses in IPAM that can be allocated to Amazon Web Services resources.
- Return type:
dict
- Returns:
Response Syntax
{ 'IpamPolicyDocument': { 'IpamPolicyId': 'string', 'Locale': 'string', 'ResourceType': 'alb'|'eip'|'rds'|'rnat', 'AllocationRules': [ { 'SourceIpamPoolId': 'string' }, ] } }
Response Structure
(dict) –
IpamPolicyDocument (dict) –
The modified IPAM policy containing the updated allocation rules.
IpamPolicyId (string) –
The ID of the IPAM policy.
Locale (string) –
The locale of the IPAM policy document.
ResourceType (string) –
The resource type of the IPAM policy document.
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
AllocationRules (list) –
The allocation rules in the IPAM policy document.
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.
(dict) –
Information about an IPAM policy allocation rule.
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.
SourceIpamPoolId (string) –
The ID of the source IPAM pool for the allocation rule.
An IPAM pool is a collection of IP addresses in IPAM that can be allocated to Amazon Web Services resources.