Class: AWSCDK::EC2::CfnNetworkInterfaceAttachmentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnNetworkInterfaceAttachmentProps
- Defined in:
- ec2/cfn_network_interface_attachment_props.rb
Overview
Properties for defining a CfnNetworkInterfaceAttachment.
Instance Attribute Summary collapse
-
#delete_on_termination ⇒ Boolean, ...
readonly
Whether to delete the network interface when the instance terminates.
-
#device_index ⇒ String
readonly
The network interface's position in the attachment order.
-
#ena_queue_count ⇒ Numeric?
readonly
The number of ENA queues created with the instance.
-
#ena_srd_specification ⇒ AWSCDK::IResolvable, ...
readonly
Configures ENA Express for the network interface that this action attaches to the instance.
-
#instance_id ⇒ String
readonly
The ID of the instance to which you will attach the ENI.
-
#network_interface_id ⇒ String
readonly
The ID of the ENI that you want to attach.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_index:, instance_id:, network_interface_id:, delete_on_termination: nil, ena_queue_count: nil, ena_srd_specification: nil) ⇒ CfnNetworkInterfaceAttachmentProps
constructor
A new instance of CfnNetworkInterfaceAttachmentProps.
- #to_jsii ⇒ Object
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.
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_termination ⇒ Boolean, ... (readonly)
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_index ⇒ String (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_count ⇒ Numeric? (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_specification ⇒ AWSCDK::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_id ⇒ String (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_id ⇒ String (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_properties ⇒ Object
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_jsii ⇒ Object
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 |