Class: Azure::ARM::Compute::Models::OSDisk

Inherits:
Object
  • Object
show all
Includes:
MsRest::JSONable, MsRestAzure
Defined in:
lib/generated/azure_mgmt_compute/models/osdisk.rb

Overview

Specifies information about the operating system disk used by the virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#cachingCachingTypes

Possible values are:
None
ReadOnly
ReadWrite
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: ‘None’, ‘ReadOnly’, ‘ReadWrite’

Returns:



47
48
49
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 47

def caching
  @caching
end

#create_optionDiskCreateOptionTypes

should be created.
Possible values are:
Attach u2013 This value is used when you are using a specialized disk to create the virtual machine.
FromImage u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: ‘fromImage’, ‘empty’, ‘attach’

Returns:



58
59
60
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 58

def create_option
  @create_option
end

#disk_size_gbInteger

gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB

Returns:

  • (Integer)

    Specifies the size of an empty data disk in



64
65
66
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 64

def disk_size_gb
  @disk_size_gb
end

#encryption_settingsDiskEncryptionSettings

the OS Disk.
Minimum api-version: 2015-06-15

Returns:



28
29
30
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 28

def encryption_settings
  @encryption_settings
end

#imageVirtualHardDisk

virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

Returns:



40
41
42
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 40

def image
  @image
end

#managed_diskManagedDiskParameters

Returns The managed disk parameters.

Returns:



67
68
69
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 67

def managed_disk
  @managed_disk
end

#nameString

Returns The disk name.

Returns:

  • (String)

    The disk name.



31
32
33
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 31

def name
  @name
end

#os_typeOperatingSystemTypes

type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
Windows
Linux. Possible values include: ‘Windows’, ‘Linux’

Returns:



24
25
26
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 24

def os_type
  @os_type
end

#vhdVirtualHardDisk

Returns The virtual hard disk.

Returns:



34
35
36
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 34

def vhd
  @vhd
end

Class Method Details

.mapperObject

Mapper for OSDisk class as Ruby Hash. This will be used for serialization/deserialization.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/generated/azure_mgmt_compute/models/osdisk.rb', line 74

def self.mapper()
  {
    required: false,
    serialized_name: 'OSDisk',
    type: {
      name: 'Composite',
      class_name: 'OSDisk',
      model_properties: {
        os_type: {
          required: false,
          serialized_name: 'osType',
          type: {
            name: 'Enum',
            module: 'OperatingSystemTypes'
          }
        },
        encryption_settings: {
          required: false,
          serialized_name: 'encryptionSettings',
          type: {
            name: 'Composite',
            class_name: 'DiskEncryptionSettings'
          }
        },
        name: {
          required: false,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        vhd: {
          required: false,
          serialized_name: 'vhd',
          type: {
            name: 'Composite',
            class_name: 'VirtualHardDisk'
          }
        },
        image: {
          required: false,
          serialized_name: 'image',
          type: {
            name: 'Composite',
            class_name: 'VirtualHardDisk'
          }
        },
        caching: {
          required: false,
          serialized_name: 'caching',
          type: {
            name: 'Enum',
            module: 'CachingTypes'
          }
        },
        create_option: {
          required: true,
          serialized_name: 'createOption',
          type: {
            name: 'Enum',
            module: 'DiskCreateOptionTypes'
          }
        },
        disk_size_gb: {
          required: false,
          serialized_name: 'diskSizeGB',
          type: {
            name: 'Number'
          }
        },
        managed_disk: {
          required: false,
          serialized_name: 'managedDisk',
          type: {
            name: 'Composite',
            class_name: 'ManagedDiskParameters'
          }
        }
      }
    }
  }
end