Class: AWSCDK::OpsWorks::CfnVolumeProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ops_works/cfn_volume_props.rb

Overview

Properties for defining a CfnVolume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ec2_volume_id:, stack_id:, mount_point: nil, name: nil) ⇒ CfnVolumeProps

Returns a new instance of CfnVolumeProps.

Parameters:

  • ec2_volume_id (String)

    The Amazon EC2 volume ID.

  • stack_id (String)

    The stack ID.

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

    The volume mount point.

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

    The volume name.



13
14
15
16
17
18
19
20
21
22
# File 'ops_works/cfn_volume_props.rb', line 13

def initialize(ec2_volume_id:, stack_id:, mount_point: nil, name: nil)
  @ec2_volume_id = ec2_volume_id
  Jsii::Type.check_type(@ec2_volume_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ec2VolumeId")
  @stack_id = stack_id
  Jsii::Type.check_type(@stack_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stackId")
  @mount_point = mount_point
  Jsii::Type.check_type(@mount_point, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPoint") unless @mount_point.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
end

Instance Attribute Details

#ec2_volume_idString (readonly)

The Amazon EC2 volume ID.



28
29
30
# File 'ops_works/cfn_volume_props.rb', line 28

def ec2_volume_id
  @ec2_volume_id
end

#mount_pointString? (readonly)

The volume mount point.

For example, "/mnt/disk1".



40
41
42
# File 'ops_works/cfn_volume_props.rb', line 40

def mount_point
  @mount_point
end

#nameString? (readonly)

The volume name.

Volume names are a maximum of 128 characters.



47
48
49
# File 'ops_works/cfn_volume_props.rb', line 47

def name
  @name
end

#stack_idString (readonly)

The stack ID.



33
34
35
# File 'ops_works/cfn_volume_props.rb', line 33

def stack_id
  @stack_id
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
# File 'ops_works/cfn_volume_props.rb', line 49

def self.jsii_properties
  {
    :ec2_volume_id => "ec2VolumeId",
    :stack_id => "stackId",
    :mount_point => "mountPoint",
    :name => "name",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
# File 'ops_works/cfn_volume_props.rb', line 58

def to_jsii
  result = {}
  result.merge!({
    "ec2VolumeId" => @ec2_volume_id,
    "stackId" => @stack_id,
    "mountPoint" => @mount_point,
    "name" => @name,
  })
  result.compact
end