azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
213 lines (207 loc) • 7.27 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');
/**
* Snapshot resource.
*
* @extends models['Resource']
*/
class Snapshot extends models['Resource'] {
/**
* Create a Snapshot.
* @member {string} [managedBy] Unused. Always Null.
* @member {object} [sku]
* @member {string} [sku.name] The sku name. Possible values include:
* 'Standard_LRS', 'Premium_LRS'
* @member {string} [sku.tier] The sku tier.
* @member {date} [timeCreated] The time when the disk was created.
* @member {string} [osType] The Operating System type. Possible values
* include: 'Windows', 'Linux'
* @member {object} creationData Disk source information. CreationData
* information cannot be changed after the disk has been created.
* @member {string} [creationData.createOption] This enumerates the possible
* sources of a disk's creation. Possible values include: 'Empty', 'Attach',
* 'FromImage', 'Import', 'Copy'
* @member {string} [creationData.storageAccountId] If createOption is
* Import, the Azure Resource Manager identifier of the storage account
* containing the blob to import as a disk. Required only if the blob is in a
* different subscription
* @member {object} [creationData.imageReference] Disk source information.
* @member {string} [creationData.imageReference.id] A relative uri
* containing either a Platform Imgage Repository or user image reference.
* @member {number} [creationData.imageReference.lun] If the disk is created
* from an image's data disk, this is an index that indicates which of the
* data disks in the image to use. For OS disks, this field is null.
* @member {string} [creationData.sourceUri] If creationOption is Import,
* this is the URI of a blob to be imported into a managed disk.
* @member {string} [creationData.sourceResourceId] If createOption is Copy,
* this is the ARM id of the source snapshot or disk.
* @member {number} [diskSizeGB] If creationData.createOption is Empty, this
* field is mandatory and it indicates the size of the VHD to create. If this
* field is present for updates or creation with other options, it indicates
* a resize. Resizes are only allowed if the disk is not attached to a
* running VM, and can only increase the disk's size.
* @member {object} [encryptionSettings] Encryption settings for disk or
* snapshot
* @member {boolean} [encryptionSettings.enabled] Set this flag to true and
* provide DiskEncryptionKey and optional KeyEncryptionKey to enable
* encryption. Set this flag to false and remove DiskEncryptionKey and
* KeyEncryptionKey to disable encryption. If EncryptionSettings is null in
* the request object, the existing settings remain unchanged.
* @member {object} [encryptionSettings.diskEncryptionKey] Key Vault Secret
* Url and vault id of the disk encryption key
* @member {object} [encryptionSettings.diskEncryptionKey.sourceVault]
* Resource id of the KeyVault containing the key or secret
* @member {string} [encryptionSettings.diskEncryptionKey.sourceVault.id]
* Resource Id
* @member {string} [encryptionSettings.diskEncryptionKey.secretUrl] Url
* pointing to a key or secret in KeyVault
* @member {object} [encryptionSettings.keyEncryptionKey] Key Vault Key Url
* and vault id of the key encryption key
* @member {object} [encryptionSettings.keyEncryptionKey.sourceVault]
* Resource id of the KeyVault containing the key or secret
* @member {string} [encryptionSettings.keyEncryptionKey.sourceVault.id]
* Resource Id
* @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing
* to a key or secret in KeyVault
* @member {string} [provisioningState] The disk provisioning state.
*/
constructor() {
super();
}
/**
* Defines the metadata of Snapshot
*
* @returns {object} metadata of Snapshot
*
*/
mapper() {
return {
required: false,
serializedName: 'Snapshot',
type: {
name: 'Composite',
className: 'Snapshot',
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'
}
}
}
},
managedBy: {
required: false,
readOnly: true,
serializedName: 'managedBy',
type: {
name: 'String'
}
},
sku: {
required: false,
serializedName: 'sku',
type: {
name: 'Composite',
className: 'DiskSku'
}
},
timeCreated: {
required: false,
readOnly: true,
serializedName: 'properties.timeCreated',
type: {
name: 'DateTime'
}
},
osType: {
required: false,
serializedName: 'properties.osType',
type: {
name: 'Enum',
allowedValues: [ 'Windows', 'Linux' ]
}
},
creationData: {
required: true,
serializedName: 'properties.creationData',
type: {
name: 'Composite',
className: 'CreationData'
}
},
diskSizeGB: {
required: false,
serializedName: 'properties.diskSizeGB',
type: {
name: 'Number'
}
},
encryptionSettings: {
required: false,
serializedName: 'properties.encryptionSettings',
type: {
name: 'Composite',
className: 'EncryptionSettings'
}
},
provisioningState: {
required: false,
readOnly: true,
serializedName: 'properties.provisioningState',
type: {
name: 'String'
}
}
}
}
};
}
}
module.exports = Snapshot;