Class: AWSCDK::Lightsail::CfnInstance::DiskProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_instance.rb

Overview

Disk is a property of the Hardware property. It describes a disk attached to an instance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(disk_name:, path:, attached_to: nil, attachment_state: nil, iops: nil, is_system_disk: nil, size_in_gb: nil) ⇒ DiskProperty

Returns a new instance of DiskProperty.

Parameters:

  • disk_name (String)

    The unique name of the disk.

  • path (String)

    The disk path.

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

    The resources to which the disk is attached.

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

    (Deprecated) The attachment state of the disk.

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

    The input/output operations per second (IOPS) of the disk.

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

    A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

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

    The size of the disk in GB.



888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
# File 'lightsail/cfn_instance.rb', line 888

def initialize(disk_name:, path:, attached_to: nil, attachment_state: nil, iops: nil, is_system_disk: nil, size_in_gb: nil)
  @disk_name = disk_name
  Jsii::Type.check_type(@disk_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "diskName")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @attached_to = attached_to
  Jsii::Type.check_type(@attached_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachedTo") unless @attached_to.nil?
  @attachment_state = attachment_state
  Jsii::Type.check_type(@attachment_state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachmentState") unless @attachment_state.nil?
  @iops = iops
  Jsii::Type.check_type(@iops, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "iops") unless @iops.nil?
  @is_system_disk = is_system_disk
  Jsii::Type.check_type(@is_system_disk, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isSystemDisk") unless @is_system_disk.nil?
  @size_in_gb = size_in_gb
  Jsii::Type.check_type(@size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sizeInGb") unless @size_in_gb.nil?
end

Instance Attribute Details

#attached_toString? (readonly)

The resources to which the disk is attached.



919
920
921
# File 'lightsail/cfn_instance.rb', line 919

def attached_to
  @attached_to
end

#attachment_stateString? (readonly)

(Deprecated) The attachment state of the disk.

In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use is_attached instead.



926
927
928
# File 'lightsail/cfn_instance.rb', line 926

def attachment_state
  @attachment_state
end

#disk_nameString (readonly)

The unique name of the disk.



909
910
911
# File 'lightsail/cfn_instance.rb', line 909

def disk_name
  @disk_name
end

#iopsNumeric? (readonly)

The input/output operations per second (IOPS) of the disk.



931
932
933
# File 'lightsail/cfn_instance.rb', line 931

def iops
  @iops
end

#is_system_diskBoolean, ... (readonly)

A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).



936
937
938
# File 'lightsail/cfn_instance.rb', line 936

def is_system_disk
  @is_system_disk
end

#pathString (readonly)

The disk path.



914
915
916
# File 'lightsail/cfn_instance.rb', line 914

def path
  @path
end

#size_in_gbString? (readonly)

The size of the disk in GB.



941
942
943
# File 'lightsail/cfn_instance.rb', line 941

def size_in_gb
  @size_in_gb
end

Class Method Details

.jsii_propertiesObject



943
944
945
946
947
948
949
950
951
952
953
# File 'lightsail/cfn_instance.rb', line 943

def self.jsii_properties
  {
    :disk_name => "diskName",
    :path => "path",
    :attached_to => "attachedTo",
    :attachment_state => "attachmentState",
    :iops => "iops",
    :is_system_disk => "isSystemDisk",
    :size_in_gb => "sizeInGb",
  }
end

Instance Method Details

#to_jsiiObject



955
956
957
958
959
960
961
962
963
964
965
966
967
# File 'lightsail/cfn_instance.rb', line 955

def to_jsii
  result = {}
  result.merge!({
    "diskName" => @disk_name,
    "path" => @path,
    "attachedTo" => @attached_to,
    "attachmentState" => @attachment_state,
    "iops" => @iops,
    "isSystemDisk" => @is_system_disk,
    "sizeInGb" => @size_in_gb,
  })
  result.compact
end