Class: AWSCDK::EC2::CfnNetworkInterfaceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNetworkInterfaceProps
- Defined in:
- ec2/cfn_network_interface_props.rb
Overview
Properties for defining a CfnNetworkInterface.
Instance Attribute Summary collapse
-
#connection_tracking_specification ⇒ AWSCDK::IResolvable, ...
readonly
A connection tracking specification for the network interface.
-
#description ⇒ String?
readonly
A description for the network interface.
-
#enable_primary_ipv6 ⇒ Boolean, ...
readonly
If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
-
#group_set ⇒ Array<String, AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>?
readonly
The IDs of the security groups associated with this network interface.
-
#interface_type ⇒ String?
readonly
The type of network interface.
-
#ipv4_prefix_count ⇒ Numeric?
readonly
The number of IPv4 prefixes to be automatically assigned to the network interface.
-
#ipv4_prefixes ⇒ AWSCDK::IResolvable, ...
readonly
The IPv4 delegated prefixes that are assigned to the network interface.
-
#ipv6_address_count ⇒ Numeric?
readonly
The number of IPv6 addresses to assign to the network interface.
-
#ipv6_addresses ⇒ AWSCDK::IResolvable, ...
readonly
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
-
#ipv6_prefix_count ⇒ Numeric?
readonly
The number of IPv6 prefixes to be automatically assigned to the network interface.
-
#ipv6_prefixes ⇒ AWSCDK::IResolvable, ...
readonly
The IPv6 delegated prefixes that are assigned to the network interface.
-
#private_ip_address ⇒ String?
readonly
The private IPv4 address to assign to the network interface as the primary private IP address.
-
#private_ip_addresses ⇒ AWSCDK::IResolvable, ...
readonly
The private IPv4 addresses to assign to the network interface.
-
#public_ip_dns_hostname_type_specification ⇒ String?
readonly
Public IP DNS hostname type.
-
#secondary_private_ip_address_count ⇒ Numeric?
readonly
The number of secondary private IPv4 addresses to assign to a network interface.
-
#source_dest_check ⇒ Boolean, ...
readonly
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
-
#subnet_id ⇒ String, AWSCDK::Interfaces::AWSEC2::ISubnetRef
readonly
The ID of the subnet to associate with the network interface.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to apply to the network interface.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(subnet_id:, connection_tracking_specification: nil, description: nil, enable_primary_ipv6: nil, group_set: nil, interface_type: nil, ipv4_prefix_count: nil, ipv4_prefixes: nil, ipv6_address_count: nil, ipv6_addresses: nil, ipv6_prefix_count: nil, ipv6_prefixes: nil, private_ip_address: nil, private_ip_addresses: nil, public_ip_dns_hostname_type_specification: nil, secondary_private_ip_address_count: nil, source_dest_check: nil, tags: nil) ⇒ CfnNetworkInterfaceProps
constructor
A new instance of CfnNetworkInterfaceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(subnet_id:, connection_tracking_specification: nil, description: nil, enable_primary_ipv6: nil, group_set: nil, interface_type: nil, ipv4_prefix_count: nil, ipv4_prefixes: nil, ipv6_address_count: nil, ipv6_addresses: nil, ipv6_prefix_count: nil, ipv6_prefixes: nil, private_ip_address: nil, private_ip_addresses: nil, public_ip_dns_hostname_type_specification: nil, secondary_private_ip_address_count: nil, source_dest_check: nil, tags: nil) ⇒ CfnNetworkInterfaceProps
Returns a new instance of CfnNetworkInterfaceProps.
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 59 60 61 62 63 64 |
# File 'ec2/cfn_network_interface_props.rb', line 27 def initialize(subnet_id:, connection_tracking_specification: nil, description: nil, enable_primary_ipv6: nil, group_set: nil, interface_type: nil, ipv4_prefix_count: nil, ipv4_prefixes: nil, ipv6_address_count: nil, ipv6_addresses: nil, ipv6_prefix_count: nil, ipv6_prefixes: nil, private_ip_address: nil, private_ip_addresses: nil, public_ip_dns_hostname_type_specification: nil, secondary_private_ip_address_count: nil, source_dest_check: nil, tags: nil) @subnet_id = subnet_id Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVN1Ym5ldFJlZiJ9XX19")), "subnetId") @connection_tracking_specification = connection_tracking_specification.is_a?(Hash) ? ::AWSCDK::EC2::CfnNetworkInterface::ConnectionTrackingSpecificationProperty.new(**connection_tracking_specification.transform_keys(&:to_sym)) : connection_tracking_specification Jsii::Type.check_type(@connection_tracking_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTmV0d29ya0ludGVyZmFjZS5Db25uZWN0aW9uVHJhY2tpbmdTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "connectionTrackingSpecification") unless @connection_tracking_specification.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @enable_primary_ipv6 = enable_primary_ipv6 Jsii::Type.check_type(@enable_primary_ipv6, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enablePrimaryIpv6") unless @enable_primary_ipv6.nil? @group_set = group_set Jsii::Type.check_type(@group_set, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU2VjdXJpdHlHcm91cFJlZiJ9XX19LCJraW5kIjoiYXJyYXkifX0=")), "groupSet") unless @group_set.nil? @interface_type = interface_type Jsii::Type.check_type(@interface_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "interfaceType") unless @interface_type.nil? @ipv4_prefix_count = ipv4_prefix_count Jsii::Type.check_type(@ipv4_prefix_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ipv4PrefixCount") unless @ipv4_prefix_count.nil? @ipv4_prefixes = ipv4_prefixes Jsii::Type.check_type(@ipv4_prefixes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbk5ldHdvcmtJbnRlcmZhY2UuSXB2NFByZWZpeFNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "ipv4Prefixes") unless @ipv4_prefixes.nil? @ipv6_address_count = ipv6_address_count Jsii::Type.check_type(@ipv6_address_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ipv6AddressCount") unless @ipv6_address_count.nil? @ipv6_addresses = ipv6_addresses Jsii::Type.check_type(@ipv6_addresses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbk5ldHdvcmtJbnRlcmZhY2UuSW5zdGFuY2VJcHY2QWRkcmVzc1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "ipv6Addresses") unless @ipv6_addresses.nil? @ipv6_prefix_count = ipv6_prefix_count Jsii::Type.check_type(@ipv6_prefix_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ipv6PrefixCount") unless @ipv6_prefix_count.nil? @ipv6_prefixes = ipv6_prefixes Jsii::Type.check_type(@ipv6_prefixes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbk5ldHdvcmtJbnRlcmZhY2UuSXB2NlByZWZpeFNwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "ipv6Prefixes") unless @ipv6_prefixes.nil? @private_ip_address = private_ip_address Jsii::Type.check_type(@private_ip_address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "privateIpAddress") unless @private_ip_address.nil? @private_ip_addresses = private_ip_addresses Jsii::Type.check_type(@private_ip_addresses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbk5ldHdvcmtJbnRlcmZhY2UuUHJpdmF0ZUlwQWRkcmVzc1NwZWNpZmljYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "privateIpAddresses") unless @private_ip_addresses.nil? @public_ip_dns_hostname_type_specification = public_ip_dns_hostname_type_specification Jsii::Type.check_type(@public_ip_dns_hostname_type_specification, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "publicIpDnsHostnameTypeSpecification") unless @public_ip_dns_hostname_type_specification.nil? @secondary_private_ip_address_count = secondary_private_ip_address_count Jsii::Type.check_type(@secondary_private_ip_address_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "secondaryPrivateIpAddressCount") unless @secondary_private_ip_address_count.nil? @source_dest_check = source_dest_check Jsii::Type.check_type(@source_dest_check, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "sourceDestCheck") unless @source_dest_check.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#connection_tracking_specification ⇒ AWSCDK::IResolvable, ... (readonly)
A connection tracking specification for the network interface.
75 76 77 |
# File 'ec2/cfn_network_interface_props.rb', line 75 def connection_tracking_specification @connection_tracking_specification end |
#description ⇒ String? (readonly)
A description for the network interface.
80 81 82 |
# File 'ec2/cfn_network_interface_props.rb', line 80 def description @description end |
#enable_primary_ipv6 ⇒ Boolean, ... (readonly)
If you’re modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to assign a primary IPv6 IP address.
A primary IPv6 address is an IPv6 GUA address associated with an ENI that you have enabled to use a primary IPv6 address. Use this option if the instance that this ENI will be attached to relies on its IPv6 address not changing. AWS will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
87 88 89 |
# File 'ec2/cfn_network_interface_props.rb', line 87 def enable_primary_ipv6 @enable_primary_ipv6 end |
#group_set ⇒ Array<String, AWSCDK::Interfaces::AWSEC2::ISecurityGroupRef>? (readonly)
The IDs of the security groups associated with this network interface.
92 93 94 |
# File 'ec2/cfn_network_interface_props.rb', line 92 def group_set @group_set end |
#interface_type ⇒ String? (readonly)
The type of network interface.
The default is interface . The supported values are efa and trunk .
99 100 101 |
# File 'ec2/cfn_network_interface_props.rb', line 99 def interface_type @interface_type end |
#ipv4_prefix_count ⇒ Numeric? (readonly)
The number of IPv4 prefixes to be automatically assigned to the network interface.
When creating a network interface, you can't specify a count of IPv4 prefixes if you've specified one of the following: specific IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
106 107 108 |
# File 'ec2/cfn_network_interface_props.rb', line 106 def ipv4_prefix_count @ipv4_prefix_count end |
#ipv4_prefixes ⇒ AWSCDK::IResolvable, ... (readonly)
The IPv4 delegated prefixes that are assigned to the network interface.
When creating a network interface, you can't specify IPv4 prefixes if you've specified one of the following: a count of IPv4 prefixes, specific private IPv4 addresses, or a count of private IPv4 addresses.
113 114 115 |
# File 'ec2/cfn_network_interface_props.rb', line 113 def ipv4_prefixes @ipv4_prefixes end |
#ipv6_address_count ⇒ Numeric? (readonly)
The number of IPv6 addresses to assign to the network interface.
Amazon EC2 automatically selects the IPv6 addresses from the subnet range. To specify specific IPv6 addresses, use the Ipv6Addresses property and don't specify this property.
When creating a network interface, you can't specify a count of IPv6 addresses if you've specified one of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
122 123 124 |
# File 'ec2/cfn_network_interface_props.rb', line 122 def ipv6_address_count @ipv6_address_count end |
#ipv6_addresses ⇒ AWSCDK::IResolvable, ... (readonly)
The IPv6 addresses from the IPv6 CIDR block range of your subnet to assign to the network interface.
If you're specifying a number of IPv6 addresses, use the Ipv6AddressCount property and don't specify this property.
When creating a network interface, you can't specify IPv6 addresses if you've specified one of the following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 prefixes.
131 132 133 |
# File 'ec2/cfn_network_interface_props.rb', line 131 def ipv6_addresses @ipv6_addresses end |
#ipv6_prefix_count ⇒ Numeric? (readonly)
The number of IPv6 prefixes to be automatically assigned to the network interface.
When creating a network interface, you can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
138 139 140 |
# File 'ec2/cfn_network_interface_props.rb', line 138 def ipv6_prefix_count @ipv6_prefix_count end |
#ipv6_prefixes ⇒ AWSCDK::IResolvable, ... (readonly)
The IPv6 delegated prefixes that are assigned to the network interface.
When creating a network interface, you can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses.
145 146 147 |
# File 'ec2/cfn_network_interface_props.rb', line 145 def ipv6_prefixes @ipv6_prefixes end |
#private_ip_address ⇒ String? (readonly)
The private IPv4 address to assign to the network interface as the primary private IP address.
If you want to specify multiple private IP addresses, use the PrivateIpAddresses property.
152 153 154 |
# File 'ec2/cfn_network_interface_props.rb', line 152 def private_ip_address @private_ip_address end |
#private_ip_addresses ⇒ AWSCDK::IResolvable, ... (readonly)
The private IPv4 addresses to assign to the network interface.
You can specify a primary private IP address by setting the value of the Primary property to true in the PrivateIpAddressSpecification property. If you want EC2 to automatically assign private IP addresses, use the SecondaryPrivateIpAddressCount property and do not specify this property.
When creating a network interface, you can't specify private IPv4 addresses if you've specified one of the following: a count of private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
161 162 163 |
# File 'ec2/cfn_network_interface_props.rb', line 161 def private_ip_addresses @private_ip_addresses end |
#public_ip_dns_hostname_type_specification ⇒ String? (readonly)
Public IP DNS hostname type.
166 167 168 |
# File 'ec2/cfn_network_interface_props.rb', line 166 def public_ip_dns_hostname_type_specification @public_ip_dns_hostname_type_specification end |
#secondary_private_ip_address_count ⇒ Numeric? (readonly)
The number of secondary private IPv4 addresses to assign to a network interface.
When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using private_ip_addresses .
When creating a Network Interface, you can't specify a count of private IPv4 addresses if you've specified one of the following: specific private IPv4 addresses, specific IPv4 prefixes, or a count of IPv4 prefixes.
175 176 177 |
# File 'ec2/cfn_network_interface_props.rb', line 175 def secondary_private_ip_address_count @secondary_private_ip_address_count end |
#source_dest_check ⇒ Boolean, ... (readonly)
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
182 183 184 |
# File 'ec2/cfn_network_interface_props.rb', line 182 def source_dest_check @source_dest_check end |
#subnet_id ⇒ String, AWSCDK::Interfaces::AWSEC2::ISubnetRef (readonly)
The ID of the subnet to associate with the network interface.
70 71 72 |
# File 'ec2/cfn_network_interface_props.rb', line 70 def subnet_id @subnet_id end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to apply to the network interface.
187 188 189 |
# File 'ec2/cfn_network_interface_props.rb', line 187 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'ec2/cfn_network_interface_props.rb', line 189 def self.jsii_properties { :subnet_id => "subnetId", :connection_tracking_specification => "connectionTrackingSpecification", :description => "description", :enable_primary_ipv6 => "enablePrimaryIpv6", :group_set => "groupSet", :interface_type => "interfaceType", :ipv4_prefix_count => "ipv4PrefixCount", :ipv4_prefixes => "ipv4Prefixes", :ipv6_address_count => "ipv6AddressCount", :ipv6_addresses => "ipv6Addresses", :ipv6_prefix_count => "ipv6PrefixCount", :ipv6_prefixes => "ipv6Prefixes", :private_ip_address => "privateIpAddress", :private_ip_addresses => "privateIpAddresses", :public_ip_dns_hostname_type_specification => "publicIpDnsHostnameTypeSpecification", :secondary_private_ip_address_count => "secondaryPrivateIpAddressCount", :source_dest_check => "sourceDestCheck", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'ec2/cfn_network_interface_props.rb', line 212 def to_jsii result = {} result.merge!({ "subnetId" => @subnet_id, "connectionTrackingSpecification" => @connection_tracking_specification, "description" => @description, "enablePrimaryIpv6" => @enable_primary_ipv6, "groupSet" => @group_set, "interfaceType" => @interface_type, "ipv4PrefixCount" => @ipv4_prefix_count, "ipv4Prefixes" => @ipv4_prefixes, "ipv6AddressCount" => @ipv6_address_count, "ipv6Addresses" => @ipv6_addresses, "ipv6PrefixCount" => @ipv6_prefix_count, "ipv6Prefixes" => @ipv6_prefixes, "privateIpAddress" => @private_ip_address, "privateIpAddresses" => @private_ip_addresses, "publicIpDnsHostnameTypeSpecification" => @public_ip_dns_hostname_type_specification, "secondaryPrivateIpAddressCount" => @secondary_private_ip_address_count, "sourceDestCheck" => @source_dest_check, "tags" => @tags, }) result.compact end |