Class: AWSCDK::Interfaces::AWSEC2::VolumeAttachmentReference

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
interfaces/awsec2/volume_attachment_reference.rb

Overview

A reference to a VolumeAttachment resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_id:, volume_id:) ⇒ VolumeAttachmentReference

Returns a new instance of VolumeAttachmentReference.

Parameters:

  • instance_id (String)

    The InstanceId of the VolumeAttachment resource.

  • volume_id (String)

    The VolumeId of the VolumeAttachment resource.



9
10
11
12
13
14
# File 'interfaces/awsec2/volume_attachment_reference.rb', line 9

def initialize(instance_id:, volume_id:)
  @instance_id = instance_id
  Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceId")
  @volume_id = volume_id
  Jsii::Type.check_type(@volume_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "volumeId")
end

Instance Attribute Details

#instance_idString (readonly)

The InstanceId of the VolumeAttachment resource.

Returns:

  • (String)


19
20
21
# File 'interfaces/awsec2/volume_attachment_reference.rb', line 19

def instance_id
  @instance_id
end

#volume_idString (readonly)

The VolumeId of the VolumeAttachment resource.

Returns:

  • (String)


23
24
25
# File 'interfaces/awsec2/volume_attachment_reference.rb', line 23

def volume_id
  @volume_id
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'interfaces/awsec2/volume_attachment_reference.rb', line 25

def self.jsii_properties
  {
    :instance_id => "instanceId",
    :volume_id => "volumeId",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'interfaces/awsec2/volume_attachment_reference.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "instanceId" => @instance_id,
    "volumeId" => @volume_id,
  })
  result.compact
end