azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
158 lines (152 loc) • 5.62 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');
/**
* 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.
*
* @extends models['Resource']
*/
class Image extends models['Resource'] {
/**
* Create a Image.
* @member {object} [sourceVirtualMachine] The source virtual machine from
* which Image is created.
* @member {string} [sourceVirtualMachine.id] Resource Id
* @member {object} [storageProfile] Specifies the storage settings for the
* virtual machine disks.
* @member {object} [storageProfile.osDisk] 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).
* @member {string} [storageProfile.osDisk.osType] This property allows you
* to specify the type of the OS that is included in the disk if creating a
* VM from a custom image. <br><br> Possible values are: <br><br> **Windows**
* <br><br> **Linux**. Possible values include: 'Windows', 'Linux'
* @member {string} [storageProfile.osDisk.osState] The OS State. Possible
* values include: 'Generalized', 'Specialized'
* @member {object} [storageProfile.osDisk.snapshot] The snapshot.
* @member {string} [storageProfile.osDisk.snapshot.id] Resource Id
* @member {object} [storageProfile.osDisk.managedDisk] The managedDisk.
* @member {string} [storageProfile.osDisk.managedDisk.id] Resource Id
* @member {string} [storageProfile.osDisk.blobUri] The Virtual Hard Disk.
* @member {string} [storageProfile.osDisk.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 {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of
* empty data disks 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 {string} [storageProfile.osDisk.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'
* @member {array} [storageProfile.dataDisks] Specifies the parameters that
* are used to add a data disk to a 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).
* @member {string} [provisioningState] The provisioning state.
*/
constructor() {
super();
}
/**
* Defines the metadata of Image
*
* @returns {object} metadata of Image
*
*/
mapper() {
return {
required: false,
serializedName: 'Image',
type: {
name: 'Composite',
className: 'Image',
modelProperties: {
id: {
required: false,
readOnly: true,
serializedName: 'id',
type: {
name: 'String'
}
},
name: {
required: false,
readOnly: true,
serializedName: 'name',
type: {
name: 'String'
}
},
type: {
required: false,
readOnly: true,
serializedName: 'type',
type: {
name: 'String'
}
},
location: {
required: true,
serializedName: 'location',
type: {
name: 'String'
}
},
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
sourceVirtualMachine: {
required: false,
serializedName: 'properties.sourceVirtualMachine',
type: {
name: 'Composite',
className: 'SubResource'
}
},
storageProfile: {
required: false,
serializedName: 'properties.storageProfile',
type: {
name: 'Composite',
className: 'ImageStorageProfile'
}
},
provisioningState: {
required: false,
readOnly: true,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = Image;