Class: AWSCDK::EC2::CfnIPAMAllocationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnIPAMAllocationProps
- Defined in:
- ec2/cfn_ipam_allocation_props.rb
Overview
Properties for defining a CfnIPAMAllocation.
Instance Attribute Summary collapse
-
#cidr ⇒ String?
readonly
The CIDR you would like to allocate from the IPAM pool.
-
#description ⇒ String?
readonly
A description for the allocation.
-
#ipam_pool_id ⇒ String
readonly
The ID of the IPAM pool from which you would like to allocate a CIDR.
-
#netmask_length ⇒ Numeric?
readonly
The netmask length of the CIDR you would like to allocate from the IPAM pool.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ipam_pool_id:, cidr: nil, description: nil, netmask_length: nil) ⇒ CfnIPAMAllocationProps
constructor
A new instance of CfnIPAMAllocationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(ipam_pool_id:, cidr: nil, description: nil, netmask_length: nil) ⇒ CfnIPAMAllocationProps
Returns a new instance of CfnIPAMAllocationProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 13 def initialize(ipam_pool_id:, cidr: nil, description: 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? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.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
#cidr ⇒ String? (readonly)
The CIDR you would like to allocate from the IPAM pool. Note the following:.
- If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
- If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible values: Any available IPv4 or IPv6 CIDR.
38 39 40 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 38 def cidr @cidr end |
#description ⇒ String? (readonly)
A description for the allocation.
43 44 45 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 43 def description @description end |
#ipam_pool_id ⇒ String (readonly)
The ID of the IPAM pool from which you would like to allocate a CIDR.
28 29 30 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 28 def ipam_pool_id @ipam_pool_id end |
#netmask_length ⇒ Numeric? (readonly)
The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:.
- If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
- If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
53 54 55 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 53 def netmask_length @netmask_length end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 55 def self.jsii_properties { :ipam_pool_id => "ipamPoolId", :cidr => "cidr", :description => "description", :netmask_length => "netmaskLength", } end |
Instance Method Details
#to_jsii ⇒ Object
64 65 66 67 68 69 70 71 72 73 |
# File 'ec2/cfn_ipam_allocation_props.rb', line 64 def to_jsii result = {} result.merge!({ "ipamPoolId" => @ipam_pool_id, "cidr" => @cidr, "description" => @description, "netmaskLength" => @netmask_length, }) result.compact end |