azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
172 lines (166 loc) • 6.51 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
;
const models = require('./index');
/**
* Specifies information about the operating system disk used by the virtual
* machine. <br><br> For more information about disks, see [About disks and
* VHDs for Azure virtual
* machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
*
*/
class OSDisk {
/**
* Create a OSDisk.
* @member {string} [osType] This property allows you to specify the type of
* the OS that is included in the disk if creating a VM from user-image or a
* specialized VHD. <br><br> Possible values are: <br><br> **Windows**
* <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
* @member {object} [encryptionSettings] Specifies the encryption settings
* for the OS Disk. <br><br> Minimum api-version: 2015-06-15
* @member {object} [encryptionSettings.diskEncryptionKey] Specifies the
* location of the disk encryption key, which is a Key Vault Secret.
* @member {string} [encryptionSettings.diskEncryptionKey.secretUrl] The URL
* referencing a secret in a Key Vault.
* @member {object} [encryptionSettings.diskEncryptionKey.sourceVault] The
* relative URL of the Key Vault containing the secret.
* @member {string} [encryptionSettings.diskEncryptionKey.sourceVault.id]
* Resource Id
* @member {object} [encryptionSettings.keyEncryptionKey] Specifies the
* location of the key encryption key in Key Vault.
* @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] The URL
* referencing a key encryption key in Key Vault.
* @member {object} [encryptionSettings.keyEncryptionKey.sourceVault] The
* relative URL of the Key Vault containing the key.
* @member {string} [encryptionSettings.keyEncryptionKey.sourceVault.id]
* Resource Id
* @member {boolean} [encryptionSettings.enabled] Specifies whether disk
* encryption should be enabled on the virtual machine.
* @member {string} [name] The disk name.
* @member {object} [vhd] The virtual hard disk.
* @member {string} [vhd.uri] Specifies the virtual hard disk's uri.
* @member {object} [image] The source user image virtual hard disk. The
* 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.
* @member {string} [image.uri] Specifies the virtual hard disk's uri.
* @member {string} [caching] Specifies the caching requirements. <br><br>
* Possible values are: <br><br> **None** <br><br> **ReadOnly** <br><br>
* **ReadWrite** <br><br> Default: **None for Standard storage. ReadOnly for
* Premium storage**. Possible values include: 'None', 'ReadOnly',
* 'ReadWrite'
* @member {string} createOption Specifies how the virtual machine should be
* created.<br><br> Possible values are:<br><br> **Attach** \u2013 This value
* is used when you are using a specialized disk to create the virtual
* machine.<br><br> **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'
* @member {number} [diskSizeGB] Specifies the size of an empty data disk in
* gigabytes. This element can be used to overwrite the name of the disk in a
* virtual machine image. <br><br> This value cannot be larger than 1023 GB
* @member {object} [managedDisk] The managed disk parameters.
* @member {string} [managedDisk.storageAccountType] Specifies the storage
* account type for the managed disk. Possible values are: Standard_LRS or
* Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'
*/
constructor() {
}
/**
* Defines the metadata of OSDisk
*
* @returns {object} metadata of OSDisk
*
*/
mapper() {
return {
required: false,
serializedName: 'OSDisk',
type: {
name: 'Composite',
className: 'OSDisk',
modelProperties: {
osType: {
required: false,
serializedName: 'osType',
type: {
name: 'Enum',
allowedValues: [ 'Windows', 'Linux' ]
}
},
encryptionSettings: {
required: false,
serializedName: 'encryptionSettings',
type: {
name: 'Composite',
className: 'DiskEncryptionSettings'
}
},
name: {
required: false,
serializedName: 'name',
type: {
name: 'String'
}
},
vhd: {
required: false,
serializedName: 'vhd',
type: {
name: 'Composite',
className: 'VirtualHardDisk'
}
},
image: {
required: false,
serializedName: 'image',
type: {
name: 'Composite',
className: 'VirtualHardDisk'
}
},
caching: {
required: false,
serializedName: 'caching',
type: {
name: 'Enum',
allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ]
}
},
createOption: {
required: true,
serializedName: 'createOption',
type: {
name: 'Enum',
allowedValues: [ 'fromImage', 'empty', 'attach' ]
}
},
diskSizeGB: {
required: false,
serializedName: 'diskSizeGB',
type: {
name: 'Number'
}
},
managedDisk: {
required: false,
serializedName: 'managedDisk',
type: {
name: 'Composite',
className: 'ManagedDiskParameters'
}
}
}
}
};
}
}
module.exports = OSDisk;