Class: AWSCDK::EC2::CfnIPAMPrefixListResolver::IpamPrefixListResolverRuleConditionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_ipam_prefix_list_resolver.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation:, cidr: nil, ipam_pool_id: nil, resource_id: nil, resource_owner: nil, resource_region: nil, resource_tag: nil) ⇒ IpamPrefixListResolverRuleConditionProperty

Returns a new instance of IpamPrefixListResolverRuleConditionProperty.

Parameters:

  • operation (String)

    Equals, Not equals, or Subnet Of.

  • cidr (String, nil) (defaults to: nil)

    Condition for the IPAM Resource CIDR rule type.

  • ipam_pool_id (String, nil) (defaults to: nil)

    Condition for the IPAM Pool CIDR rule type.

  • resource_id (String, nil) (defaults to: nil)

    Condition for the IPAM Resource CIDR rule type.

  • resource_owner (String, nil) (defaults to: nil)

    Condition for the IPAM Resource CIDR rule type.

  • resource_region (String, nil) (defaults to: nil)

    Condition for the IPAM Resource CIDR rule type.

  • resource_tag (AWSCDK::IResolvable, AWSCDK::CfnTag, nil) (defaults to: nil)

    A key-value pair to associate with a resource.



617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 617

def initialize(operation:, cidr: nil, ipam_pool_id: nil, resource_id: nil, resource_owner: nil, resource_region: nil, resource_tag: nil)
  @operation = operation
  Jsii::Type.check_type(@operation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operation")
  @cidr = cidr
  Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") unless @cidr.nil?
  @ipam_pool_id = ipam_pool_id
  Jsii::Type.check_type(@ipam_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipamPoolId") unless @ipam_pool_id.nil?
  @resource_id = resource_id
  Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId") unless @resource_id.nil?
  @resource_owner = resource_owner
  Jsii::Type.check_type(@resource_owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceOwner") unless @resource_owner.nil?
  @resource_region = resource_region
  Jsii::Type.check_type(@resource_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceRegion") unless @resource_region.nil?
  @resource_tag = resource_tag.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**resource_tag.transform_keys(&:to_sym)) : resource_tag
  Jsii::Type.check_type(@resource_tag, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9XX19")), "resourceTag") unless @resource_tag.nil?
end

Instance Attribute Details

#cidrString? (readonly)

Condition for the IPAM Resource CIDR rule type.

CIDR (like 10.24.34.0/23).



647
648
649
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 647

def cidr
  @cidr
end

#ipam_pool_idString? (readonly)

Condition for the IPAM Pool CIDR rule type.

If not chosen, the resolver applies to all IPAM Pool CIDRs in the scope.



654
655
656
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 654

def ipam_pool_id
  @ipam_pool_id
end

#operationString (readonly)

Equals, Not equals, or Subnet Of.

The subnet-of operation only applies to cidr conditions.



640
641
642
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 640

def operation
  @operation
end

#resource_idString? (readonly)

Condition for the IPAM Resource CIDR rule type.

The unique ID of a resource (like vpc-1234567890abcdef0).



661
662
663
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 661

def resource_id
  @resource_id
end

#resource_ownerString? (readonly)

Condition for the IPAM Resource CIDR rule type.

Resource owner (like 111122223333).



668
669
670
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 668

def resource_owner
  @resource_owner
end

#resource_regionString? (readonly)

Condition for the IPAM Resource CIDR rule type.

Resource region (like us-east-1).



675
676
677
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 675

def resource_region
  @resource_region
end

#resource_tagAWSCDK::IResolvable, ... (readonly)

A key-value pair to associate with a resource.



680
681
682
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 680

def resource_tag
  @resource_tag
end

Class Method Details

.jsii_propertiesObject



682
683
684
685
686
687
688
689
690
691
692
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 682

def self.jsii_properties
  {
    :operation => "operation",
    :cidr => "cidr",
    :ipam_pool_id => "ipamPoolId",
    :resource_id => "resourceId",
    :resource_owner => "resourceOwner",
    :resource_region => "resourceRegion",
    :resource_tag => "resourceTag",
  }
end

Instance Method Details

#to_jsiiObject



694
695
696
697
698
699
700
701
702
703
704
705
706
# File 'ec2/cfn_ipam_prefix_list_resolver.rb', line 694

def to_jsii
  result = {}
  result.merge!({
    "operation" => @operation,
    "cidr" => @cidr,
    "ipamPoolId" => @ipam_pool_id,
    "resourceId" => @resource_id,
    "resourceOwner" => @resource_owner,
    "resourceRegion" => @resource_region,
    "resourceTag" => @resource_tag,
  })
  result.compact
end