Class: AWSCDK::EC2::CfnIPAMPrefixListResolver::IpamPrefixListResolverRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnIPAMPrefixListResolver::IpamPrefixListResolverRuleProperty
- Defined in:
- ec2/cfn_ipam_prefix_list_resolver.rb
Overview
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.
Instance Attribute Summary collapse
-
#conditions ⇒ AWSCDK::IResolvable, ...
readonly
Two of the rule types allow you to add conditions to the rules.
-
#ipam_scope_id ⇒ String?
readonly
This rule will only match resources that are in this IPAM Scope.
-
#resource_type ⇒ String?
readonly
The resourceType property only applies to ipam-resource-cidr rules;.
-
#rule_type ⇒ String
readonly
There are three rule types: (1) Static CIDR: A fixed list of CIDRs that don't change (like a manual list replicated across Regions).
-
#static_cidr ⇒ String?
readonly
A fixed CIDR that doesn't change.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rule_type:, conditions: nil, ipam_scope_id: nil, resource_type: nil, static_cidr: nil) ⇒ IpamPrefixListResolverRuleProperty
constructor
A new instance of IpamPrefixListResolverRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(rule_type:, conditions: nil, ipam_scope_id: nil, resource_type: nil, static_cidr: nil) ⇒ IpamPrefixListResolverRuleProperty
Returns a new instance of IpamPrefixListResolverRuleProperty.
722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 722 def initialize(rule_type:, conditions: nil, ipam_scope_id: nil, resource_type: nil, static_cidr: nil) @rule_type = rule_type Jsii::Type.check_type(@rule_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleType") @conditions = conditions Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbklQQU1QcmVmaXhMaXN0UmVzb2x2ZXIuSXBhbVByZWZpeExpc3RSZXNvbHZlclJ1bGVDb25kaXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "conditions") unless @conditions.nil? @ipam_scope_id = ipam_scope_id Jsii::Type.check_type(@ipam_scope_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipamScopeId") unless @ipam_scope_id.nil? @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") unless @resource_type.nil? @static_cidr = static_cidr Jsii::Type.check_type(@static_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "staticCidr") unless @static_cidr.nil? end |
Instance Attribute Details
#conditions ⇒ AWSCDK::IResolvable, ... (readonly)
Two of the rule types allow you to add conditions to the rules.
(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.
748 749 750 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 748 def conditions @conditions end |
#ipam_scope_id ⇒ String? (readonly)
This rule will only match resources that are in this IPAM Scope.
753 754 755 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 753 def ipam_scope_id @ipam_scope_id end |
#resource_type ⇒ String? (readonly)
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.
760 761 762 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 760 def resource_type @resource_type end |
#rule_type ⇒ String (readonly)
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.
741 742 743 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 741 def rule_type @rule_type end |
#static_cidr ⇒ String? (readonly)
A fixed CIDR that doesn't change.
765 766 767 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 765 def static_cidr @static_cidr end |
Class Method Details
.jsii_properties ⇒ Object
767 768 769 770 771 772 773 774 775 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 767 def self.jsii_properties { :rule_type => "ruleType", :conditions => "conditions", :ipam_scope_id => "ipamScopeId", :resource_type => "resourceType", :static_cidr => "staticCidr", } end |
Instance Method Details
#to_jsii ⇒ Object
777 778 779 780 781 782 783 784 785 786 787 |
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 777 def to_jsii result = {} result.merge!({ "ruleType" => @rule_type, "conditions" => @conditions, "ipamScopeId" => @ipam_scope_id, "resourceType" => @resource_type, "staticCidr" => @static_cidr, }) result.compact end |