Class: AWSCDK::EC2::CfnSpotFleet::InstanceNetworkInterfaceSpecificationProperty

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

Overview

Describes a network interface.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(associate_public_ip_address: nil, delete_on_termination: nil, description: nil, device_index: nil, groups: nil, ipv6_address_count: nil, ipv6_addresses: nil, network_interface_id: nil, private_ip_addresses: nil, secondary_private_ip_address_count: nil, subnet_id: nil) ⇒ InstanceNetworkInterfaceSpecificationProperty

Returns a new instance of InstanceNetworkInterfaceSpecificationProperty.

Parameters:

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

    Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.

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

    Indicates whether the network interface is deleted when the instance is terminated.

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

    The description of the network interface.

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

    The position of the network interface in the attachment order.

  • groups (Array<String>, nil) (defaults to: nil)

    The IDs of the security groups for the network interface.

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

    A number of IPv6 addresses to assign to the network interface.

  • ipv6_addresses (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EC2::CfnSpotFleet::InstanceIpv6AddressProperty>, nil) (defaults to: nil)

    The IPv6 addresses to assign to the network interface.

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

    The ID of the network interface.

  • private_ip_addresses (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EC2::CfnSpotFleet::PrivateIPAddressSpecificationProperty>, nil) (defaults to: nil)

    The private IPv4 addresses to assign to the network interface.

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

    The number of secondary private IPv4 addresses.

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

    The ID of the subnet associated with the network interface.



1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
# File 'ec2/cfn_spot_fleet.rb', line 1186

def initialize(associate_public_ip_address: nil, delete_on_termination: nil, description: nil, device_index: nil, groups: nil, ipv6_address_count: nil, ipv6_addresses: nil, network_interface_id: nil, private_ip_addresses: nil, secondary_private_ip_address_count: nil, subnet_id: nil)
  @associate_public_ip_address = associate_public_ip_address
  Jsii::Type.check_type(@associate_public_ip_address, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "associatePublicIpAddress") unless @associate_public_ip_address.nil?
  @delete_on_termination = delete_on_termination
  Jsii::Type.check_type(@delete_on_termination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "deleteOnTermination") unless @delete_on_termination.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @device_index = device_index
  Jsii::Type.check_type(@device_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "deviceIndex") unless @device_index.nil?
  @groups = groups
  Jsii::Type.check_type(@groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "groups") unless @groups.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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmblNwb3RGbGVldC5JbnN0YW5jZUlwdjZBZGRyZXNzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "ipv6Addresses") unless @ipv6_addresses.nil?
  @network_interface_id = network_interface_id
  Jsii::Type.check_type(@network_interface_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkInterfaceId") unless @network_interface_id.nil?
  @private_ip_addresses = private_ip_addresses
  Jsii::Type.check_type(@private_ip_addresses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmblNwb3RGbGVldC5Qcml2YXRlSXBBZGRyZXNzU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "privateIpAddresses") unless @private_ip_addresses.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?
  @subnet_id = subnet_id
  Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId") unless @subnet_id.nil?
end

Instance Attribute Details

#associate_public_ip_addressBoolean, ... (readonly)

Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.

The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true .

AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page .



1219
1220
1221
# File 'ec2/cfn_spot_fleet.rb', line 1219

def associate_public_ip_address
  @associate_public_ip_address
end

#delete_on_terminationBoolean, ... (readonly)

Indicates whether the network interface is deleted when the instance is terminated.



1224
1225
1226
# File 'ec2/cfn_spot_fleet.rb', line 1224

def delete_on_termination
  @delete_on_termination
end

#descriptionString? (readonly)

The description of the network interface.

Applies only if creating a network interface when launching an instance.



1231
1232
1233
# File 'ec2/cfn_spot_fleet.rb', line 1231

def description
  @description
end

#device_indexNumeric? (readonly)

The position of the network interface in the attachment order.

A primary network interface has a device index of 0.

If you specify a network interface when launching an instance, you must specify the device index.



1240
1241
1242
# File 'ec2/cfn_spot_fleet.rb', line 1240

def device_index
  @device_index
end

#groupsArray<String>? (readonly)

The IDs of the security groups for the network interface.

Applies only if creating a network interface when launching an instance.



1247
1248
1249
# File 'ec2/cfn_spot_fleet.rb', line 1247

def groups
  @groups
end

#ipv6_address_countNumeric? (readonly)

A number of IPv6 addresses to assign to the network interface.

Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.



1254
1255
1256
# File 'ec2/cfn_spot_fleet.rb', line 1254

def ipv6_address_count
  @ipv6_address_count
end

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

The IPv6 addresses to assign to the network interface.

You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.



1261
1262
1263
# File 'ec2/cfn_spot_fleet.rb', line 1261

def ipv6_addresses
  @ipv6_addresses
end

#network_interface_idString? (readonly)

The ID of the network interface.

If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.



1268
1269
1270
# File 'ec2/cfn_spot_fleet.rb', line 1268

def network_interface_id
  @network_interface_id
end

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

The private IPv4 addresses to assign to the network interface.

Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.



1275
1276
1277
# File 'ec2/cfn_spot_fleet.rb', line 1275

def private_ip_addresses
  @private_ip_addresses
end

#secondary_private_ip_address_countNumeric? (readonly)

The number of secondary private IPv4 addresses.

You can’t specify this parameter and also specify a secondary private IP address using the PrivateIpAddress parameter.



1282
1283
1284
# File 'ec2/cfn_spot_fleet.rb', line 1282

def secondary_private_ip_address_count
  @secondary_private_ip_address_count
end

#subnet_idString? (readonly)

The ID of the subnet associated with the network interface.



1287
1288
1289
# File 'ec2/cfn_spot_fleet.rb', line 1287

def subnet_id
  @subnet_id
end

Class Method Details

.jsii_propertiesObject



1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
# File 'ec2/cfn_spot_fleet.rb', line 1289

def self.jsii_properties
  {
    :associate_public_ip_address => "associatePublicIpAddress",
    :delete_on_termination => "deleteOnTermination",
    :description => "description",
    :device_index => "deviceIndex",
    :groups => "groups",
    :ipv6_address_count => "ipv6AddressCount",
    :ipv6_addresses => "ipv6Addresses",
    :network_interface_id => "networkInterfaceId",
    :private_ip_addresses => "privateIpAddresses",
    :secondary_private_ip_address_count => "secondaryPrivateIpAddressCount",
    :subnet_id => "subnetId",
  }
end

Instance Method Details

#to_jsiiObject



1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'ec2/cfn_spot_fleet.rb', line 1305

def to_jsii
  result = {}
  result.merge!({
    "associatePublicIpAddress" => @associate_public_ip_address,
    "deleteOnTermination" => @delete_on_termination,
    "description" => @description,
    "deviceIndex" => @device_index,
    "groups" => @groups,
    "ipv6AddressCount" => @ipv6_address_count,
    "ipv6Addresses" => @ipv6_addresses,
    "networkInterfaceId" => @network_interface_id,
    "privateIpAddresses" => @private_ip_addresses,
    "secondaryPrivateIpAddressCount" => @secondary_private_ip_address_count,
    "subnetId" => @subnet_id,
  })
  result.compact
end