Class: AWSCDK::EC2::CfnIPAMPoolProps

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

Overview

Properties for defining a CfnIPAMPool.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address_family:, ipam_scope_id:, allocation_default_netmask_length: nil, allocation_max_netmask_length: nil, allocation_min_netmask_length: nil, allocation_resource_tags: nil, auto_import: nil, aws_service: nil, description: nil, locale: nil, provisioned_cidrs: nil, public_ip_source: nil, publicly_advertisable: nil, source_ipam_pool_id: nil, source_resource: nil, tags: nil) ⇒ CfnIPAMPoolProps

Returns a new instance of CfnIPAMPoolProps.

Parameters:

  • address_family (String)

    The address family of the pool.

  • ipam_scope_id (String)

    The ID of the scope in which you would like to create the IPAM pool.

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

    The default netmask length for allocations added to this pool.

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

    The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant.

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

    The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant.

  • allocation_resource_tags (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::CfnTag>, nil) (defaults to: nil)

    Tags that are required for resources that use CIDRs from this IPAM pool.

  • auto_import (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.

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

    Limits which service in AWS that the pool can be used in.

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

    The description of the IPAM pool.

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

    The locale of the IPAM pool.

  • provisioned_cidrs (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EC2::CfnIPAMPool::ProvisionedCIDRProperty>, nil) (defaults to: nil)

    Information about the CIDRs provisioned to an IPAM pool.

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

    The IP address source for pools in the public scope.

  • publicly_advertisable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Determines if a pool is publicly advertisable.

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

    The ID of the source IPAM pool.

  • source_resource (AWSCDK::IResolvable, AWSCDK::EC2::CfnIPAMPool::SourceResourceProperty, nil) (defaults to: nil)

    The resource used to provision CIDRs to a resource planning pool.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The key/value combination of a tag assigned to the resource.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'ec2/cfn_ipam_pool_props.rb', line 25

def initialize(address_family:, ipam_scope_id:, allocation_default_netmask_length: nil, allocation_max_netmask_length: nil, allocation_min_netmask_length: nil, allocation_resource_tags: nil, auto_import: nil, aws_service: nil, description: nil, locale: nil, provisioned_cidrs: nil, public_ip_source: nil, publicly_advertisable: nil, source_ipam_pool_id: nil, source_resource: nil, tags: nil)
  @address_family = address_family
  Jsii::Type.check_type(@address_family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "addressFamily")
  @ipam_scope_id = ipam_scope_id
  Jsii::Type.check_type(@ipam_scope_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipamScopeId")
  @allocation_default_netmask_length = allocation_default_netmask_length
  Jsii::Type.check_type(@allocation_default_netmask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "allocationDefaultNetmaskLength") unless @allocation_default_netmask_length.nil?
  @allocation_max_netmask_length = allocation_max_netmask_length
  Jsii::Type.check_type(@allocation_max_netmask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "allocationMaxNetmaskLength") unless @allocation_max_netmask_length.nil?
  @allocation_min_netmask_length = allocation_min_netmask_length
  Jsii::Type.check_type(@allocation_min_netmask_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "allocationMinNetmaskLength") unless @allocation_min_netmask_length.nil?
  @allocation_resource_tags = allocation_resource_tags
  Jsii::Type.check_type(@allocation_resource_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "allocationResourceTags") unless @allocation_resource_tags.nil?
  @auto_import = auto_import
  Jsii::Type.check_type(@auto_import, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoImport") unless @auto_import.nil?
  @aws_service = aws_service
  Jsii::Type.check_type(@aws_service, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "awsService") unless @aws_service.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @locale = locale
  Jsii::Type.check_type(@locale, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "locale") unless @locale.nil?
  @provisioned_cidrs = provisioned_cidrs
  Jsii::Type.check_type(@provisioned_cidrs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbklQQU1Qb29sLlByb3Zpc2lvbmVkQ2lkclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "provisionedCidrs") unless @provisioned_cidrs.nil?
  @public_ip_source = public_ip_source
  Jsii::Type.check_type(@public_ip_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "publicIpSource") unless @public_ip_source.nil?
  @publicly_advertisable = publicly_advertisable
  Jsii::Type.check_type(@publicly_advertisable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "publiclyAdvertisable") unless @publicly_advertisable.nil?
  @source_ipam_pool_id = source_ipam_pool_id
  Jsii::Type.check_type(@source_ipam_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceIpamPoolId") unless @source_ipam_pool_id.nil?
  @source_resource = source_resource.is_a?(Hash) ? ::AWSCDK::EC2::CfnIPAMPool::SourceResourceProperty.new(**source_resource.transform_keys(&:to_sym)) : source_resource
  Jsii::Type.check_type(@source_resource, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuSVBBTVBvb2wuU291cmNlUmVzb3VyY2VQcm9wZXJ0eSJ9XX19")), "sourceResource") unless @source_resource.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#address_familyString (readonly)

The address family of the pool.



64
65
66
# File 'ec2/cfn_ipam_pool_props.rb', line 64

def address_family
  @address_family
end

#allocation_default_netmask_lengthNumeric? (readonly)

The default netmask length for allocations added to this pool.

If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.



76
77
78
# File 'ec2/cfn_ipam_pool_props.rb', line 76

def allocation_default_netmask_length
  @allocation_default_netmask_length
end

#allocation_max_netmask_lengthNumeric? (readonly)

The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant.

The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.



83
84
85
# File 'ec2/cfn_ipam_pool_props.rb', line 83

def allocation_max_netmask_length
  @allocation_max_netmask_length
end

#allocation_min_netmask_lengthNumeric? (readonly)

The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant.

The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.



90
91
92
# File 'ec2/cfn_ipam_pool_props.rb', line 90

def allocation_min_netmask_length
  @allocation_min_netmask_length
end

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

Tags that are required for resources that use CIDRs from this IPAM pool.

Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.



97
98
99
# File 'ec2/cfn_ipam_pool_props.rb', line 97

def allocation_resource_tags
  @allocation_resource_tags
end

#auto_importBoolean, ... (readonly)

If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM.

The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

A locale must be set on the pool for this feature to work.



106
107
108
# File 'ec2/cfn_ipam_pool_props.rb', line 106

def auto_import
  @auto_import
end

#aws_serviceString? (readonly)

Limits which service in AWS that the pool can be used in.

"ec2", for example, allows users to use space for Elastic IP addresses and VPCs.



113
114
115
# File 'ec2/cfn_ipam_pool_props.rb', line 113

def aws_service
  @aws_service
end

#descriptionString? (readonly)

The description of the IPAM pool.



118
119
120
# File 'ec2/cfn_ipam_pool_props.rb', line 118

def description
  @description
end

#ipam_scope_idString (readonly)

The ID of the scope in which you would like to create the IPAM pool.



69
70
71
# File 'ec2/cfn_ipam_pool_props.rb', line 69

def ipam_scope_id
  @ipam_scope_id
end

#localeString? (readonly)

The locale of the IPAM pool.

The locale for the pool should be one of the following:

  • An AWS Region where you want this IPAM pool to be available for allocations.
  • The network border group for an AWS Local Zone where you want this IPAM pool to be available for allocations ( supported Local Zones ). This option is only available for IPAM IPv4 pools in the public scope.

If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.



130
131
132
# File 'ec2/cfn_ipam_pool_props.rb', line 130

def locale
  @locale
end

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

Information about the CIDRs provisioned to an IPAM pool.



135
136
137
# File 'ec2/cfn_ipam_pool_props.rb', line 135

def provisioned_cidrs
  @provisioned_cidrs
end

#public_ip_sourceString? (readonly)

The IP address source for pools in the public scope.

Only used for provisioning IP address CIDRs to pools in the public scope. Default is BYOIP . For more information, see Create IPv6 pools in the Amazon VPC IPAM User Guide . By default, you can add only one Amazon-provided IPv6 CIDR block to a top-level IPv6 pool. For information on increasing the default limit, see Quotas for your IPAM in the Amazon VPC IPAM User Guide .



142
143
144
# File 'ec2/cfn_ipam_pool_props.rb', line 142

def public_ip_source
  @public_ip_source
end

#publicly_advertisableBoolean, ... (readonly)

Determines if a pool is publicly advertisable.

This option is not available for pools with AddressFamily set to ipv4 .



149
150
151
# File 'ec2/cfn_ipam_pool_props.rb', line 149

def publicly_advertisable
  @publicly_advertisable
end

#source_ipam_pool_idString? (readonly)

The ID of the source IPAM pool.

You can use this option to create an IPAM pool within an existing source pool.



156
157
158
# File 'ec2/cfn_ipam_pool_props.rb', line 156

def source_ipam_pool_id
  @source_ipam_pool_id
end

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

The resource used to provision CIDRs to a resource planning pool.



161
162
163
# File 'ec2/cfn_ipam_pool_props.rb', line 161

def source_resource
  @source_resource
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The key/value combination of a tag assigned to the resource.

Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.



168
169
170
# File 'ec2/cfn_ipam_pool_props.rb', line 168

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'ec2/cfn_ipam_pool_props.rb', line 170

def self.jsii_properties
  {
    :address_family => "addressFamily",
    :ipam_scope_id => "ipamScopeId",
    :allocation_default_netmask_length => "allocationDefaultNetmaskLength",
    :allocation_max_netmask_length => "allocationMaxNetmaskLength",
    :allocation_min_netmask_length => "allocationMinNetmaskLength",
    :allocation_resource_tags => "allocationResourceTags",
    :auto_import => "autoImport",
    :aws_service => "awsService",
    :description => "description",
    :locale => "locale",
    :provisioned_cidrs => "provisionedCidrs",
    :public_ip_source => "publicIpSource",
    :publicly_advertisable => "publiclyAdvertisable",
    :source_ipam_pool_id => "sourceIpamPoolId",
    :source_resource => "sourceResource",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'ec2/cfn_ipam_pool_props.rb', line 191

def to_jsii
  result = {}
  result.merge!({
    "addressFamily" => @address_family,
    "ipamScopeId" => @ipam_scope_id,
    "allocationDefaultNetmaskLength" => @allocation_default_netmask_length,
    "allocationMaxNetmaskLength" => @allocation_max_netmask_length,
    "allocationMinNetmaskLength" => @allocation_min_netmask_length,
    "allocationResourceTags" => @allocation_resource_tags,
    "autoImport" => @auto_import,
    "awsService" => @aws_service,
    "description" => @description,
    "locale" => @locale,
    "provisionedCidrs" => @provisioned_cidrs,
    "publicIpSource" => @public_ip_source,
    "publiclyAdvertisable" => @publicly_advertisable,
    "sourceIpamPoolId" => @source_ipam_pool_id,
    "sourceResource" => @source_resource,
    "tags" => @tags,
  })
  result.compact
end