Class: AWSCDK::EC2::CfnIPAMPoolCIDRProps

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

Overview

Properties for defining a CfnIPAMPoolCidr.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ipam_pool_id:, cidr: nil, netmask_length: nil) ⇒ CfnIPAMPoolCIDRProps

Returns a new instance of CfnIPAMPoolCIDRProps.

Parameters:

  • ipam_pool_id (String)

    The ID of the IPAM pool.

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

    The CIDR provisioned to the IPAM pool.

  • netmask_length (Numeric, nil) (defaults to: nil)

    The netmask length of the CIDR you'd like to provision to a pool.



12
13
14
15
16
17
18
19
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 12

def initialize(ipam_pool_id:, cidr: nil, netmask_length: nil)
  @ipam_pool_id = ipam_pool_id
  Jsii::Type.check_type(@ipam_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipamPoolId")
  @cidr = cidr
  Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr") unless @cidr.nil?
  @netmask_length = netmask_length
  Jsii::Type.check_type(@netmask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "netmaskLength") unless @netmask_length.nil?
end

Instance Attribute Details

#cidrString? (readonly)

The CIDR provisioned to the IPAM pool.

A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .



32
33
34
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 32

def cidr
  @cidr
end

#ipam_pool_idString (readonly)

The ID of the IPAM pool.



25
26
27
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 25

def ipam_pool_id
  @ipam_pool_id
end

#netmask_lengthNumeric? (readonly)

The netmask length of the CIDR you'd like to provision to a pool.

Can be used for provisioning Amazon-provided IPv6 CIDRs to top-level pools and for provisioning CIDRs to pools with source pools. Cannot be used to provision BYOIP CIDRs to top-level pools. "NetmaskLength" or "Cidr" is required.



39
40
41
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 39

def netmask_length
  @netmask_length
end

Class Method Details

.jsii_propertiesObject



41
42
43
44
45
46
47
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 41

def self.jsii_properties
  {
    :ipam_pool_id => "ipamPoolId",
    :cidr => "cidr",
    :netmask_length => "netmaskLength",
  }
end

Instance Method Details

#to_jsiiObject



49
50
51
52
53
54
55
56
57
# File 'ec2/cfn_ipam_pool_cidr_props.rb', line 49

def to_jsii
  result = {}
  result.merge!({
    "ipamPoolId" => @ipam_pool_id,
    "cidr" => @cidr,
    "netmaskLength" => @netmask_length,
  })
  result.compact
end