Class: AWSCDK::EC2::CfnNetworkInterfaceAttachmentProps

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

Overview

Properties for defining a CfnNetworkInterfaceAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device_index:, instance_id:, network_interface_id:, delete_on_termination: nil, ena_queue_count: nil, ena_srd_specification: nil) ⇒ CfnNetworkInterfaceAttachmentProps

Returns a new instance of CfnNetworkInterfaceAttachmentProps.

Parameters:

  • device_index (String)

    The network interface's position in the attachment order.

  • instance_id (String)

    The ID of the instance to which you will attach the ENI.

  • network_interface_id (String)

    The ID of the ENI that you want to attach.

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

    Whether to delete the network interface when the instance terminates.

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

    The number of ENA queues created with the instance.

  • ena_srd_specification (AWSCDK::IResolvable, AWSCDK::EC2::CfnNetworkInterfaceAttachment::EnaSrdSpecificationProperty, nil) (defaults to: nil)

    Configures ENA Express for the network interface that this action attaches to the instance.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'ec2/cfn_network_interface_attachment_props.rb', line 15

def initialize(device_index:, instance_id:, network_interface_id:, delete_on_termination: nil, ena_queue_count: nil, ena_srd_specification: nil)
  @device_index = device_index
  Jsii::Type.check_type(@device_index, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceIndex")
  @instance_id = instance_id
  Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceId")
  @network_interface_id = network_interface_id
  Jsii::Type.check_type(@network_interface_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkInterfaceId")
  @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?
  @ena_queue_count = ena_queue_count
  Jsii::Type.check_type(@ena_queue_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "enaQueueCount") unless @ena_queue_count.nil?
  @ena_srd_specification = ena_srd_specification.is_a?(Hash) ? ::AWSCDK::EC2::CfnNetworkInterfaceAttachment::EnaSrdSpecificationProperty.new(**ena_srd_specification.transform_keys(&:to_sym)) : ena_srd_specification
  Jsii::Type.check_type(@ena_srd_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTmV0d29ya0ludGVyZmFjZUF0dGFjaG1lbnQuRW5hU3JkU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "enaSrdSpecification") unless @ena_srd_specification.nil?
end

Instance Attribute Details

#delete_on_terminationBoolean, ... (readonly)

Note:

Default: - true

Whether to delete the network interface when the instance terminates.

By default, this value is set to true .



54
55
56
# File 'ec2/cfn_network_interface_attachment_props.rb', line 54

def delete_on_termination
  @delete_on_termination
end

#device_indexString (readonly)

The network interface's position in the attachment order.

For example, the first attached network interface has a DeviceIndex of 0.



36
37
38
# File 'ec2/cfn_network_interface_attachment_props.rb', line 36

def device_index
  @device_index
end

#ena_queue_countNumeric? (readonly)

The number of ENA queues created with the instance.



59
60
61
# File 'ec2/cfn_network_interface_attachment_props.rb', line 59

def ena_queue_count
  @ena_queue_count
end

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

Configures ENA Express for the network interface that this action attaches to the instance.



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

def ena_srd_specification
  @ena_srd_specification
end

#instance_idString (readonly)

The ID of the instance to which you will attach the ENI.



41
42
43
# File 'ec2/cfn_network_interface_attachment_props.rb', line 41

def instance_id
  @instance_id
end

#network_interface_idString (readonly)

The ID of the ENI that you want to attach.



46
47
48
# File 'ec2/cfn_network_interface_attachment_props.rb', line 46

def network_interface_id
  @network_interface_id
end

Class Method Details

.jsii_propertiesObject



66
67
68
69
70
71
72
73
74
75
# File 'ec2/cfn_network_interface_attachment_props.rb', line 66

def self.jsii_properties
  {
    :device_index => "deviceIndex",
    :instance_id => "instanceId",
    :network_interface_id => "networkInterfaceId",
    :delete_on_termination => "deleteOnTermination",
    :ena_queue_count => "enaQueueCount",
    :ena_srd_specification => "enaSrdSpecification",
  }
end

Instance Method Details

#to_jsiiObject



77
78
79
80
81
82
83
84
85
86
87
88
# File 'ec2/cfn_network_interface_attachment_props.rb', line 77

def to_jsii
  result = {}
  result.merge!({
    "deviceIndex" => @device_index,
    "instanceId" => @instance_id,
    "networkInterfaceId" => @network_interface_id,
    "deleteOnTermination" => @delete_on_termination,
    "enaQueueCount" => @ena_queue_count,
    "enaSrdSpecification" => @ena_srd_specification,
  })
  result.compact
end