Skip to content
v2.278.0

IpamPrefixListResolverRuleProperty Struct ​

CIDR selection rules define the business logic for selecting CIDRs from IPAM.

If a CIDR matches any of the rules, it will be included. If a rule has multiple conditions, the CIDR has to match every condition of that rule. You can create a prefix list resolver without rules, but you'll need to add at least one rule before it can actually automate your prefix list updates.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const ipamPrefixListResolverRuleProperty: ec2.CfnIPAMPrefixListResolver.IpamPrefixListResolverRuleProperty = {
  ruleType: 'ruleType',

  // the properties below are optional
  conditions: [{
    operation: 'operation',

    // the properties below are optional
    cidr: 'cidr',
    ipamPoolId: 'ipamPoolId',
    resourceId: 'resourceId',
    resourceOwner: 'resourceOwner',
    resourceRegion: 'resourceRegion',
    resourceTag: {
      key: 'key',
      value: 'value',
    },
  }],
  ipamScopeId: 'ipamScopeId',
  resourceType: 'resourceType',
  staticCidr: 'staticCidr',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

ipam_prefix_list_resolver_rule_property = ec2.CfnIPAMPrefixListResolver.IpamPrefixListResolverRuleProperty(
    rule_type="ruleType",

    # the properties below are optional
    conditions=[ec2.CfnIPAMPrefixListResolver.IpamPrefixListResolverRuleConditionProperty(
        operation="operation",

        # the properties below are optional
        cidr="cidr",
        ipam_pool_id="ipamPoolId",
        resource_id="resourceId",
        resource_owner="resourceOwner",
        resource_region="resourceRegion",
        resource_tag=CfnTag(
            key="key",
            value="value"
        )
    )],
    ipam_scope_id="ipamScopeId",
    resource_type="resourceType",
    static_cidr="staticCidr"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

IpamPrefixListResolverRuleProperty ipamPrefixListResolverRuleProperty = IpamPrefixListResolverRuleProperty.builder()
        .ruleType("ruleType")

        // the properties below are optional
        .conditions(List.of(IpamPrefixListResolverRuleConditionProperty.builder()
                .operation("operation")

                // the properties below are optional
                .cidr("cidr")
                .ipamPoolId("ipamPoolId")
                .resourceId("resourceId")
                .resourceOwner("resourceOwner")
                .resourceRegion("resourceRegion")
                .resourceTag(CfnTag.builder()
                        .key("key")
                        .value("value")
                        .build())
                .build()))
        .ipamScopeId("ipamScopeId")
        .resourceType("resourceType")
        .staticCidr("staticCidr")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var ipamPrefixListResolverRuleProperty = new IpamPrefixListResolverRuleProperty {
    RuleType = "ruleType",

    // the properties below are optional
    Conditions = new [] { new IpamPrefixListResolverRuleConditionProperty {
        Operation = "operation",

        // the properties below are optional
        Cidr = "cidr",
        IpamPoolId = "ipamPoolId",
        ResourceId = "resourceId",
        ResourceOwner = "resourceOwner",
        ResourceRegion = "resourceRegion",
        ResourceTag = new CfnTag {
            Key = "key",
            Value = "value"
        }
    } },
    IpamScopeId = "ipamScopeId",
    ResourceType = "resourceType",
    StaticCidr = "staticCidr"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ipamPrefixListResolverRuleProperty := &IpamPrefixListResolverRuleProperty{
	RuleType: jsii.String("ruleType"),

	// the properties below are optional
	Conditions: []interface{}{
		&IpamPrefixListResolverRuleConditionProperty{
			Operation: jsii.String("operation"),

			// the properties below are optional
			Cidr: jsii.String("cidr"),
			IpamPoolId: jsii.String("ipamPoolId"),
			ResourceId: jsii.String("resourceId"),
			ResourceOwner: jsii.String("resourceOwner"),
			ResourceRegion: jsii.String("resourceRegion"),
			ResourceTag: &CfnTag{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
	},
	IpamScopeId: jsii.String("ipamScopeId"),
	ResourceType: jsii.String("resourceType"),
	StaticCidr: jsii.String("staticCidr"),
}

Properties ​

conditionsoptionalIResolvable | IResolvable | CfnIPAMPrefixListResolver.IpamPrefixListResolverRuleConditionProperty[]conditionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, IpamPrefixListResolverRuleConditionProperty]]]conditionsoptionalIResolvableConditionsoptionalIResolvableConditionsoptionalinterface{} #
Two of the rule types allow you to add conditions to the rules.
notes

(1) For IPAM Pool CIDR rules, you can specify an ipamPoolId; if not specified, the rule will apply to all IPAM Pool CIDRs in the scope. (2) For IPAM Resource CIDR rules, you can specify resourceId, resourceOwner, resourceRegion, cidr, or resourceTag.

ipamScopeIdoptionalstringipam_scope_idoptionalstripamScopeIdoptionalStringIpamScopeIdoptionalstringIpamScopeIdoptional*string #
This rule will only match resources that are in this IPAM Scope.
resourceTypeoptionalstringresource_typeoptionalstrresourceTypeoptionalStringResourceTypeoptionalstringResourceTypeoptional*string #
The resourceType property only applies to ipam-resource-cidr rules;

this property specifies what type of resources this rule will apply to, such as VPCs or Subnets.

ruleTypestringrule_typestrruleTypeStringRuleTypestringRuleType*string required #
There are three rule types: (1) Static CIDR: A fixed list of CIDRs that don't change (like a manual list replicated across Regions).

(2) IPAM pool CIDR: CIDRs from specific IPAM pools (like all CIDRs from your IPAM production pool). (3) IPAM resource CIDR: CIDRs for AWS resources like VPCs, subnets, and EIPs within a specific IPAM scope.

staticCidroptionalstringstatic_cidroptionalstrstaticCidroptionalStringStaticCidroptionalstringStaticCidroptional*string #
A fixed CIDR that doesn't change.