diff --git a/lib/services/computeManagement2/LICENSE.txt b/lib/services/computeManagement2/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/computeManagement2/LICENSE.txt +++ b/lib/services/computeManagement2/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index 4894e75f99..11efa212ea 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -34,11 +34,11 @@ export default class ComputeManagementClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, subscriptionId: string, baseUri?: string, options?: AzureServiceClientOptions); @@ -58,11 +58,11 @@ export default class ComputeManagementClient extends AzureServiceClient { availabilitySets: operations.AvailabilitySets; virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; virtualMachineExtensions: operations.VirtualMachineExtensions; - virtualMachines: operations.VirtualMachines; virtualMachineImages: operations.VirtualMachineImages; usageOperations: operations.UsageOperations; virtualMachineSizes: operations.VirtualMachineSizes; images: operations.Images; + virtualMachines: operations.VirtualMachines; virtualMachineScaleSets: operations.VirtualMachineScaleSets; virtualMachineScaleSetExtensions: operations.VirtualMachineScaleSetExtensions; virtualMachineScaleSetRollingUpgrades: operations.VirtualMachineScaleSetRollingUpgrades; diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index 15a0e2a7d3..b0d346e06d 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -34,9 +34,9 @@ class ComputeManagementClient extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, subscriptionId, baseUri, options) { if (credentials === null || credentials === undefined) { @@ -75,11 +75,11 @@ class ComputeManagementClient extends ServiceClient { this.availabilitySets = new operations.AvailabilitySets(this); this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); this.virtualMachineExtensions = new operations.VirtualMachineExtensions(this); - this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineImages = new operations.VirtualMachineImages(this); this.usageOperations = new operations.UsageOperations(this); this.virtualMachineSizes = new operations.VirtualMachineSizes(this); this.images = new operations.Images(this); + this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineScaleSets = new operations.VirtualMachineScaleSets(this); this.virtualMachineScaleSetExtensions = new operations.VirtualMachineScaleSetExtensions(this); this.virtualMachineScaleSetRollingUpgrades = new operations.VirtualMachineScaleSetRollingUpgrades(this); diff --git a/lib/services/computeManagement2/lib/models/accessUri.js b/lib/services/computeManagement2/lib/models/accessUri.js index 2f3d401a97..3fa859d644 100644 --- a/lib/services/computeManagement2/lib/models/accessUri.js +++ b/lib/services/computeManagement2/lib/models/accessUri.js @@ -39,7 +39,7 @@ class AccessUri { accessSAS: { required: false, readOnly: true, - serializedName: 'properties.output.accessSAS', + serializedName: 'accessSAS', type: { name: 'String' } diff --git a/lib/services/computeManagement2/lib/models/apiError.js b/lib/services/computeManagement2/lib/models/apiError.js index 858ddc2ea9..9fd78c1fab 100644 --- a/lib/services/computeManagement2/lib/models/apiError.js +++ b/lib/services/computeManagement2/lib/models/apiError.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Api error. * diff --git a/lib/services/computeManagement2/lib/models/autoOSUpgradePolicy.js b/lib/services/computeManagement2/lib/models/autoOSUpgradePolicy.js new file mode 100644 index 0000000000..e2aeb119c6 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/autoOSUpgradePolicy.js @@ -0,0 +1,53 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The configuration parameters used for performing automatic OS upgrade. + * + */ +class AutoOSUpgradePolicy { + /** + * Create a AutoOSUpgradePolicy. + * @member {boolean} [disableAutoRollback] Whether OS image rollback feature + * should be disabled. Default value is false. + */ + constructor() { + } + + /** + * Defines the metadata of AutoOSUpgradePolicy + * + * @returns {object} metadata of AutoOSUpgradePolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'AutoOSUpgradePolicy', + type: { + name: 'Composite', + className: 'AutoOSUpgradePolicy', + modelProperties: { + disableAutoRollback: { + required: false, + serializedName: 'disableAutoRollback', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = AutoOSUpgradePolicy; diff --git a/lib/services/computeManagement2/lib/models/availabilitySetListResult.js b/lib/services/computeManagement2/lib/models/availabilitySetListResult.js index 62c74689b8..e09a1f8b3d 100644 --- a/lib/services/computeManagement2/lib/models/availabilitySetListResult.js +++ b/lib/services/computeManagement2/lib/models/availabilitySetListResult.js @@ -16,6 +16,9 @@ class AvailabilitySetListResult extends Array { /** * Create a AvailabilitySetListResult. + * @member {string} [nextLink] The URI to fetch the next page of + * AvailabilitySets. Call ListNext() with this URI to fetch the next page of + * AvailabilitySets. */ constructor() { super(); @@ -36,7 +39,7 @@ class AvailabilitySetListResult extends Array { className: 'AvailabilitySetListResult', modelProperties: { value: { - required: false, + required: true, serializedName: '', type: { name: 'Sequence', @@ -49,6 +52,13 @@ class AvailabilitySetListResult extends Array { } } } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } } } } diff --git a/lib/services/computeManagement2/lib/models/availabilitySetUpdate.js b/lib/services/computeManagement2/lib/models/availabilitySetUpdate.js index b87f466cd2..2ce9f094d5 100644 --- a/lib/services/computeManagement2/lib/models/availabilitySetUpdate.js +++ b/lib/services/computeManagement2/lib/models/availabilitySetUpdate.js @@ -14,15 +14,7 @@ const models = require('./index'); /** * Specifies information about the availability set that the virtual machine - * should be assigned to. Virtual machines specified in the same availability - * set are allocated to different nodes to maximize availability. For more - * information about availability sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * should be assigned to. Only tags may be updated. * * @extends models['UpdateResource'] */ diff --git a/lib/services/computeManagement2/lib/models/containerServiceDiagnosticsProfile.js b/lib/services/computeManagement2/lib/models/containerServiceDiagnosticsProfile.js index 97ca03d8ab..7307cbb2d1 100644 --- a/lib/services/computeManagement2/lib/models/containerServiceDiagnosticsProfile.js +++ b/lib/services/computeManagement2/lib/models/containerServiceDiagnosticsProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ContainerServiceDiagnosticsProfile. */ diff --git a/lib/services/computeManagement2/lib/models/containerServiceLinuxProfile.js b/lib/services/computeManagement2/lib/models/containerServiceLinuxProfile.js index f651f9ec06..a4c6e59a87 100644 --- a/lib/services/computeManagement2/lib/models/containerServiceLinuxProfile.js +++ b/lib/services/computeManagement2/lib/models/containerServiceLinuxProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Profile for Linux VMs in the container service cluster. * diff --git a/lib/services/computeManagement2/lib/models/containerServiceSshConfiguration.js b/lib/services/computeManagement2/lib/models/containerServiceSshConfiguration.js index 49c1c1cb97..f2399c73e1 100644 --- a/lib/services/computeManagement2/lib/models/containerServiceSshConfiguration.js +++ b/lib/services/computeManagement2/lib/models/containerServiceSshConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * SSH configuration for Linux-based VMs running on Azure. * diff --git a/lib/services/computeManagement2/lib/models/creationData.js b/lib/services/computeManagement2/lib/models/creationData.js index 0bd210c44a..207f670835 100644 --- a/lib/services/computeManagement2/lib/models/creationData.js +++ b/lib/services/computeManagement2/lib/models/creationData.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Data used when creating a disk. * diff --git a/lib/services/computeManagement2/lib/models/dataDisk.js b/lib/services/computeManagement2/lib/models/dataDisk.js index 5a4e36bacb..f9fae37349 100644 --- a/lib/services/computeManagement2/lib/models/dataDisk.js +++ b/lib/services/computeManagement2/lib/models/dataDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a data disk. * @@ -50,8 +48,9 @@ class DataDisk { * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/diagnosticsProfile.js b/lib/services/computeManagement2/lib/models/diagnosticsProfile.js index 3abafdb77e..1b3c01eca7 100644 --- a/lib/services/computeManagement2/lib/models/diagnosticsProfile.js +++ b/lib/services/computeManagement2/lib/models/diagnosticsProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies the boot diagnostic settings state.

Minimum api-version: * 2015-06-15. diff --git a/lib/services/computeManagement2/lib/models/disallowed.js b/lib/services/computeManagement2/lib/models/disallowed.js new file mode 100644 index 0000000000..9376c28ab0 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/disallowed.js @@ -0,0 +1,59 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Describes the disallowed disk types. + * + */ +class Disallowed { + /** + * Create a Disallowed. + * @member {array} [diskTypes] A list of disk types. + */ + constructor() { + } + + /** + * Defines the metadata of Disallowed + * + * @returns {object} metadata of Disallowed + * + */ + mapper() { + return { + required: false, + serializedName: 'Disallowed', + type: { + name: 'Composite', + className: 'Disallowed', + modelProperties: { + diskTypes: { + required: false, + serializedName: 'diskTypes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = Disallowed; diff --git a/lib/services/computeManagement2/lib/models/disk.js b/lib/services/computeManagement2/lib/models/disk.js index 470ae2c184..23236931f5 100644 --- a/lib/services/computeManagement2/lib/models/disk.js +++ b/lib/services/computeManagement2/lib/models/disk.js @@ -24,7 +24,7 @@ class Disk extends models['Resource'] { * that has the disk attached. * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {string} [sku.tier] The sku tier. * @member {array} [zones] The Logical zone list for Disk. * @member {date} [timeCreated] The time when the disk was created. diff --git a/lib/services/computeManagement2/lib/models/diskEncryptionSettings.js b/lib/services/computeManagement2/lib/models/diskEncryptionSettings.js index a90094cd64..a33e93f831 100644 --- a/lib/services/computeManagement2/lib/models/diskEncryptionSettings.js +++ b/lib/services/computeManagement2/lib/models/diskEncryptionSettings.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a Encryption Settings for a Disk * diff --git a/lib/services/computeManagement2/lib/models/diskInstanceView.js b/lib/services/computeManagement2/lib/models/diskInstanceView.js index 5350cc26c3..53b49e1f71 100644 --- a/lib/services/computeManagement2/lib/models/diskInstanceView.js +++ b/lib/services/computeManagement2/lib/models/diskInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of the disk. * diff --git a/lib/services/computeManagement2/lib/models/diskSku.js b/lib/services/computeManagement2/lib/models/diskSku.js index f06042e1b9..d6f7c27c4c 100644 --- a/lib/services/computeManagement2/lib/models/diskSku.js +++ b/lib/services/computeManagement2/lib/models/diskSku.js @@ -11,14 +11,14 @@ 'use strict'; /** - * The disks sku name. Can be Standard_LRS or Premium_LRS. + * The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. * */ class DiskSku { /** * Create a DiskSku. * @member {string} [name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {string} [tier] The sku tier. Default value: 'Standard' . */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/diskUpdate.js b/lib/services/computeManagement2/lib/models/diskUpdate.js index a9899f37c5..68818a04b2 100644 --- a/lib/services/computeManagement2/lib/models/diskUpdate.js +++ b/lib/services/computeManagement2/lib/models/diskUpdate.js @@ -10,14 +10,11 @@ 'use strict'; -const models = require('./index'); - /** * Disk update resource. * - * @extends models['ResourceUpdate'] */ -class DiskUpdate extends models['ResourceUpdate'] { +class DiskUpdate { /** * Create a DiskUpdate. * @member {string} [osType] the Operating System type. Possible values @@ -50,9 +47,13 @@ class DiskUpdate extends models['ResourceUpdate'] { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {object} [tags] Resource tags + * @member {object} [sku] + * @member {string} [sku.name] The sku name. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * @member {string} [sku.tier] The sku tier. */ constructor() { - super(); } /** @@ -69,28 +70,6 @@ class DiskUpdate extends models['ResourceUpdate'] { name: 'Composite', className: 'DiskUpdate', modelProperties: { - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - sku: { - required: false, - serializedName: 'sku', - type: { - name: 'Composite', - className: 'DiskSku' - } - }, osType: { required: false, serializedName: 'properties.osType', @@ -113,6 +92,28 @@ class DiskUpdate extends models['ResourceUpdate'] { name: 'Composite', className: 'EncryptionSettings' } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'DiskSku' + } } } } diff --git a/lib/services/computeManagement2/lib/models/encryptionSettings.js b/lib/services/computeManagement2/lib/models/encryptionSettings.js index 61dd97452c..53f476b2b7 100644 --- a/lib/services/computeManagement2/lib/models/encryptionSettings.js +++ b/lib/services/computeManagement2/lib/models/encryptionSettings.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Encryption settings for disk or snapshot * diff --git a/lib/services/computeManagement2/lib/models/gallery.js b/lib/services/computeManagement2/lib/models/gallery.js new file mode 100644 index 0000000000..08b43a45d4 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/gallery.js @@ -0,0 +1,123 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Specifies information about the gallery that you want to create or update. + * + * @extends models['Resource'] + */ +class Gallery extends models['Resource'] { + /** + * Create a Gallery. + * @member {string} [description] The description of this gallery resource. + * @member {object} [identifier] + * @member {string} [identifier.uniqueName] The unique name of the gallery + * @member {string} [provisioningState] The current state of the gallery. The + * provisioning state, which only appears in the response. Possible values + * include: 'Creating', 'Updating', 'Failed', 'Succeeded', 'Deleting', + * 'Migrating' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of Gallery + * + * @returns {object} metadata of Gallery + * + */ + mapper() { + return { + required: false, + serializedName: 'Gallery', + type: { + name: 'Composite', + className: 'Gallery', + 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' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + identifier: { + required: false, + serializedName: 'properties.identifier', + type: { + name: 'Composite', + className: 'GalleryIdentifier' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = Gallery; diff --git a/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js b/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js new file mode 100644 index 0000000000..c1b20e9698 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryArtifactPublishingProfileBase.js @@ -0,0 +1,73 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the basic gallery artifact publishing profile. + * + */ +class GalleryArtifactPublishingProfileBase { + /** + * Create a GalleryArtifactPublishingProfileBase. + * @member {array} [regions] The regions where the artifact is going to be + * published. + * @member {object} [source] + * @member {object} [source.managedImage] + * @member {string} [source.managedImage.id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryArtifactPublishingProfileBase + * + * @returns {object} metadata of GalleryArtifactPublishingProfileBase + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryArtifactPublishingProfileBase', + type: { + name: 'Composite', + className: 'GalleryArtifactPublishingProfileBase', + modelProperties: { + regions: { + required: false, + serializedName: 'regions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: false, + serializedName: 'source', + type: { + name: 'Composite', + className: 'GalleryArtifactSource' + } + } + } + } + }; + } +} + +module.exports = GalleryArtifactPublishingProfileBase; diff --git a/lib/services/computeManagement2/lib/models/galleryArtifactSource.js b/lib/services/computeManagement2/lib/models/galleryArtifactSource.js new file mode 100644 index 0000000000..3a7a7e3c1a --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryArtifactSource.js @@ -0,0 +1,56 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The source of the gallery artifact. + * + */ +class GalleryArtifactSource { + /** + * Create a GalleryArtifactSource. + * @member {object} [managedImage] + * @member {string} [managedImage.id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryArtifactSource + * + * @returns {object} metadata of GalleryArtifactSource + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryArtifactSource', + type: { + name: 'Composite', + className: 'GalleryArtifactSource', + modelProperties: { + managedImage: { + required: false, + serializedName: 'managedImage', + type: { + name: 'Composite', + className: 'ManagedArtifact' + } + } + } + } + }; + } +} + +module.exports = GalleryArtifactSource; diff --git a/lib/services/computeManagement2/lib/models/galleryDataDiskImage.js b/lib/services/computeManagement2/lib/models/galleryDataDiskImage.js new file mode 100644 index 0000000000..64f6b11538 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryDataDiskImage.js @@ -0,0 +1,73 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * This is the data disk image. + * + * @extends models['GalleryDiskImage'] + */ +class GalleryDataDiskImage extends models['GalleryDiskImage'] { + /** + * Create a GalleryDataDiskImage. + * @member {number} [lun] Specifies the logical unit number of the data disk. + * This value is used to identify data disks within the VM and therefore must + * be unique for each data disk attached to a VM. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryDataDiskImage + * + * @returns {object} metadata of GalleryDataDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryDataDiskImage', + type: { + name: 'Composite', + className: 'GalleryDataDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + }, + lun: { + required: false, + serializedName: 'lun', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = GalleryDataDiskImage; diff --git a/lib/services/computeManagement2/lib/models/galleryDiskImage.js b/lib/services/computeManagement2/lib/models/galleryDiskImage.js new file mode 100644 index 0000000000..cec9fba41c --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryDiskImage.js @@ -0,0 +1,63 @@ +/* + * 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. + */ + +'use strict'; + +/** + * This is the disk image base class. + * + */ +class GalleryDiskImage { + /** + * Create a GalleryDiskImage. + * @member {number} [sizedInGB] It indicates the size of the VHD to create. + * @member {string} [hostCaching] The host caching of the disk. Valid values + * are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'None', + * 'ReadOnly', 'ReadWrite' + */ + constructor() { + } + + /** + * Defines the metadata of GalleryDiskImage + * + * @returns {object} metadata of GalleryDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryDiskImage', + type: { + name: 'Composite', + className: 'GalleryDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + } + } + } + }; + } +} + +module.exports = GalleryDiskImage; diff --git a/lib/services/computeManagement2/lib/models/galleryIdentifier.js b/lib/services/computeManagement2/lib/models/galleryIdentifier.js new file mode 100644 index 0000000000..e46d6d12e0 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryIdentifier.js @@ -0,0 +1,52 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Class representing a GalleryIdentifier. + */ +class GalleryIdentifier { + /** + * Create a GalleryIdentifier. + * @member {string} [uniqueName] The unique name of the gallery + */ + constructor() { + } + + /** + * Defines the metadata of GalleryIdentifier + * + * @returns {object} metadata of GalleryIdentifier + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryIdentifier', + type: { + name: 'Composite', + className: 'GalleryIdentifier', + modelProperties: { + uniqueName: { + required: false, + readOnly: true, + serializedName: 'uniqueName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryIdentifier; diff --git a/lib/services/computeManagement2/lib/models/galleryImage.js b/lib/services/computeManagement2/lib/models/galleryImage.js new file mode 100644 index 0000000000..74bab164a2 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImage.js @@ -0,0 +1,222 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Specifies information about the gallery image that you want to create or + * update. + * + * @extends models['Resource'] + */ +class GalleryImage extends models['Resource'] { + /** + * Create a GalleryImage. + * @member {string} [description] The description of this gallery image + * resource. + * @member {string} [eula] The Eula agreement for the gallery image. + * @member {string} [privacyStatementUri] The privacy statement uri. + * @member {string} [releaseNoteUri] The release note uri. + * @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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * @member {string} [osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * @member {date} [endOfLifeDate] The end of life of this gallery image. + * @member {object} [identifier] + * @member {string} [identifier.publisher] The gallery image publisher name. + * @member {string} [identifier.offer] The gallery image offer name. + * @member {string} [identifier.sku] The gallery image sku name. + * @member {object} [recommended] + * @member {object} [recommended.vCPUs] + * @member {number} [recommended.vCPUs.min] The minimum number of the + * resource. + * @member {number} [recommended.vCPUs.max] The maximum number of the + * resource. + * @member {object} [recommended.memory] + * @member {number} [recommended.memory.min] The minimum number of the + * resource. + * @member {number} [recommended.memory.max] The maximum number of the + * resource. + * @member {object} [disallowed] + * @member {array} [disallowed.diskTypes] A list of disk types. + * @member {object} [purchasePlan] + * @member {string} [purchasePlan.name] The plan ID. + * @member {string} [purchasePlan.publisher] The publisher ID. + * @member {string} [purchasePlan.product] The product ID. + * @member {string} [provisioningState] The current state of the gallery + * image. The provisioning state, which only appears in the response. + * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating' + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImage + * + * @returns {object} metadata of GalleryImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImage', + type: { + name: 'Composite', + className: 'GalleryImage', + 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' + } + } + } + }, + description: { + required: false, + serializedName: 'properties.description', + type: { + name: 'String' + } + }, + eula: { + required: false, + serializedName: 'properties.eula', + type: { + name: 'String' + } + }, + privacyStatementUri: { + required: false, + serializedName: 'properties.privacyStatementUri', + type: { + name: 'String' + } + }, + releaseNoteUri: { + required: false, + serializedName: 'properties.releaseNoteUri', + type: { + name: 'String' + } + }, + osType: { + required: false, + serializedName: 'properties.osType', + type: { + name: 'Enum', + allowedValues: [ 'Windows', 'Linux' ] + } + }, + osState: { + required: false, + serializedName: 'properties.osState', + type: { + name: 'Enum', + allowedValues: [ 'Generalized', 'Specialized' ] + } + }, + endOfLifeDate: { + required: false, + serializedName: 'properties.endOfLifeDate', + type: { + name: 'Date' + } + }, + identifier: { + required: false, + serializedName: 'properties.identifier', + type: { + name: 'Composite', + className: 'GalleryImageIdentifier' + } + }, + recommended: { + required: false, + serializedName: 'properties.recommended', + type: { + name: 'Composite', + className: 'RecommendedMachineConfiguration' + } + }, + disallowed: { + required: false, + serializedName: 'properties.disallowed', + type: { + name: 'Composite', + className: 'Disallowed' + } + }, + purchasePlan: { + required: false, + serializedName: 'properties.purchasePlan', + type: { + name: 'Composite', + className: 'ImagePurchasePlan' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImage; diff --git a/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js b/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js new file mode 100644 index 0000000000..6828d2276d --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageIdentifier.js @@ -0,0 +1,68 @@ +/* + * 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. + */ + +'use strict'; + +/** + * This is the gallery image identifier. + * + */ +class GalleryImageIdentifier { + /** + * Create a GalleryImageIdentifier. + * @member {string} [publisher] The gallery image publisher name. + * @member {string} [offer] The gallery image offer name. + * @member {string} [sku] The gallery image sku name. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageIdentifier + * + * @returns {object} metadata of GalleryImageIdentifier + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageIdentifier', + type: { + name: 'Composite', + className: 'GalleryImageIdentifier', + modelProperties: { + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + offer: { + required: false, + serializedName: 'offer', + type: { + name: 'String' + } + }, + sku: { + required: false, + serializedName: 'sku', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageIdentifier; diff --git a/lib/services/computeManagement2/lib/models/galleryImageList.js b/lib/services/computeManagement2/lib/models/galleryImageList.js new file mode 100644 index 0000000000..9c66d02ec3 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageList.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The List Gallery Images operation response. + */ +class GalleryImageList extends Array { + /** + * Create a GalleryImageList. + * @member {string} [nextLink] The uri to fetch the next page of gallery + * images. Call ListNext() with this to fetch the next page of gallery + * images. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageList + * + * @returns {object} metadata of GalleryImageList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageList', + type: { + name: 'Composite', + className: 'GalleryImageList', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryImageElementType', + type: { + name: 'Composite', + className: 'GalleryImage' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageList; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersion.js b/lib/services/computeManagement2/lib/models/galleryImageVersion.js new file mode 100644 index 0000000000..286394a1f1 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersion.js @@ -0,0 +1,148 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Specifies information about the gallery image version that you want to + * create or update. + * + * @extends models['Resource'] + */ +class GalleryImageVersion extends models['Resource'] { + /** + * Create a GalleryImageVersion. + * @member {object} [publishingProfile] + * @member {boolean} [publishingProfile.excludeFromLatest] The flag means + * that if it is set to true, people deploying VMs with 'latest' as version + * will not use this version. + * @member {date} [publishingProfile.publishedDate] The time when the gallery + * image version is published. + * @member {date} [publishingProfile.endOfLifeDate] The end of life date of + * the gallery image version. + * @member {string} [provisioningState] The current state of the gallery + * image version. The provisioning state, which only appears in the response. + * Possible values include: 'Creating', 'Updating', 'Failed', 'Succeeded', + * 'Deleting', 'Migrating' + * @member {object} [storageProfile] + * @member {object} [storageProfile.osDiskImage] + * @member {array} [storageProfile.dataDiskImages] A list of data disk + * images. + * @member {object} [replicationStatus] + * @member {string} [replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [replicationStatus.summary] This is a summary of + * replication status for each region. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageVersion + * + * @returns {object} metadata of GalleryImageVersion + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersion', + type: { + name: 'Composite', + className: 'GalleryImageVersion', + 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' + } + } + } + }, + publishingProfile: { + required: false, + serializedName: 'properties.publishingProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionPublishingProfile' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + storageProfile: { + required: false, + serializedName: 'properties.storageProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionStorageProfile' + } + }, + replicationStatus: { + required: false, + serializedName: 'properties.replicationStatus', + type: { + name: 'Composite', + className: 'ReplicationStatus' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersion; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionList.js b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js new file mode 100644 index 0000000000..19bc6c80cf --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionList.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The List Gallery Image version operation response. + */ +class GalleryImageVersionList extends Array { + /** + * Create a GalleryImageVersionList. + * @member {string} [nextLink] The uri to fetch the next page of gallery + * image versions. Call ListNext() with this to fetch the next page of + * gallery image versions. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageVersionList + * + * @returns {object} metadata of GalleryImageVersionList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionList', + type: { + name: 'Composite', + className: 'GalleryImageVersionList', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryImageVersionElementType', + type: { + name: 'Composite', + className: 'GalleryImageVersion' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionList; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js b/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js new file mode 100644 index 0000000000..8e4803afdc --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionPublishingProfile.js @@ -0,0 +1,99 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * The publishing profile of a gallery image version. + * + * @extends models['GalleryArtifactPublishingProfileBase'] + */ +class GalleryImageVersionPublishingProfile extends models['GalleryArtifactPublishingProfileBase'] { + /** + * Create a GalleryImageVersionPublishingProfile. + * @member {boolean} [excludeFromLatest] The flag means that if it is set to + * true, people deploying VMs with 'latest' as version will not use this + * version. + * @member {date} [publishedDate] The time when the gallery image version is + * published. + * @member {date} [endOfLifeDate] The end of life date of the gallery image + * version. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryImageVersionPublishingProfile + * + * @returns {object} metadata of GalleryImageVersionPublishingProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionPublishingProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionPublishingProfile', + modelProperties: { + regions: { + required: false, + serializedName: 'regions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: false, + serializedName: 'source', + type: { + name: 'Composite', + className: 'GalleryArtifactSource' + } + }, + excludeFromLatest: { + required: false, + serializedName: 'excludeFromLatest', + type: { + name: 'Boolean' + } + }, + publishedDate: { + required: false, + readOnly: true, + serializedName: 'publishedDate', + type: { + name: 'Date' + } + }, + endOfLifeDate: { + required: false, + serializedName: 'endOfLifeDate', + type: { + name: 'Date' + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionPublishingProfile; diff --git a/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js b/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js new file mode 100644 index 0000000000..b7b2b486f7 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryImageVersionStorageProfile.js @@ -0,0 +1,71 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * This is the storage profile of a gallery image version. + * + */ +class GalleryImageVersionStorageProfile { + /** + * Create a GalleryImageVersionStorageProfile. + * @member {object} [osDiskImage] + * @member {array} [dataDiskImages] A list of data disk images. + */ + constructor() { + } + + /** + * Defines the metadata of GalleryImageVersionStorageProfile + * + * @returns {object} metadata of GalleryImageVersionStorageProfile + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryImageVersionStorageProfile', + type: { + name: 'Composite', + className: 'GalleryImageVersionStorageProfile', + modelProperties: { + osDiskImage: { + required: false, + serializedName: 'osDiskImage', + type: { + name: 'Composite', + className: 'GalleryOSDiskImage' + } + }, + dataDiskImages: { + required: false, + serializedName: 'dataDiskImages', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryDataDiskImageElementType', + type: { + name: 'Composite', + className: 'GalleryDataDiskImage' + } + } + } + } + } + } + }; + } +} + +module.exports = GalleryImageVersionStorageProfile; diff --git a/lib/services/computeManagement2/lib/models/galleryList.js b/lib/services/computeManagement2/lib/models/galleryList.js new file mode 100644 index 0000000000..3d28a0c7fe --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryList.js @@ -0,0 +1,68 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The List Galleries operation response. + */ +class GalleryList extends Array { + /** + * Create a GalleryList. + * @member {string} [nextLink] The uri to fetch the next page of galleries. + * Call ListNext() with this to fetch the next page of galleries. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryList + * + * @returns {object} metadata of GalleryList + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryList', + type: { + name: 'Composite', + className: 'GalleryList', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'GalleryElementType', + type: { + name: 'Composite', + className: 'Gallery' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = GalleryList; diff --git a/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js b/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js new file mode 100644 index 0000000000..a5a0915cc6 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/galleryOSDiskImage.js @@ -0,0 +1,63 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * This is the OS disk image. + * + * @extends models['GalleryDiskImage'] + */ +class GalleryOSDiskImage extends models['GalleryDiskImage'] { + /** + * Create a GalleryOSDiskImage. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of GalleryOSDiskImage + * + * @returns {object} metadata of GalleryOSDiskImage + * + */ + mapper() { + return { + required: false, + serializedName: 'GalleryOSDiskImage', + type: { + name: 'Composite', + className: 'GalleryOSDiskImage', + modelProperties: { + sizedInGB: { + required: false, + serializedName: 'sizedInGB', + type: { + name: 'Number' + } + }, + hostCaching: { + required: false, + serializedName: 'hostCaching', + type: { + name: 'Enum', + allowedValues: [ 'None', 'ReadOnly', 'ReadWrite' ] + } + } + } + } + }; + } +} + +module.exports = GalleryOSDiskImage; diff --git a/lib/services/computeManagement2/lib/models/image.js b/lib/services/computeManagement2/lib/models/image.js index 50e1764899..db72791ed9 100644 --- a/lib/services/computeManagement2/lib/models/image.js +++ b/lib/services/computeManagement2/lib/models/image.js @@ -53,8 +53,8 @@ class Image extends models['Resource'] { * 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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/imageDataDisk.js b/lib/services/computeManagement2/lib/models/imageDataDisk.js index 1c4c5e7d30..f79608afe8 100644 --- a/lib/services/computeManagement2/lib/models/imageDataDisk.js +++ b/lib/services/computeManagement2/lib/models/imageDataDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a data disk. * @@ -36,8 +34,9 @@ class ImageDataDisk { * 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 * @member {string} [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' + * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/imageOSDisk.js b/lib/services/computeManagement2/lib/models/imageOSDisk.js index 2e3abc90ec..72db90564c 100644 --- a/lib/services/computeManagement2/lib/models/imageOSDisk.js +++ b/lib/services/computeManagement2/lib/models/imageOSDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes an Operating System disk. * @@ -39,8 +37,9 @@ class ImageOSDisk { * 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 * @member {string} [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' + * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/imagePurchasePlan.js b/lib/services/computeManagement2/lib/models/imagePurchasePlan.js new file mode 100644 index 0000000000..4725879e5a --- /dev/null +++ b/lib/services/computeManagement2/lib/models/imagePurchasePlan.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Describes the gallery image purchase plan. This is used by marketplace + * images. + * + */ +class ImagePurchasePlan { + /** + * Create a ImagePurchasePlan. + * @member {string} [name] The plan ID. + * @member {string} [publisher] The publisher ID. + * @member {string} [product] The product ID. + */ + constructor() { + } + + /** + * Defines the metadata of ImagePurchasePlan + * + * @returns {object} metadata of ImagePurchasePlan + * + */ + mapper() { + return { + required: false, + serializedName: 'ImagePurchasePlan', + type: { + name: 'Composite', + className: 'ImagePurchasePlan', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + publisher: { + required: false, + serializedName: 'publisher', + type: { + name: 'String' + } + }, + product: { + required: false, + serializedName: 'product', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ImagePurchasePlan; diff --git a/lib/services/computeManagement2/lib/models/imageStorageProfile.js b/lib/services/computeManagement2/lib/models/imageStorageProfile.js index 1d36d1e724..1c819ec4eb 100644 --- a/lib/services/computeManagement2/lib/models/imageStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/imageStorageProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a storage profile. * @@ -44,8 +42,9 @@ class ImageStorageProfile { * disk in a virtual machine image.

This value cannot be larger than * 1023 GB * @member {string} [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' + * type for the managed disk. Possible values are: Standard_LRS, Premium_LRS, + * and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * a data disk to a virtual machine.

For more information about * disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/imageUpdate.js b/lib/services/computeManagement2/lib/models/imageUpdate.js index 16ea2a9ac7..9ddd1afd4d 100644 --- a/lib/services/computeManagement2/lib/models/imageUpdate.js +++ b/lib/services/computeManagement2/lib/models/imageUpdate.js @@ -13,9 +13,7 @@ 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. + * The source user image virtual hard disk. Only tags may be updated. * * @extends models['UpdateResource'] */ @@ -53,8 +51,8 @@ class ImageUpdate extends models['UpdateResource'] { * 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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index e1e00fc3f7..07d1b17439 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -163,15 +163,7 @@ export interface UpdateResource extends BaseResource { * Initializes a new instance of the AvailabilitySetUpdate class. * @constructor * Specifies information about the availability set that the virtual machine - * should be assigned to. Virtual machines specified in the same availability - * set are allocated to different nodes to maximize availability. For more - * information about availability sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * should be assigned to. Only tags may be updated. * * @member {number} [platformUpdateDomainCount] Update Domain count. * @member {number} [platformFaultDomainCount] Fault Domain count. @@ -501,12 +493,19 @@ export interface VirtualMachineCaptureParameters { * @class * Initializes a new instance of the VirtualMachineCaptureResult class. * @constructor - * Resource Id. + * Output of virtual machine capture operation. * - * @member {object} [output] Operation output data (raw JSON) + * @member {string} [schema] the schema of the captured virtual machine + * @member {string} [contentVersion] the version of the content + * @member {object} [parameters] parameters of the captured virtual machine + * @member {array} [resources] a list of resource items of the captured virtual + * machine */ export interface VirtualMachineCaptureResult extends SubResource { - output?: any; + readonly schema?: string; + readonly contentVersion?: string; + readonly parameters?: any; + readonly resources?: any[]; } /** @@ -709,8 +708,9 @@ export interface VirtualHardDisk { * The parameters of a managed disk. * * @member {string} [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' + * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ export interface ManagedDiskParameters extends SubResource { storageAccountType?: string; @@ -776,8 +776,9 @@ export interface ManagedDiskParameters extends SubResource { * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ export interface OSDisk { osType?: string; @@ -828,8 +829,9 @@ export interface OSDisk { * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ export interface DataDisk { lun: number; @@ -922,8 +924,9 @@ export interface DataDisk { * 1023 GB * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add a * data disk to a virtual machine.

For more information about disks, * see [About disks and VHDs for Azure virtual @@ -1080,10 +1083,16 @@ export interface SshConfiguration { * @member {object} [ssh] Specifies the ssh key configuration for a Linux OS. * @member {array} [ssh.publicKeys] The list of SSH public keys used to * authenticate with linux based VMs. + * @member {boolean} [provisionVMAgent] Indicates whether virtual machine agent + * should be provisioned on the virtual machine.

When this property is + * not specified in the request body, default behavior is to set it to true. + * This will ensure that VM Agent is installed on the VM so that extensions can + * be added to the VM later. */ export interface LinuxConfiguration { disablePasswordAuthentication?: boolean; ssh?: SshConfiguration; + provisionVMAgent?: boolean; } /** @@ -1208,8 +1217,16 @@ export interface VaultSecretGroup { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine.

+ * When this property is not specified in the request body, default behavior is + * to set it to true. This will ensure that VM Agent is installed on the VM so + * that extensions can be added to the VM later. * @member {array} [secrets] Specifies set of certificates that should be * installed onto the virtual machine. + * @member {boolean} [allowExtensionOperations] Specifies whether extension + * operations should be allowed on the virtual machine.

This may only + * be set to False when no extensions are present on the virtual machine. */ export interface OSProfile { computerName?: string; @@ -1219,6 +1236,7 @@ export interface OSProfile { windowsConfiguration?: WindowsConfiguration; linuxConfiguration?: LinuxConfiguration; secrets?: VaultSecretGroup[]; + allowExtensionOperations?: boolean; } /** @@ -1363,6 +1381,18 @@ export interface BootDiagnosticsInstanceView { serialConsoleLogBlobUri?: string; } +/** + * @class + * Initializes a new instance of the VirtualMachineIdentityUserAssignedIdentitiesValue class. + * @constructor + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ +export interface VirtualMachineIdentityUserAssignedIdentitiesValue { + readonly principalId?: string; + readonly clientId?: string; +} + /** * @class * Initializes a new instance of the VirtualMachineIdentity class. @@ -1378,16 +1408,16 @@ export interface BootDiagnosticsInstanceView { * identity and a set of user assigned identities. The type 'None' will remove * any identities from the virtual machine. Possible values include: * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identityIds] The list of user identities associated with - * the Virtual Machine. The user identity references will be ARM resource ids - * in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the Virtual Machine. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ export interface VirtualMachineIdentity { readonly principalId?: string; readonly tenantId?: string; type?: string; - identityIds?: string[]; + userAssignedIdentities?: { [propertyName: string]: VirtualMachineIdentityUserAssignedIdentitiesValue }; } /** @@ -1657,8 +1687,8 @@ export interface VirtualMachineInstanceView { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -1738,8 +1768,17 @@ export interface VirtualMachineInstanceView { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine.

This + * may only be set to False when no extensions are present on the virtual + * machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -1854,10 +1893,10 @@ export interface VirtualMachineInstanceView { * created identity and a set of user assigned identities. The type 'None' will * remove any identities from the virtual machine. Possible values include: * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the Virtual Machine. The user identity dictionary + * key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine zones. */ export interface VirtualMachine extends Resource { @@ -1881,7 +1920,7 @@ export interface VirtualMachine extends Resource { * @class * Initializes a new instance of the VirtualMachineUpdate class. * @constructor - * Describes a Virtual Machine. + * Describes a Virtual Machine Update. * * @member {object} [plan] Specifies information about the marketplace image * used to create the virtual machine. This element is only used for @@ -2044,8 +2083,8 @@ export interface VirtualMachine extends Resource { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -2125,8 +2164,17 @@ export interface VirtualMachine extends Resource { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine.

This + * may only be set to False when no extensions are present on the virtual + * machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -2240,10 +2288,10 @@ export interface VirtualMachine extends Resource { * created identity and a set of user assigned identities. The type 'None' will * remove any identities from the virtual machine. Possible values include: * 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the Virtual Machine. The user identity dictionary + * key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine zones. */ export interface VirtualMachineUpdate extends UpdateResource { @@ -2262,6 +2310,19 @@ export interface VirtualMachineUpdate extends UpdateResource { zones?: string[]; } +/** + * @class + * Initializes a new instance of the AutoOSUpgradePolicy class. + * @constructor + * The configuration parameters used for performing automatic OS upgrade. + * + * @member {boolean} [disableAutoRollback] Whether OS image rollback feature + * should be disabled. Default value is false. + */ +export interface AutoOSUpgradePolicy { + disableAutoRollback?: boolean; +} + /** * @class * Initializes a new instance of the RollingUpgradePolicy class. @@ -2336,11 +2397,16 @@ export interface RollingUpgradePolicy { * @member {boolean} [automaticOSUpgrade] Whether OS upgrades should * automatically be applied to scale set instances in a rolling fashion when a * newer version of the image becomes available. + * @member {object} [autoOSUpgradePolicy] Configuration parameters used for + * performing automatic OS Upgrade. + * @member {boolean} [autoOSUpgradePolicy.disableAutoRollback] Whether OS image + * rollback feature should be disabled. Default value is false. */ export interface UpgradePolicy { mode?: string; rollingUpgradePolicy?: RollingUpgradePolicy; automaticOSUpgrade?: boolean; + autoOSUpgradePolicy?: AutoOSUpgradePolicy; } /** @@ -2368,8 +2434,9 @@ export interface UpgradePolicy { * 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 * @member {string} [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' + * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ export interface ImageOSDisk { osType: string; @@ -2404,8 +2471,9 @@ export interface ImageOSDisk { * 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 * @member {string} [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' + * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ export interface ImageDataDisk { lun: number; @@ -2447,8 +2515,9 @@ export interface ImageDataDisk { * in 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 * @member {string} [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' + * type for the managed disk. Possible values are: Standard_LRS, Premium_LRS, + * and StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add a * data disk to a virtual machine.

For more information about disks, * see [About disks and VHDs for Azure virtual @@ -2501,8 +2570,9 @@ export interface ImageStorageProfile { * name of the disk in a virtual machine image.

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' + * storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -2522,9 +2592,7 @@ export interface Image extends Resource { * @class * Initializes a new instance of the ImageUpdate class. * @constructor - * 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. + * The source user image virtual hard disk. Only tags may be updated. * * @member {object} [sourceVirtualMachine] The source virtual machine from * which Image is created. @@ -2556,8 +2624,9 @@ export interface Image extends Resource { * name of the disk in a virtual machine image.

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' + * storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -2573,6 +2642,18 @@ export interface ImageUpdate extends UpdateResource { readonly provisioningState?: string; } +/** + * @class + * Initializes a new instance of the VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue class. + * @constructor + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ +export interface VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue { + readonly principalId?: string; + readonly clientId?: string; +} + /** * @class * Initializes a new instance of the VirtualMachineScaleSetIdentity class. @@ -2591,16 +2672,16 @@ export interface ImageUpdate extends UpdateResource { * 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, * UserAssigned', 'None' - * @member {array} [identityIds] The list of user identities associated with - * the virtual machine scale set. The user identity references will be ARM - * resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the virtual machine scale set. The user identity dictionary + * key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ export interface VirtualMachineScaleSetIdentity { readonly principalId?: string; readonly tenantId?: string; type?: string; - identityIds?: string[]; + userAssignedIdentities?: { [propertyName: string]: VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue }; } /** @@ -2678,6 +2759,11 @@ export interface VirtualMachineScaleSetIdentity { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine.

+ * When this property is not specified in the request body, default behavior is + * to set it to true. This will ensure that VM Agent is installed on the VM so + * that extensions can be added to the VM later. * @member {array} [secrets] Specifies set of certificates that should be * installed onto the virtual machines in the scale set. */ @@ -2724,6 +2810,11 @@ export interface VirtualMachineScaleSetOSProfile { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine.

+ * When this property is not specified in the request body, default behavior is + * to set it to true. This will ensure that VM Agent is installed on the VM so + * that extensions can be added to the VM later. * @member {array} [secrets] The List of certificates for addition to the VM. */ export interface VirtualMachineScaleSetUpdateOSProfile { @@ -2740,8 +2831,9 @@ export interface VirtualMachineScaleSetUpdateOSProfile { * Describes the parameters of a ScaleSet managed disk. * * @member {string} [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' + * the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ export interface VirtualMachineScaleSetManagedDiskParameters { storageAccountType?: string; @@ -2767,6 +2859,10 @@ export interface VirtualMachineScaleSetManagedDiskParameters { * 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 the operating system + * disk in gigabytes. This element can be used to overwrite the size of the + * disk in a virtual machine image.

This value cannot be larger than + * 1023 GB * @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.

Possible values are:

**Windows**

@@ -2778,14 +2874,16 @@ export interface VirtualMachineScaleSetManagedDiskParameters { * to store operating system disks for the scale set. * @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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ export interface VirtualMachineScaleSetOSDisk { name?: string; caching?: string; writeAcceleratorEnabled?: boolean; createOption: string; + diskSizeGB?: number; osType?: string; image?: VirtualHardDisk; vhdContainers?: string[]; @@ -2803,6 +2901,10 @@ export interface VirtualMachineScaleSetOSDisk { * 'None', 'ReadOnly', 'ReadWrite' * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. + * @member {number} [diskSizeGB] Specifies the size of the operating system + * disk in gigabytes. This element can be used to overwrite the size of the + * disk in a virtual machine image.

This value cannot be larger than + * 1023 GB * @member {object} [image] The Source User Image VirtualHardDisk. This * VirtualHardDisk will be copied before using it to attach to the Virtual * Machine. If SourceImage is provided, the destination VirtualHardDisk should @@ -2812,12 +2914,14 @@ export interface VirtualMachineScaleSetOSDisk { * uris. * @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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ export interface VirtualMachineScaleSetUpdateOSDisk { caching?: string; writeAcceleratorEnabled?: boolean; + diskSizeGB?: number; image?: VirtualHardDisk; vhdContainers?: string[]; managedDisk?: VirtualMachineScaleSetManagedDiskParameters; @@ -2842,12 +2946,13 @@ export interface VirtualMachineScaleSetUpdateOSDisk { * @member {string} createOption The create option. 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 + * gigabytes. This element can be used to overwrite the size of the disk in a * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ export interface VirtualMachineScaleSetDataDisk { name?: string; @@ -2900,6 +3005,10 @@ export interface VirtualMachineScaleSetDataDisk { * 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} [osDisk.diskSizeGB] Specifies the size of the operating + * system disk in gigabytes. This element can be used to overwrite the size of + * the disk in a virtual machine image.

This value cannot be larger + * than 1023 GB * @member {string} [osDisk.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.

Possible values are:

**Windows** @@ -2911,8 +3020,9 @@ export interface VirtualMachineScaleSetDataDisk { * used to store operating system disks for the scale set. * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * data disks to the virtual machines in the scale set.

For more * information about disks, see [About disks and VHDs for Azure virtual @@ -2947,6 +3057,10 @@ export interface VirtualMachineScaleSetStorageProfile { * 'None', 'ReadOnly', 'ReadWrite' * @member {boolean} [osDisk.writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. + * @member {number} [osDisk.diskSizeGB] Specifies the size of the operating + * system disk in gigabytes. This element can be used to overwrite the size of + * the disk in a virtual machine image.

This value cannot be larger + * than 1023 GB * @member {object} [osDisk.image] The Source User Image VirtualHardDisk. This * VirtualHardDisk will be copied before using it to attach to the Virtual * Machine. If SourceImage is provided, the destination VirtualHardDisk should @@ -2956,8 +3070,9 @@ export interface VirtualMachineScaleSetStorageProfile { * container uris. * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] The data disks. */ export interface VirtualMachineScaleSetUpdateStorageProfile { @@ -2994,6 +3109,21 @@ export interface VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { domainNameLabel: string; } +/** + * @class + * Initializes a new instance of the VirtualMachineScaleSetIpTag class. + * @constructor + * Contains the IP tag associated with the public IP address. + * + * @member {string} [ipTagType] IP tag type. Example: FirstPartyUsage. + * @member {string} [tag] IP tag associated with the public IP. Example: SQL, + * Storage etc. + */ +export interface VirtualMachineScaleSetIpTag { + ipTagType?: string; + tag?: string; +} + /** * @class * Initializes a new instance of the VirtualMachineScaleSetPublicIPAddressConfiguration class. @@ -3009,11 +3139,18 @@ export interface VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { * @member {string} [dnsSettings.domainNameLabel] The Domain name label.The * concatenation of the domain name label and vm index will be the domain name * labels of the PublicIPAddress resources that will be created + * @member {array} [ipTags] The list of IP tags associated with the public IP + * address. + * @member {object} [publicIPPrefix] The PublicIPPrefix from which to allocate + * publicIP addresses. + * @member {string} [publicIPPrefix.id] Resource Id */ export interface VirtualMachineScaleSetPublicIPAddressConfiguration { name: string; idleTimeoutInMinutes?: number; dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + ipTags?: VirtualMachineScaleSetIpTag[]; + publicIPPrefix?: SubResource; } /** @@ -3062,6 +3199,12 @@ export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { * The Domain name label.The concatenation of the domain name label and vm * index will be the domain name labels of the PublicIPAddress resources that * will be created + * @member {array} [publicIPAddressConfiguration.ipTags] The list of IP tags + * associated with the public IP address. + * @member {object} [publicIPAddressConfiguration.publicIPPrefix] The + * PublicIPPrefix from which to allocate publicIP addresses. + * @member {string} [publicIPAddressConfiguration.publicIPPrefix.id] Resource + * Id * @member {string} [privateIPAddressVersion] Available from Api-Version * 2017-03-30 onwards, it represents whether the specific ipconfiguration is * IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and @@ -3070,6 +3213,8 @@ export interface VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { * of references to backend address pools of application gateways. A scale set * can reference backend address pools of multiple application gateways. * Multiple scale sets cannot use the same application gateway. + * @member {array} [applicationSecurityGroups] Specifies an array of references + * to application security group. * @member {array} [loadBalancerBackendAddressPools] Specifies an array of * references to backend address pools of load balancers. A scale set can * reference backend address pools of one public and one internal load @@ -3086,6 +3231,7 @@ export interface VirtualMachineScaleSetIPConfiguration extends SubResource { publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; privateIPAddressVersion?: string; applicationGatewayBackendAddressPools?: SubResource[]; + applicationSecurityGroups?: SubResource[]; loadBalancerBackendAddressPools?: SubResource[]; loadBalancerInboundNatPools?: SubResource[]; } @@ -3120,6 +3266,8 @@ export interface VirtualMachineScaleSetIPConfiguration extends SubResource { * 'IPv6'. Possible values include: 'IPv4', 'IPv6' * @member {array} [applicationGatewayBackendAddressPools] The application * gateway backend address pools. + * @member {array} [applicationSecurityGroups] Specifies an array of references + * to application security group. * @member {array} [loadBalancerBackendAddressPools] The load balancer backend * address pools. * @member {array} [loadBalancerInboundNatPools] The load balancer inbound nat @@ -3132,6 +3280,7 @@ export interface VirtualMachineScaleSetUpdateIPConfiguration extends SubResource publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; privateIPAddressVersion?: string; applicationGatewayBackendAddressPools?: SubResource[]; + applicationSecurityGroups?: SubResource[]; loadBalancerBackendAddressPools?: SubResource[]; loadBalancerInboundNatPools?: SubResource[]; } @@ -3387,6 +3536,11 @@ export interface VirtualMachineScaleSetExtensionProfile { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machines in the scale set. * @member {object} [storageProfile] Specifies the storage settings for the @@ -3429,6 +3583,10 @@ export interface VirtualMachineScaleSetExtensionProfile { * 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} [storageProfile.osDisk.diskSizeGB] Specifies the size of + * the operating system disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * @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 user-image or a specialized VHD.

Possible values are:

@@ -3444,8 +3602,8 @@ export interface VirtualMachineScaleSetExtensionProfile { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add data disks to the virtual machines in the scale set.

* For more information about disks, see [About disks and VHDs for Azure @@ -3490,6 +3648,9 @@ export interface VirtualMachineScaleSetExtensionProfile { * @member {string} [priority] Specifies the priority for the virtual machines * in the scale set.

Minimum api-version: 2017-10-30-preview. Possible * values include: 'Regular', 'Low' + * @member {string} [evictionPolicy] Specifies the eviction policy for virtual + * machines in a low priority scale set.

Minimum api-version: + * 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' */ export interface VirtualMachineScaleSetVMProfile { osProfile?: VirtualMachineScaleSetOSProfile; @@ -3499,6 +3660,7 @@ export interface VirtualMachineScaleSetVMProfile { extensionProfile?: VirtualMachineScaleSetExtensionProfile; licenseType?: string; priority?: string; + evictionPolicy?: string; } /** @@ -3537,6 +3699,11 @@ export interface VirtualMachineScaleSetVMProfile { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * @member {array} [osProfile.secrets] The List of certificates for addition to * the VM. * @member {object} [storageProfile] The virtual machine scale set storage @@ -3560,6 +3727,10 @@ export interface VirtualMachineScaleSetVMProfile { * values include: 'None', 'ReadOnly', 'ReadWrite' * @member {boolean} [storageProfile.osDisk.writeAcceleratorEnabled] Specifies * whether writeAccelerator should be enabled or disabled on the disk. + * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of + * the operating system disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * @member {object} [storageProfile.osDisk.image] The Source User Image * VirtualHardDisk. This VirtualHardDisk will be copied before using it to * attach to the Virtual Machine. If SourceImage is provided, the destination @@ -3572,8 +3743,8 @@ export interface VirtualMachineScaleSetVMProfile { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] The data disks. * @member {object} [networkProfile] The virtual machine scale set network * profile. @@ -3671,6 +3842,11 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * @member {boolean} [upgradePolicy.automaticOSUpgrade] Whether OS upgrades * should automatically be applied to scale set instances in a rolling fashion * when a newer version of the image becomes available. + * @member {object} [upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * @member {boolean} [upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] + * Whether OS image rollback feature should be disabled. Default value is + * false. * @member {object} [virtualMachineProfile] The virtual machine profile. * @member {object} [virtualMachineProfile.osProfile] Specifies the operating * system settings for the virtual machines in the scale set. @@ -3753,6 +3929,12 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * @member {array} * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] The list * of SSH public keys used to authenticate with linux based VMs. + * @member {boolean} + * [virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * @member {array} [virtualMachineProfile.osProfile.secrets] Specifies set of * certificates that should be installed onto the virtual machines in the scale * set. @@ -3804,6 +3986,10 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * 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} [virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

This value cannot be larger than 1023 GB * @member {string} [virtualMachineProfile.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 user-image or a specialized VHD.

@@ -3822,8 +4008,8 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * @member {string} * [virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] Specifies * the parameters that are used to add data disks to the virtual machines in * the scale set.

For more information about disks, see [About disks @@ -3874,6 +4060,10 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * @member {string} [virtualMachineProfile.priority] Specifies the priority for * the virtual machines in the scale set.

Minimum api-version: * 2017-10-30-preview. Possible values include: 'Regular', 'Low' + * @member {string} [virtualMachineProfile.evictionPolicy] Specifies the + * eviction policy for virtual machines in a low priority scale set. + *

Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' * @member {string} [provisioningState] The provisioning state, which only * appears in the response. * @member {boolean} [overprovision] Specifies whether the Virtual Machine @@ -3900,10 +4090,10 @@ export interface VirtualMachineScaleSetUpdateVMProfile { * 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, * UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the virtual machine scale set. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine scale set zones. */ export interface VirtualMachineScaleSet extends Resource { @@ -3980,6 +4170,11 @@ export interface VirtualMachineScaleSet extends Resource { * @member {boolean} [upgradePolicy.automaticOSUpgrade] Whether OS upgrades * should automatically be applied to scale set instances in a rolling fashion * when a newer version of the image becomes available. + * @member {object} [upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * @member {boolean} [upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] + * Whether OS image rollback feature should be disabled. Default value is + * false. * @member {object} [virtualMachineProfile] The virtual machine profile. * @member {object} [virtualMachineProfile.osProfile] The virtual machine scale * set OS profile. @@ -4019,6 +4214,12 @@ export interface VirtualMachineScaleSet extends Resource { * @member {array} * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] The list * of SSH public keys used to authenticate with linux based VMs. + * @member {boolean} + * [virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * @member {array} [virtualMachineProfile.osProfile.secrets] The List of * certificates for addition to the VM. * @member {object} [virtualMachineProfile.storageProfile] The virtual machine @@ -4048,6 +4249,10 @@ export interface VirtualMachineScaleSet extends Resource { * [virtualMachineProfile.storageProfile.osDisk.writeAcceleratorEnabled] * Specifies whether writeAccelerator should be enabled or disabled on the * disk. + * @member {number} [virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

This value cannot be larger than 1023 GB * @member {object} [virtualMachineProfile.storageProfile.osDisk.image] The * Source User Image VirtualHardDisk. This VirtualHardDisk will be copied * before using it to attach to the Virtual Machine. If SourceImage is @@ -4061,8 +4266,8 @@ export interface VirtualMachineScaleSet extends Resource { * @member {string} * [virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] The data * disks. * @member {object} [virtualMachineProfile.networkProfile] The virtual machine @@ -4108,10 +4313,10 @@ export interface VirtualMachineScaleSet extends Resource { * 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, * UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the virtual machine scale set. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ export interface VirtualMachineScaleSetUpdate extends UpdateResource { sku?: Sku; @@ -4260,47 +4465,412 @@ export interface VirtualMachineScaleSetSku { /** * @class - * Initializes a new instance of the VirtualMachineScaleSetVM class. + * Initializes a new instance of the ApiErrorBase class. * @constructor - * Describes a virtual machine scale set virtual machine. + * Api error base. * - * @member {string} [instanceId] The virtual machine instance ID. - * @member {object} [sku] The virtual machine SKU. - * @member {string} [sku.name] The sku name. - * @member {string} [sku.tier] Specifies the tier of virtual machines in a - * scale set.

Possible Values:

**Standard**

- * **Basic** - * @member {number} [sku.capacity] Specifies the number of virtual machines in - * the scale set. - * @member {boolean} [latestModelApplied] Specifies whether the latest model - * has been applied to the virtual machine. - * @member {string} [vmId] Azure VM unique ID. - * @member {object} [instanceView] The virtual machine instance view. - * @member {number} [instanceView.platformUpdateDomain] Specifies the update - * domain of the virtual machine. - * @member {number} [instanceView.platformFaultDomain] Specifies the fault - * domain of the virtual machine. - * @member {string} [instanceView.computerName] The computer name assigned to - * the virtual machine. - * @member {string} [instanceView.osName] The Operating System running on the - * virtual machine. - * @member {string} [instanceView.osVersion] The version of Operating System - * running on the virtual machine. - * @member {string} [instanceView.rdpThumbPrint] The Remote desktop certificate - * thumbprint. - * @member {object} [instanceView.vmAgent] The VM Agent running on the virtual + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. + */ +export interface ApiErrorBase { + code?: string; + target?: string; + message?: string; +} + +/** + * @class + * Initializes a new instance of the InnerError class. + * @constructor + * Inner error details. + * + * @member {string} [exceptiontype] The exception type. + * @member {string} [errordetail] The internal error message or exception dump. + */ +export interface InnerError { + exceptiontype?: string; + errordetail?: string; +} + +/** + * @class + * Initializes a new instance of the ApiError class. + * @constructor + * Api error. + * + * @member {array} [details] The Api error details + * @member {object} [innererror] The Api inner error + * @member {string} [innererror.exceptiontype] The exception type. + * @member {string} [innererror.errordetail] The internal error message or + * exception dump. + * @member {string} [code] The error code. + * @member {string} [target] The target of the particular error. + * @member {string} [message] The error message. + */ +export interface ApiError { + details?: ApiErrorBase[]; + innererror?: InnerError; + code?: string; + target?: string; + message?: string; +} + +/** + * @class + * Initializes a new instance of the RollbackStatusInfo class. + * @constructor + * Information about rollback on failed VM instances after a OS Upgrade + * operation. + * + * @member {number} [successfullyRolledbackInstanceCount] The number of + * instances which have been successfully rolled back. + * @member {number} [failedRolledbackInstanceCount] The number of instances + * which failed to rollback. + * @member {object} [rollbackError] Error details if OS rollback failed. + * @member {array} [rollbackError.details] The Api error details + * @member {object} [rollbackError.innererror] The Api inner error + * @member {string} [rollbackError.innererror.exceptiontype] The exception + * type. + * @member {string} [rollbackError.innererror.errordetail] The internal error + * message or exception dump. + * @member {string} [rollbackError.code] The error code. + * @member {string} [rollbackError.target] The target of the particular error. + * @member {string} [rollbackError.message] The error message. + */ +export interface RollbackStatusInfo { + readonly successfullyRolledbackInstanceCount?: number; + readonly failedRolledbackInstanceCount?: number; + readonly rollbackError?: ApiError; +} + +/** + * @class + * Initializes a new instance of the UpgradeOperationHistoryStatus class. + * @constructor + * Information about the current running state of the overall upgrade. + * + * @member {string} [code] Code indicating the current status of the upgrade. + * Possible values include: 'RollingForward', 'Cancelled', 'Completed', + * 'Faulted' + * @member {date} [startTime] Start time of the upgrade. + * @member {date} [endTime] End time of the upgrade. + */ +export interface UpgradeOperationHistoryStatus { + readonly code?: string; + readonly startTime?: Date; + readonly endTime?: Date; +} + +/** + * @class + * Initializes a new instance of the RollingUpgradeProgressInfo class. + * @constructor + * Information about the number of virtual machine instances in each upgrade + * state. + * + * @member {number} [successfulInstanceCount] The number of instances that have + * been successfully upgraded. + * @member {number} [failedInstanceCount] The number of instances that have + * failed to be upgraded successfully. + * @member {number} [inProgressInstanceCount] The number of instances that are + * currently being upgraded. + * @member {number} [pendingInstanceCount] The number of instances that have + * not yet begun to be upgraded. + */ +export interface RollingUpgradeProgressInfo { + readonly successfulInstanceCount?: number; + readonly failedInstanceCount?: number; + readonly inProgressInstanceCount?: number; + readonly pendingInstanceCount?: number; +} + +/** + * @class + * Initializes a new instance of the UpgradeOperationHistoricalStatusInfoProperties class. + * @constructor + * Describes each OS upgrade on the Virtual Machine Scale Set. + * + * @member {object} [runningStatus] Information about the overall status of the + * upgrade operation. + * @member {string} [runningStatus.code] Code indicating the current status of + * the upgrade. Possible values include: 'RollingForward', 'Cancelled', + * 'Completed', 'Faulted' + * @member {date} [runningStatus.startTime] Start time of the upgrade. + * @member {date} [runningStatus.endTime] End time of the upgrade. + * @member {object} [progress] Counts of the VM's in each state. + * @member {number} [progress.successfulInstanceCount] The number of instances + * that have been successfully upgraded. + * @member {number} [progress.failedInstanceCount] The number of instances that + * have failed to be upgraded successfully. + * @member {number} [progress.inProgressInstanceCount] The number of instances + * that are currently being upgraded. + * @member {number} [progress.pendingInstanceCount] The number of instances + * that have not yet begun to be upgraded. + * @member {object} [error] Error Details for this upgrade if there are any. + * @member {array} [error.details] The Api error details + * @member {object} [error.innererror] The Api inner error + * @member {string} [error.innererror.exceptiontype] The exception type. + * @member {string} [error.innererror.errordetail] The internal error message + * or exception dump. + * @member {string} [error.code] The error code. + * @member {string} [error.target] The target of the particular error. + * @member {string} [error.message] The error message. + * @member {string} [startedBy] Invoker of the Upgrade Operation. Possible + * values include: 'Unknown', 'User', 'Platform' + * @member {object} [targetImageReference] Image Reference details + * @member {string} [targetImageReference.publisher] The image publisher. + * @member {string} [targetImageReference.offer] Specifies the offer of the + * platform image or marketplace image used to create the virtual machine. + * @member {string} [targetImageReference.sku] The image SKU. + * @member {string} [targetImageReference.version] Specifies the version of the + * platform image or marketplace image used to create the virtual machine. The + * allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build + * are decimal numbers. Specify 'latest' to use the latest version of an image + * available at deploy time. Even if you use 'latest', the VM image will not + * automatically update after deploy time even if a new version becomes + * available. + * @member {object} [rollbackInfo] Information about OS rollback if performed + * @member {number} [rollbackInfo.successfullyRolledbackInstanceCount] The + * number of instances which have been successfully rolled back. + * @member {number} [rollbackInfo.failedRolledbackInstanceCount] The number of + * instances which failed to rollback. + * @member {object} [rollbackInfo.rollbackError] Error details if OS rollback + * failed. + * @member {array} [rollbackInfo.rollbackError.details] The Api error details + * @member {object} [rollbackInfo.rollbackError.innererror] The Api inner error + * @member {string} [rollbackInfo.rollbackError.innererror.exceptiontype] The + * exception type. + * @member {string} [rollbackInfo.rollbackError.innererror.errordetail] The + * internal error message or exception dump. + * @member {string} [rollbackInfo.rollbackError.code] The error code. + * @member {string} [rollbackInfo.rollbackError.target] The target of the + * particular error. + * @member {string} [rollbackInfo.rollbackError.message] The error message. + */ +export interface UpgradeOperationHistoricalStatusInfoProperties { + readonly runningStatus?: UpgradeOperationHistoryStatus; + readonly progress?: RollingUpgradeProgressInfo; + readonly error?: ApiError; + readonly startedBy?: string; + readonly targetImageReference?: ImageReference; + readonly rollbackInfo?: RollbackStatusInfo; +} + +/** + * @class + * Initializes a new instance of the UpgradeOperationHistoricalStatusInfo class. + * @constructor + * Virtual Machine Scale Set OS Upgrade History operation response. + * + * @member {object} [properties] Information about the properties of the + * upgrade operation. + * @member {object} [properties.runningStatus] Information about the overall + * status of the upgrade operation. + * @member {string} [properties.runningStatus.code] Code indicating the current + * status of the upgrade. Possible values include: 'RollingForward', + * 'Cancelled', 'Completed', 'Faulted' + * @member {date} [properties.runningStatus.startTime] Start time of the + * upgrade. + * @member {date} [properties.runningStatus.endTime] End time of the upgrade. + * @member {object} [properties.progress] Counts of the VM's in each state. + * @member {number} [properties.progress.successfulInstanceCount] The number of + * instances that have been successfully upgraded. + * @member {number} [properties.progress.failedInstanceCount] The number of + * instances that have failed to be upgraded successfully. + * @member {number} [properties.progress.inProgressInstanceCount] The number of + * instances that are currently being upgraded. + * @member {number} [properties.progress.pendingInstanceCount] The number of + * instances that have not yet begun to be upgraded. + * @member {object} [properties.error] Error Details for this upgrade if there + * are any. + * @member {array} [properties.error.details] The Api error details + * @member {object} [properties.error.innererror] The Api inner error + * @member {string} [properties.error.innererror.exceptiontype] The exception + * type. + * @member {string} [properties.error.innererror.errordetail] The internal + * error message or exception dump. + * @member {string} [properties.error.code] The error code. + * @member {string} [properties.error.target] The target of the particular + * error. + * @member {string} [properties.error.message] The error message. + * @member {string} [properties.startedBy] Invoker of the Upgrade Operation. + * Possible values include: 'Unknown', 'User', 'Platform' + * @member {object} [properties.targetImageReference] Image Reference details + * @member {string} [properties.targetImageReference.publisher] The image + * publisher. + * @member {string} [properties.targetImageReference.offer] Specifies the offer + * of the platform image or marketplace image used to create the virtual * machine. - * @member {string} [instanceView.vmAgent.vmAgentVersion] The VM Agent full - * version. - * @member {array} [instanceView.vmAgent.extensionHandlers] The virtual machine - * extension handler instance view. - * @member {array} [instanceView.vmAgent.statuses] The resource status - * information. - * @member {object} [instanceView.maintenanceRedeployStatus] The Maintenance - * Operation status on the virtual machine. - * @member {boolean} - * [instanceView.maintenanceRedeployStatus.isCustomerInitiatedMaintenanceAllowed] - * True, if customer is allowed to perform Maintenance. + * @member {string} [properties.targetImageReference.sku] The image SKU. + * @member {string} [properties.targetImageReference.version] Specifies the + * version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. + * @member {object} [properties.rollbackInfo] Information about OS rollback if + * performed + * @member {number} + * [properties.rollbackInfo.successfullyRolledbackInstanceCount] The number of + * instances which have been successfully rolled back. + * @member {number} [properties.rollbackInfo.failedRolledbackInstanceCount] The + * number of instances which failed to rollback. + * @member {object} [properties.rollbackInfo.rollbackError] Error details if OS + * rollback failed. + * @member {array} [properties.rollbackInfo.rollbackError.details] The Api + * error details + * @member {object} [properties.rollbackInfo.rollbackError.innererror] The Api + * inner error + * @member {string} + * [properties.rollbackInfo.rollbackError.innererror.exceptiontype] The + * exception type. + * @member {string} + * [properties.rollbackInfo.rollbackError.innererror.errordetail] The internal + * error message or exception dump. + * @member {string} [properties.rollbackInfo.rollbackError.code] The error + * code. + * @member {string} [properties.rollbackInfo.rollbackError.target] The target + * of the particular error. + * @member {string} [properties.rollbackInfo.rollbackError.message] The error + * message. + * @member {string} [type] Resource type + * @member {string} [location] Resource location + */ +export interface UpgradeOperationHistoricalStatusInfo { + readonly properties?: UpgradeOperationHistoricalStatusInfoProperties; + readonly type?: string; + readonly location?: string; +} + +/** + * @class + * Initializes a new instance of the VirtualMachineHealthStatus class. + * @constructor + * The health status of the VM. + * + * @member {object} [status] The health status information for the VM. + * @member {string} [status.code] The status code. + * @member {string} [status.level] The level code. Possible values include: + * 'Info', 'Warning', 'Error' + * @member {string} [status.displayStatus] The short localizable label for the + * status. + * @member {string} [status.message] The detailed status message, including for + * alerts and error messages. + * @member {date} [status.time] The time of the status. + */ +export interface VirtualMachineHealthStatus { + readonly status?: InstanceViewStatus; +} + +/** + * @class + * Initializes a new instance of the VirtualMachineScaleSetVMInstanceView class. + * @constructor + * The instance view of a virtual machine scale set VM. + * + * @member {number} [platformUpdateDomain] The Update Domain count. + * @member {number} [platformFaultDomain] The Fault Domain count. + * @member {string} [rdpThumbPrint] The Remote desktop certificate thumbprint. + * @member {object} [vmAgent] The VM Agent running on the virtual machine. + * @member {string} [vmAgent.vmAgentVersion] The VM Agent full version. + * @member {array} [vmAgent.extensionHandlers] The virtual machine extension + * handler instance view. + * @member {array} [vmAgent.statuses] The resource status information. + * @member {object} [maintenanceRedeployStatus] The Maintenance Operation + * status on the virtual machine. + * @member {boolean} + * [maintenanceRedeployStatus.isCustomerInitiatedMaintenanceAllowed] True, if + * customer is allowed to perform Maintenance. + * @member {date} [maintenanceRedeployStatus.preMaintenanceWindowStartTime] + * Start Time for the Pre Maintenance Window. + * @member {date} [maintenanceRedeployStatus.preMaintenanceWindowEndTime] End + * Time for the Pre Maintenance Window. + * @member {date} [maintenanceRedeployStatus.maintenanceWindowStartTime] Start + * Time for the Maintenance Window. + * @member {date} [maintenanceRedeployStatus.maintenanceWindowEndTime] End Time + * for the Maintenance Window. + * @member {string} [maintenanceRedeployStatus.lastOperationResultCode] The + * Last Maintenance Operation Result Code. Possible values include: 'None', + * 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted' + * @member {string} [maintenanceRedeployStatus.lastOperationMessage] Message + * returned for the last Maintenance Operation. + * @member {array} [disks] The disks information. + * @member {array} [extensions] The extensions information. + * @member {object} [vmHealth] The health status for the VM. + * @member {object} [vmHealth.status] The health status information for the VM. + * @member {string} [vmHealth.status.code] The status code. + * @member {string} [vmHealth.status.level] The level code. Possible values + * include: 'Info', 'Warning', 'Error' + * @member {string} [vmHealth.status.displayStatus] The short localizable label + * for the status. + * @member {string} [vmHealth.status.message] The detailed status message, + * including for alerts and error messages. + * @member {date} [vmHealth.status.time] The time of the status. + * @member {object} [bootDiagnostics] Boot Diagnostics is a debugging feature + * which allows you to view Console Output and Screenshot to diagnose VM + * status.

For Linux Virtual Machines, you can easily view the output + * of your console log.

For both Windows and Linux virtual machines, + * Azure also enables you to see a screenshot of the VM from the hypervisor. + * @member {string} [bootDiagnostics.consoleScreenshotBlobUri] The console + * screenshot blob URI. + * @member {string} [bootDiagnostics.serialConsoleLogBlobUri] The Linux serial + * console log blob Uri. + * @member {array} [statuses] The resource status information. + * @member {string} [placementGroupId] The placement group in which the VM is + * running. If the VM is deallocated it will not have a placementGroupId. + */ +export interface VirtualMachineScaleSetVMInstanceView { + platformUpdateDomain?: number; + platformFaultDomain?: number; + rdpThumbPrint?: string; + vmAgent?: VirtualMachineAgentInstanceView; + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + disks?: DiskInstanceView[]; + extensions?: VirtualMachineExtensionInstanceView[]; + readonly vmHealth?: VirtualMachineHealthStatus; + bootDiagnostics?: BootDiagnosticsInstanceView; + statuses?: InstanceViewStatus[]; + placementGroupId?: string; +} + +/** + * @class + * Initializes a new instance of the VirtualMachineScaleSetVM class. + * @constructor + * Describes a virtual machine scale set virtual machine. + * + * @member {string} [instanceId] The virtual machine instance ID. + * @member {object} [sku] The virtual machine SKU. + * @member {string} [sku.name] The sku name. + * @member {string} [sku.tier] Specifies the tier of virtual machines in a + * scale set.

Possible Values:

**Standard**

+ * **Basic** + * @member {number} [sku.capacity] Specifies the number of virtual machines in + * the scale set. + * @member {boolean} [latestModelApplied] Specifies whether the latest model + * has been applied to the virtual machine. + * @member {string} [vmId] Azure VM unique ID. + * @member {object} [instanceView] The virtual machine instance view. + * @member {number} [instanceView.platformUpdateDomain] The Update Domain + * count. + * @member {number} [instanceView.platformFaultDomain] The Fault Domain count. + * @member {string} [instanceView.rdpThumbPrint] The Remote desktop certificate + * thumbprint. + * @member {object} [instanceView.vmAgent] The VM Agent running on the virtual + * machine. + * @member {string} [instanceView.vmAgent.vmAgentVersion] The VM Agent full + * version. + * @member {array} [instanceView.vmAgent.extensionHandlers] The virtual machine + * extension handler instance view. + * @member {array} [instanceView.vmAgent.statuses] The resource status + * information. + * @member {object} [instanceView.maintenanceRedeployStatus] The Maintenance + * Operation status on the virtual machine. + * @member {boolean} + * [instanceView.maintenanceRedeployStatus.isCustomerInitiatedMaintenanceAllowed] + * True, if customer is allowed to perform Maintenance. * @member {date} * [instanceView.maintenanceRedeployStatus.preMaintenanceWindowStartTime] Start * Time for the Pre Maintenance Window. @@ -4320,8 +4890,19 @@ export interface VirtualMachineScaleSetSku { * @member {string} * [instanceView.maintenanceRedeployStatus.lastOperationMessage] Message * returned for the last Maintenance Operation. - * @member {array} [instanceView.disks] The virtual machine disk information. + * @member {array} [instanceView.disks] The disks information. * @member {array} [instanceView.extensions] The extensions information. + * @member {object} [instanceView.vmHealth] The health status for the VM. + * @member {object} [instanceView.vmHealth.status] The health status + * information for the VM. + * @member {string} [instanceView.vmHealth.status.code] The status code. + * @member {string} [instanceView.vmHealth.status.level] The level code. + * Possible values include: 'Info', 'Warning', 'Error' + * @member {string} [instanceView.vmHealth.status.displayStatus] The short + * localizable label for the status. + * @member {string} [instanceView.vmHealth.status.message] The detailed status + * message, including for alerts and error messages. + * @member {date} [instanceView.vmHealth.status.time] The time of the status. * @member {object} [instanceView.bootDiagnostics] Boot Diagnostics is a * debugging feature which allows you to view Console Output and Screenshot to * diagnose VM status.

For Linux Virtual Machines, you can easily view @@ -4333,6 +4914,9 @@ export interface VirtualMachineScaleSetSku { * @member {string} [instanceView.bootDiagnostics.serialConsoleLogBlobUri] The * Linux serial console log blob Uri. * @member {array} [instanceView.statuses] The resource status information. + * @member {string} [instanceView.placementGroupId] The placement group in + * which the VM is running. If the VM is deallocated it will not have a + * placementGroupId. * @member {object} [hardwareProfile] Specifies the hardware settings for the * virtual machine. * @member {string} [hardwareProfile.vmSize] Specifies the size of the virtual @@ -4481,8 +5065,8 @@ export interface VirtualMachineScaleSetSku { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that are * used to add a data disk to a virtual machine.

For more information * about disks, see [About disks and VHDs for Azure virtual @@ -4562,8 +5146,17 @@ export interface VirtualMachineScaleSetSku { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine.

This + * may only be set to False when no extensions are present on the virtual + * machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -4617,13 +5210,14 @@ export interface VirtualMachineScaleSetSku { * element. * @member {string} [plan.promotionCode] The promotion code. * @member {array} [resources] The virtual machine child extension resources. + * @member {array} [zones] The virtual machine zones. */ export interface VirtualMachineScaleSetVM extends Resource { readonly instanceId?: string; readonly sku?: Sku; readonly latestModelApplied?: boolean; readonly vmId?: string; - readonly instanceView?: VirtualMachineInstanceView; + readonly instanceView?: VirtualMachineScaleSetVMInstanceView; hardwareProfile?: HardwareProfile; storageProfile?: StorageProfile; osProfile?: OSProfile; @@ -4634,97 +5228,7 @@ export interface VirtualMachineScaleSetVM extends Resource { licenseType?: string; plan?: Plan; readonly resources?: VirtualMachineExtension[]; -} - -/** - * @class - * Initializes a new instance of the VirtualMachineHealthStatus class. - * @constructor - * The health status of the VM. - * - * @member {object} [status] The health status information for the VM. - * @member {string} [status.code] The status code. - * @member {string} [status.level] The level code. Possible values include: - * 'Info', 'Warning', 'Error' - * @member {string} [status.displayStatus] The short localizable label for the - * status. - * @member {string} [status.message] The detailed status message, including for - * alerts and error messages. - * @member {date} [status.time] The time of the status. - */ -export interface VirtualMachineHealthStatus { - readonly status?: InstanceViewStatus; -} - -/** - * @class - * Initializes a new instance of the VirtualMachineScaleSetVMInstanceView class. - * @constructor - * The instance view of a virtual machine scale set VM. - * - * @member {number} [platformUpdateDomain] The Update Domain count. - * @member {number} [platformFaultDomain] The Fault Domain count. - * @member {string} [rdpThumbPrint] The Remote desktop certificate thumbprint. - * @member {object} [vmAgent] The VM Agent running on the virtual machine. - * @member {string} [vmAgent.vmAgentVersion] The VM Agent full version. - * @member {array} [vmAgent.extensionHandlers] The virtual machine extension - * handler instance view. - * @member {array} [vmAgent.statuses] The resource status information. - * @member {object} [maintenanceRedeployStatus] The Maintenance Operation - * status on the virtual machine. - * @member {boolean} - * [maintenanceRedeployStatus.isCustomerInitiatedMaintenanceAllowed] True, if - * customer is allowed to perform Maintenance. - * @member {date} [maintenanceRedeployStatus.preMaintenanceWindowStartTime] - * Start Time for the Pre Maintenance Window. - * @member {date} [maintenanceRedeployStatus.preMaintenanceWindowEndTime] End - * Time for the Pre Maintenance Window. - * @member {date} [maintenanceRedeployStatus.maintenanceWindowStartTime] Start - * Time for the Maintenance Window. - * @member {date} [maintenanceRedeployStatus.maintenanceWindowEndTime] End Time - * for the Maintenance Window. - * @member {string} [maintenanceRedeployStatus.lastOperationResultCode] The - * Last Maintenance Operation Result Code. Possible values include: 'None', - * 'RetryLater', 'MaintenanceAborted', 'MaintenanceCompleted' - * @member {string} [maintenanceRedeployStatus.lastOperationMessage] Message - * returned for the last Maintenance Operation. - * @member {array} [disks] The disks information. - * @member {array} [extensions] The extensions information. - * @member {object} [vmHealth] The health status for the VM. - * @member {object} [vmHealth.status] The health status information for the VM. - * @member {string} [vmHealth.status.code] The status code. - * @member {string} [vmHealth.status.level] The level code. Possible values - * include: 'Info', 'Warning', 'Error' - * @member {string} [vmHealth.status.displayStatus] The short localizable label - * for the status. - * @member {string} [vmHealth.status.message] The detailed status message, - * including for alerts and error messages. - * @member {date} [vmHealth.status.time] The time of the status. - * @member {object} [bootDiagnostics] Boot Diagnostics is a debugging feature - * which allows you to view Console Output and Screenshot to diagnose VM - * status.

For Linux Virtual Machines, you can easily view the output - * of your console log.

For both Windows and Linux virtual machines, - * Azure also enables you to see a screenshot of the VM from the hypervisor. - * @member {string} [bootDiagnostics.consoleScreenshotBlobUri] The console - * screenshot blob URI. - * @member {string} [bootDiagnostics.serialConsoleLogBlobUri] The Linux serial - * console log blob Uri. - * @member {array} [statuses] The resource status information. - * @member {string} [placementGroupId] The placement group in which the VM is - * running. If the VM is deallocated it will not have a placementGroupId. - */ -export interface VirtualMachineScaleSetVMInstanceView { - platformUpdateDomain?: number; - platformFaultDomain?: number; - rdpThumbPrint?: string; - vmAgent?: VirtualMachineAgentInstanceView; - maintenanceRedeployStatus?: MaintenanceRedeployStatus; - disks?: DiskInstanceView[]; - extensions?: VirtualMachineExtensionInstanceView[]; - readonly vmHealth?: VirtualMachineHealthStatus; - bootDiagnostics?: BootDiagnosticsInstanceView; - statuses?: InstanceViewStatus[]; - placementGroupId?: string; + readonly zones?: string[]; } /** @@ -4748,82 +5252,6 @@ export interface RollingUpgradeRunningStatus { readonly lastActionTime?: Date; } -/** - * @class - * Initializes a new instance of the RollingUpgradeProgressInfo class. - * @constructor - * Information about the number of virtual machine instances in each upgrade - * state. - * - * @member {number} [successfulInstanceCount] The number of instances that have - * been successfully upgraded. - * @member {number} [failedInstanceCount] The number of instances that have - * failed to be upgraded successfully. - * @member {number} [inProgressInstanceCount] The number of instances that are - * currently being upgraded. - * @member {number} [pendingInstanceCount] The number of instances that have - * not yet begun to be upgraded. - */ -export interface RollingUpgradeProgressInfo { - readonly successfulInstanceCount?: number; - readonly failedInstanceCount?: number; - readonly inProgressInstanceCount?: number; - readonly pendingInstanceCount?: number; -} - -/** - * @class - * Initializes a new instance of the ApiErrorBase class. - * @constructor - * Api error base. - * - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiErrorBase { - code?: string; - target?: string; - message?: string; -} - -/** - * @class - * Initializes a new instance of the InnerError class. - * @constructor - * Inner error details. - * - * @member {string} [exceptiontype] The exception type. - * @member {string} [errordetail] The internal error message or exception dump. - */ -export interface InnerError { - exceptiontype?: string; - errordetail?: string; -} - -/** - * @class - * Initializes a new instance of the ApiError class. - * @constructor - * Api error. - * - * @member {array} [details] The Api error details - * @member {object} [innererror] The Api inner error - * @member {string} [innererror.exceptiontype] The exception type. - * @member {string} [innererror.errordetail] The internal error message or - * exception dump. - * @member {string} [code] The error code. - * @member {string} [target] The target of the particular error. - * @member {string} [message] The error message. - */ -export interface ApiError { - details?: ApiErrorBase[]; - innererror?: InnerError; - code?: string; - target?: string; - message?: string; -} - /** * @class * Initializes a new instance of the RollingUpgradeStatusInfo class. @@ -4890,18 +5318,6 @@ export interface RollingUpgradeStatusInfo extends Resource { readonly error?: ApiError; } -/** - * @class - * Initializes a new instance of the ComputeLongRunningOperationProperties class. - * @constructor - * Compute-specific operation properties, including output - * - * @member {object} [output] Operation output data (raw JSON) - */ -export interface ComputeLongRunningOperationProperties { - output?: any; -} - /** * @class * Initializes a new instance of the RecoveryWalkResponse class. @@ -4918,34 +5334,6 @@ export interface RecoveryWalkResponse { readonly nextPlatformUpdateDomain?: number; } -/** - * @class - * Initializes a new instance of the OperationStatusResponse class. - * @constructor - * Operation status response - * - * @member {string} [name] Operation ID - * @member {string} [status] Operation status - * @member {date} [startTime] Start time of the operation - * @member {date} [endTime] End time of the operation - * @member {object} [error] Api error - * @member {array} [error.details] The Api error details - * @member {object} [error.innererror] The Api inner error - * @member {string} [error.innererror.exceptiontype] The exception type. - * @member {string} [error.innererror.errordetail] The internal error message - * or exception dump. - * @member {string} [error.code] The error code. - * @member {string} [error.target] The target of the particular error. - * @member {string} [error.message] The error message. - */ -export interface OperationStatusResponse { - readonly name?: string; - readonly status?: string; - readonly startTime?: Date; - readonly endTime?: Date; - readonly error?: ApiError; -} - /** * @class * Initializes a new instance of the LogAnalyticsInputBase class. @@ -5016,7 +5404,7 @@ export interface LogAnalyticsOutput { * @member {object} [properties] LogAnalyticsOutput * @member {string} [properties.output] Output file Uri path to blob container. */ -export interface LogAnalyticsOperationResult extends OperationStatusResponse { +export interface LogAnalyticsOperationResult { readonly properties?: LogAnalyticsOutput; } @@ -5110,12 +5498,10 @@ export interface RunCommandDocument extends RunCommandDocumentBase { * @class * Initializes a new instance of the RunCommandResult class. * @constructor - * Run command operation response. - * - * @member {object} [output] Operation output data (raw JSON) + * @member {array} [value] Run command operation response. */ -export interface RunCommandResult extends OperationStatusResponse { - output?: any; +export interface RunCommandResult { + value?: InstanceViewStatus[]; } /** @@ -5273,10 +5659,10 @@ export interface ResourceSku { * @class * Initializes a new instance of the DiskSku class. * @constructor - * The disks sku name. Can be Standard_LRS or Premium_LRS. + * The disks sku name. Can be Standard_LRS, Premium_LRS, or StandardSSD_LRS. * * @member {string} [name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {string} [tier] The sku tier. Default value: 'Standard' . */ export interface DiskSku { @@ -5284,23 +5670,6 @@ export interface DiskSku { readonly tier?: string; } -/** - * @class - * Initializes a new instance of the ResourceUpdate class. - * @constructor - * The Resource model definition. - * - * @member {object} [tags] Resource tags - * @member {object} [sku] - * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' - * @member {string} [sku.tier] The sku tier. - */ -export interface ResourceUpdate { - tags?: { [propertyName: string]: string }; - sku?: DiskSku; -} - /** * @class * Initializes a new instance of the ImageDiskReference class. @@ -5437,7 +5806,7 @@ export interface EncryptionSettings { * has the disk attached. * @member {object} [sku] * @member {string} [sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {string} [sku.tier] The sku tier. * @member {array} [zones] The Logical zone list for Disk. * @member {date} [timeCreated] The time when the disk was created. @@ -5540,11 +5909,18 @@ export interface Disk extends Resource { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {object} [tags] Resource tags + * @member {object} [sku] + * @member {string} [sku.name] The sku name. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * @member {string} [sku.tier] The sku tier. */ -export interface DiskUpdate extends ResourceUpdate { +export interface DiskUpdate { osType?: string; diskSizeGB?: number; encryptionSettings?: EncryptionSettings; + tags?: { [propertyName: string]: string }; + sku?: DiskSku; } /** @@ -5699,11 +6075,18 @@ export interface Snapshot extends Resource { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {object} [tags] Resource tags + * @member {object} [sku] + * @member {string} [sku.name] The sku name. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' + * @member {string} [sku.tier] The sku tier. */ -export interface SnapshotUpdate extends ResourceUpdate { +export interface SnapshotUpdate { osType?: string; diskSizeGB?: number; encryptionSettings?: EncryptionSettings; + tags?: { [propertyName: string]: string }; + sku?: SnapshotSku; } /** @@ -5971,8 +6354,12 @@ export interface ComputeOperationListResult extends Array * @constructor * The List Availability Set operation response. * + * @member {string} [nextLink] The URI to fetch the next page of + * AvailabilitySets. Call ListNext() with this URI to fetch the next page of + * AvailabilitySets. */ export interface AvailabilitySetListResult extends Array { + nextLink?: string; } /** @@ -5985,19 +6372,6 @@ export interface AvailabilitySetListResult extends Array { export interface VirtualMachineSizeListResult extends Array { } -/** - * @class - * Initializes a new instance of the VirtualMachineListResult class. - * @constructor - * The List Virtual Machine operation response. - * - * @member {string} [nextLink] The URI to fetch the next page of VMs. Call - * ListNext() with this URI to fetch the next page of Virtual Machines. - */ -export interface VirtualMachineListResult extends Array { - nextLink?: string; -} - /** * @class * Initializes a new instance of the ListUsagesResult class. @@ -6025,6 +6399,19 @@ export interface ImageListResult extends Array { nextLink?: string; } +/** + * @class + * Initializes a new instance of the VirtualMachineListResult class. + * @constructor + * The List Virtual Machine operation response. + * + * @member {string} [nextLink] The URI to fetch the next page of VMs. Call + * ListNext() with this URI to fetch the next page of Virtual Machines. + */ +export interface VirtualMachineListResult extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the VirtualMachineScaleSetListResult class. @@ -6067,6 +6454,20 @@ export interface VirtualMachineScaleSetListSkusResult extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the VirtualMachineScaleSetExtensionListResult class. diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index f396363aaa..792d56d379 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -70,11 +70,13 @@ exports.VirtualMachineExtensionHandlerInstanceView = require('./virtualMachineEx exports.VirtualMachineAgentInstanceView = require('./virtualMachineAgentInstanceView'); exports.DiskInstanceView = require('./diskInstanceView'); exports.BootDiagnosticsInstanceView = require('./bootDiagnosticsInstanceView'); +exports.VirtualMachineIdentityUserAssignedIdentitiesValue = require('./virtualMachineIdentityUserAssignedIdentitiesValue'); exports.VirtualMachineIdentity = require('./virtualMachineIdentity'); exports.MaintenanceRedeployStatus = require('./maintenanceRedeployStatus'); exports.VirtualMachineInstanceView = require('./virtualMachineInstanceView'); exports.VirtualMachine = require('./virtualMachine'); exports.VirtualMachineUpdate = require('./virtualMachineUpdate'); +exports.AutoOSUpgradePolicy = require('./autoOSUpgradePolicy'); exports.RollingUpgradePolicy = require('./rollingUpgradePolicy'); exports.UpgradePolicy = require('./upgradePolicy'); exports.ImageOSDisk = require('./imageOSDisk'); @@ -82,6 +84,7 @@ exports.ImageDataDisk = require('./imageDataDisk'); exports.ImageStorageProfile = require('./imageStorageProfile'); exports.Image = require('./image'); exports.ImageUpdate = require('./imageUpdate'); +exports.VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue = require('./virtualMachineScaleSetIdentityUserAssignedIdentitiesValue'); exports.VirtualMachineScaleSetIdentity = require('./virtualMachineScaleSetIdentity'); exports.VirtualMachineScaleSetOSProfile = require('./virtualMachineScaleSetOSProfile'); exports.VirtualMachineScaleSetUpdateOSProfile = require('./virtualMachineScaleSetUpdateOSProfile'); @@ -93,6 +96,7 @@ exports.VirtualMachineScaleSetStorageProfile = require('./virtualMachineScaleSet exports.VirtualMachineScaleSetUpdateStorageProfile = require('./virtualMachineScaleSetUpdateStorageProfile'); exports.ApiEntityReference = require('./apiEntityReference'); exports.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings = require('./virtualMachineScaleSetPublicIPAddressConfigurationDnsSettings'); +exports.VirtualMachineScaleSetIpTag = require('./virtualMachineScaleSetIpTag'); exports.VirtualMachineScaleSetPublicIPAddressConfiguration = require('./virtualMachineScaleSetPublicIPAddressConfiguration'); exports.VirtualMachineScaleSetUpdatePublicIPAddressConfiguration = require('./virtualMachineScaleSetUpdatePublicIPAddressConfiguration'); exports.VirtualMachineScaleSetIPConfiguration = require('./virtualMachineScaleSetIPConfiguration'); @@ -117,18 +121,20 @@ exports.VirtualMachineScaleSetVMExtensionsSummary = require('./virtualMachineSca exports.VirtualMachineScaleSetInstanceView = require('./virtualMachineScaleSetInstanceView'); exports.VirtualMachineScaleSetSkuCapacity = require('./virtualMachineScaleSetSkuCapacity'); exports.VirtualMachineScaleSetSku = require('./virtualMachineScaleSetSku'); -exports.VirtualMachineScaleSetVM = require('./virtualMachineScaleSetVM'); -exports.VirtualMachineHealthStatus = require('./virtualMachineHealthStatus'); -exports.VirtualMachineScaleSetVMInstanceView = require('./virtualMachineScaleSetVMInstanceView'); -exports.RollingUpgradeRunningStatus = require('./rollingUpgradeRunningStatus'); -exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo'); exports.ApiErrorBase = require('./apiErrorBase'); exports.InnerError = require('./innerError'); exports.ApiError = require('./apiError'); +exports.RollbackStatusInfo = require('./rollbackStatusInfo'); +exports.UpgradeOperationHistoryStatus = require('./upgradeOperationHistoryStatus'); +exports.RollingUpgradeProgressInfo = require('./rollingUpgradeProgressInfo'); +exports.UpgradeOperationHistoricalStatusInfoProperties = require('./upgradeOperationHistoricalStatusInfoProperties'); +exports.UpgradeOperationHistoricalStatusInfo = require('./upgradeOperationHistoricalStatusInfo'); +exports.VirtualMachineHealthStatus = require('./virtualMachineHealthStatus'); +exports.VirtualMachineScaleSetVMInstanceView = require('./virtualMachineScaleSetVMInstanceView'); +exports.VirtualMachineScaleSetVM = require('./virtualMachineScaleSetVM'); +exports.RollingUpgradeRunningStatus = require('./rollingUpgradeRunningStatus'); exports.RollingUpgradeStatusInfo = require('./rollingUpgradeStatusInfo'); -exports.ComputeLongRunningOperationProperties = require('./computeLongRunningOperationProperties'); exports.RecoveryWalkResponse = require('./recoveryWalkResponse'); -exports.OperationStatusResponse = require('./operationStatusResponse'); exports.LogAnalyticsInputBase = require('./logAnalyticsInputBase'); exports.RequestRateByIntervalInput = require('./requestRateByIntervalInput'); exports.ThrottledRequestsInput = require('./throttledRequestsInput'); @@ -148,7 +154,6 @@ exports.ResourceSkuRestrictions = require('./resourceSkuRestrictions'); exports.ResourceSkuLocationInfo = require('./resourceSkuLocationInfo'); exports.ResourceSku = require('./resourceSku'); exports.DiskSku = require('./diskSku'); -exports.ResourceUpdate = require('./resourceUpdate'); exports.ImageDiskReference = require('./imageDiskReference'); exports.CreationData = require('./creationData'); exports.SourceVault = require('./sourceVault'); @@ -177,12 +182,13 @@ exports.ContainerService = require('./containerService'); exports.ComputeOperationListResult = require('./computeOperationListResult'); exports.AvailabilitySetListResult = require('./availabilitySetListResult'); exports.VirtualMachineSizeListResult = require('./virtualMachineSizeListResult'); -exports.VirtualMachineListResult = require('./virtualMachineListResult'); exports.ListUsagesResult = require('./listUsagesResult'); exports.ImageListResult = require('./imageListResult'); +exports.VirtualMachineListResult = require('./virtualMachineListResult'); exports.VirtualMachineScaleSetListResult = require('./virtualMachineScaleSetListResult'); exports.VirtualMachineScaleSetListWithLinkResult = require('./virtualMachineScaleSetListWithLinkResult'); exports.VirtualMachineScaleSetListSkusResult = require('./virtualMachineScaleSetListSkusResult'); +exports.VirtualMachineScaleSetListOSUpgradeHistory = require('./virtualMachineScaleSetListOSUpgradeHistory'); exports.VirtualMachineScaleSetExtensionListResult = require('./virtualMachineScaleSetExtensionListResult'); exports.VirtualMachineScaleSetVMListResult = require('./virtualMachineScaleSetVMListResult'); exports.RunCommandListResult = require('./runCommandListResult'); diff --git a/lib/services/computeManagement2/lib/models/keyVaultAndKeyReference.js b/lib/services/computeManagement2/lib/models/keyVaultAndKeyReference.js index a20c7e9b39..6c9bf7d60b 100644 --- a/lib/services/computeManagement2/lib/models/keyVaultAndKeyReference.js +++ b/lib/services/computeManagement2/lib/models/keyVaultAndKeyReference.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Key Vault Key Url and vault id of KeK, KeK is optional and when provided is * used to unwrap the encryptionKey diff --git a/lib/services/computeManagement2/lib/models/keyVaultAndSecretReference.js b/lib/services/computeManagement2/lib/models/keyVaultAndSecretReference.js index 967bc9c38c..aa6bcbfe5a 100644 --- a/lib/services/computeManagement2/lib/models/keyVaultAndSecretReference.js +++ b/lib/services/computeManagement2/lib/models/keyVaultAndSecretReference.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Key Vault Secret Url and vault id of the encryption key * diff --git a/lib/services/computeManagement2/lib/models/keyVaultKeyReference.js b/lib/services/computeManagement2/lib/models/keyVaultKeyReference.js index d5875b2927..f66d9f0e9d 100644 --- a/lib/services/computeManagement2/lib/models/keyVaultKeyReference.js +++ b/lib/services/computeManagement2/lib/models/keyVaultKeyReference.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a reference to Key Vault Key * diff --git a/lib/services/computeManagement2/lib/models/keyVaultSecretReference.js b/lib/services/computeManagement2/lib/models/keyVaultSecretReference.js index ea317e47e8..422a764da3 100644 --- a/lib/services/computeManagement2/lib/models/keyVaultSecretReference.js +++ b/lib/services/computeManagement2/lib/models/keyVaultSecretReference.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a reference to Key Vault Secret * diff --git a/lib/services/computeManagement2/lib/models/linuxConfiguration.js b/lib/services/computeManagement2/lib/models/linuxConfiguration.js index 879d4b2cc5..e5b3822cc4 100644 --- a/lib/services/computeManagement2/lib/models/linuxConfiguration.js +++ b/lib/services/computeManagement2/lib/models/linuxConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies the Linux operating system settings on the virtual machine. *

For a list of supported Linux distributions, see [Linux on @@ -30,6 +28,11 @@ class LinuxConfiguration { * @member {object} [ssh] Specifies the ssh key configuration for a Linux OS. * @member {array} [ssh.publicKeys] The list of SSH public keys used to * authenticate with linux based VMs. + * @member {boolean} [provisionVMAgent] Indicates whether virtual machine + * agent should be provisioned on the virtual machine.

When this + * property is not specified in the request body, default behavior is to set + * it to true. This will ensure that VM Agent is installed on the VM so that + * extensions can be added to the VM later. */ constructor() { } @@ -62,6 +65,13 @@ class LinuxConfiguration { name: 'Composite', className: 'SshConfiguration' } + }, + provisionVMAgent: { + required: false, + serializedName: 'provisionVMAgent', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js b/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js index 0bc73509e1..993e0aa9af 100644 --- a/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js +++ b/lib/services/computeManagement2/lib/models/logAnalyticsOperationResult.js @@ -10,14 +10,11 @@ 'use strict'; -const models = require('./index'); - /** * LogAnalytics operation status response * - * @extends models['OperationStatusResponse'] */ -class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { +class LogAnalyticsOperationResult { /** * Create a LogAnalyticsOperationResult. * @member {object} [properties] LogAnalyticsOutput @@ -25,7 +22,6 @@ class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { * container. */ constructor() { - super(); } /** @@ -42,47 +38,6 @@ class LogAnalyticsOperationResult extends models['OperationStatusResponse'] { name: 'Composite', className: 'LogAnalyticsOperationResult', modelProperties: { - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - status: { - required: false, - readOnly: true, - serializedName: 'status', - type: { - name: 'String' - } - }, - startTime: { - required: false, - readOnly: true, - serializedName: 'startTime', - type: { - name: 'DateTime' - } - }, - endTime: { - required: false, - readOnly: true, - serializedName: 'endTime', - type: { - name: 'DateTime' - } - }, - error: { - required: false, - readOnly: true, - serializedName: 'error', - type: { - name: 'Composite', - className: 'ApiError' - } - }, properties: { required: false, readOnly: true, diff --git a/lib/services/computeManagement2/lib/models/managedArtifact.js b/lib/services/computeManagement2/lib/models/managedArtifact.js new file mode 100644 index 0000000000..cadb714ab4 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/managedArtifact.js @@ -0,0 +1,52 @@ +/* + * 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. + */ + +'use strict'; + +/** + * The managed artifact. + * + */ +class ManagedArtifact { + /** + * Create a ManagedArtifact. + * @member {string} [id] The managed artifact id. + */ + constructor() { + } + + /** + * Defines the metadata of ManagedArtifact + * + * @returns {object} metadata of ManagedArtifact + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedArtifact', + type: { + name: 'Composite', + className: 'ManagedArtifact', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ManagedArtifact; diff --git a/lib/services/computeManagement2/lib/models/managedDiskParameters.js b/lib/services/computeManagement2/lib/models/managedDiskParameters.js index 3764fa7812..68d7404f03 100644 --- a/lib/services/computeManagement2/lib/models/managedDiskParameters.js +++ b/lib/services/computeManagement2/lib/models/managedDiskParameters.js @@ -21,8 +21,9 @@ class ManagedDiskParameters extends models['SubResource'] { /** * Create a ManagedDiskParameters. * @member {string} [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' + * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ constructor() { super(); diff --git a/lib/services/computeManagement2/lib/models/networkProfile.js b/lib/services/computeManagement2/lib/models/networkProfile.js index 050b2faa00..7d6912dada 100644 --- a/lib/services/computeManagement2/lib/models/networkProfile.js +++ b/lib/services/computeManagement2/lib/models/networkProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies the network interfaces of the virtual machine. * diff --git a/lib/services/computeManagement2/lib/models/oSDisk.js b/lib/services/computeManagement2/lib/models/oSDisk.js index bf576f1740..3743327dcd 100644 --- a/lib/services/computeManagement2/lib/models/oSDisk.js +++ b/lib/services/computeManagement2/lib/models/oSDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies information about the operating system disk used by the virtual * machine.

For more information about disks, see [About disks and @@ -74,8 +72,9 @@ class OSDisk { * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/oSProfile.js b/lib/services/computeManagement2/lib/models/oSProfile.js index cf904eba6f..60b86fa154 100644 --- a/lib/services/computeManagement2/lib/models/oSProfile.js +++ b/lib/services/computeManagement2/lib/models/oSProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies the operating system settings for the virtual machine. * @@ -90,8 +88,16 @@ class OSProfile { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * @member {array} [secrets] Specifies set of certificates that should be * installed onto the virtual machine. + * @member {boolean} [allowExtensionOperations] Specifies whether extension + * operations should be allowed on the virtual machine.

This may only + * be set to False when no extensions are present on the virtual machine. */ constructor() { } @@ -168,6 +174,13 @@ class OSProfile { } } } + }, + allowExtensionOperations: { + required: false, + serializedName: 'allowExtensionOperations', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js b/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js new file mode 100644 index 0000000000..a3070932a6 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/recommendedMachineConfiguration.js @@ -0,0 +1,68 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Describes the recommended machine configuration. + * + */ +class RecommendedMachineConfiguration { + /** + * Create a RecommendedMachineConfiguration. + * @member {object} [vCPUs] + * @member {number} [vCPUs.min] The minimum number of the resource. + * @member {number} [vCPUs.max] The maximum number of the resource. + * @member {object} [memory] + * @member {number} [memory.min] The minimum number of the resource. + * @member {number} [memory.max] The maximum number of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of RecommendedMachineConfiguration + * + * @returns {object} metadata of RecommendedMachineConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'RecommendedMachineConfiguration', + type: { + name: 'Composite', + className: 'RecommendedMachineConfiguration', + modelProperties: { + vCPUs: { + required: false, + serializedName: 'vCPUs', + type: { + name: 'Composite', + className: 'ResourceRange' + } + }, + memory: { + required: false, + serializedName: 'memory', + type: { + name: 'Composite', + className: 'ResourceRange' + } + } + } + } + }; + } +} + +module.exports = RecommendedMachineConfiguration; diff --git a/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js b/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js new file mode 100644 index 0000000000..61db9eb55d --- /dev/null +++ b/lib/services/computeManagement2/lib/models/regionalReplicationStatus.js @@ -0,0 +1,79 @@ +/* + * 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. + */ + +'use strict'; + +/** + * This is the regional replication status. + * + */ +class RegionalReplicationStatus { + /** + * Create a RegionalReplicationStatus. + * @member {string} [region] The region where the gallery image version is + * published to. + * @member {string} [state] This is the regional replication state. Possible + * values include: 'Unknown', 'Replicating', 'Completed', 'Failed' + * @member {string} [details] The details of the replication status. + * @member {number} [progress] It indicates progress of the replication job. + */ + constructor() { + } + + /** + * Defines the metadata of RegionalReplicationStatus + * + * @returns {object} metadata of RegionalReplicationStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'RegionalReplicationStatus', + type: { + name: 'Composite', + className: 'RegionalReplicationStatus', + modelProperties: { + region: { + required: false, + serializedName: 'region', + type: { + name: 'String' + } + }, + state: { + required: false, + serializedName: 'state', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'Replicating', 'Completed', 'Failed' ] + } + }, + details: { + required: false, + serializedName: 'details', + type: { + name: 'String' + } + }, + progress: { + required: false, + serializedName: 'progress', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = RegionalReplicationStatus; diff --git a/lib/services/computeManagement2/lib/models/replicationStatus.js b/lib/services/computeManagement2/lib/models/replicationStatus.js new file mode 100644 index 0000000000..edaa93fdf1 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/replicationStatus.js @@ -0,0 +1,74 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * This is the replication status of the gallery image version. + * + */ +class ReplicationStatus { + /** + * Create a ReplicationStatus. + * @member {string} [aggregatedState] This is the aggregated replication + * status based on the regional replication status. Possible values include: + * 'Unknown', 'InProgress', 'Completed', 'Failed' + * @member {array} [summary] This is a summary of replication status for each + * region. + */ + constructor() { + } + + /** + * Defines the metadata of ReplicationStatus + * + * @returns {object} metadata of ReplicationStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'ReplicationStatus', + type: { + name: 'Composite', + className: 'ReplicationStatus', + modelProperties: { + aggregatedState: { + required: false, + serializedName: 'aggregatedState', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'InProgress', 'Completed', 'Failed' ] + } + }, + summary: { + required: false, + serializedName: 'summary', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RegionalReplicationStatusElementType', + type: { + name: 'Composite', + className: 'RegionalReplicationStatus' + } + } + } + } + } + } + }; + } +} + +module.exports = ReplicationStatus; diff --git a/lib/services/computeManagement2/lib/models/resourceRange.js b/lib/services/computeManagement2/lib/models/resourceRange.js new file mode 100644 index 0000000000..6c249385e7 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/resourceRange.js @@ -0,0 +1,60 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Describes the resource range. + * + */ +class ResourceRange { + /** + * Create a ResourceRange. + * @member {number} [min] The minimum number of the resource. + * @member {number} [max] The maximum number of the resource. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceRange + * + * @returns {object} metadata of ResourceRange + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceRange', + type: { + name: 'Composite', + className: 'ResourceRange', + modelProperties: { + min: { + required: false, + serializedName: 'min', + type: { + name: 'Number' + } + }, + max: { + required: false, + serializedName: 'max', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ResourceRange; diff --git a/lib/services/computeManagement2/lib/models/resourceSku.js b/lib/services/computeManagement2/lib/models/resourceSku.js index 848c0dc886..d6d21873b6 100644 --- a/lib/services/computeManagement2/lib/models/resourceSku.js +++ b/lib/services/computeManagement2/lib/models/resourceSku.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes an available Compute SKU. * diff --git a/lib/services/computeManagement2/lib/models/resourceSkuRestrictions.js b/lib/services/computeManagement2/lib/models/resourceSkuRestrictions.js index e163e71ec6..2a8db80958 100644 --- a/lib/services/computeManagement2/lib/models/resourceSkuRestrictions.js +++ b/lib/services/computeManagement2/lib/models/resourceSkuRestrictions.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes scaling information of a SKU. * diff --git a/lib/services/computeManagement2/lib/models/rollbackStatusInfo.js b/lib/services/computeManagement2/lib/models/rollbackStatusInfo.js new file mode 100644 index 0000000000..bbfa82de4f --- /dev/null +++ b/lib/services/computeManagement2/lib/models/rollbackStatusInfo.js @@ -0,0 +1,85 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Information about rollback on failed VM instances after a OS Upgrade + * operation. + * + */ +class RollbackStatusInfo { + /** + * Create a RollbackStatusInfo. + * @member {number} [successfullyRolledbackInstanceCount] The number of + * instances which have been successfully rolled back. + * @member {number} [failedRolledbackInstanceCount] The number of instances + * which failed to rollback. + * @member {object} [rollbackError] Error details if OS rollback failed. + * @member {array} [rollbackError.details] The Api error details + * @member {object} [rollbackError.innererror] The Api inner error + * @member {string} [rollbackError.innererror.exceptiontype] The exception + * type. + * @member {string} [rollbackError.innererror.errordetail] The internal error + * message or exception dump. + * @member {string} [rollbackError.code] The error code. + * @member {string} [rollbackError.target] The target of the particular + * error. + * @member {string} [rollbackError.message] The error message. + */ + constructor() { + } + + /** + * Defines the metadata of RollbackStatusInfo + * + * @returns {object} metadata of RollbackStatusInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'RollbackStatusInfo', + type: { + name: 'Composite', + className: 'RollbackStatusInfo', + modelProperties: { + successfullyRolledbackInstanceCount: { + required: false, + readOnly: true, + serializedName: 'successfullyRolledbackInstanceCount', + type: { + name: 'Number' + } + }, + failedRolledbackInstanceCount: { + required: false, + readOnly: true, + serializedName: 'failedRolledbackInstanceCount', + type: { + name: 'Number' + } + }, + rollbackError: { + required: false, + readOnly: true, + serializedName: 'rollbackError', + type: { + name: 'Composite', + className: 'ApiError' + } + } + } + } + }; + } +} + +module.exports = RollbackStatusInfo; diff --git a/lib/services/computeManagement2/lib/models/runCommandInput.js b/lib/services/computeManagement2/lib/models/runCommandInput.js index e245ae5fe0..0aebb6e982 100644 --- a/lib/services/computeManagement2/lib/models/runCommandInput.js +++ b/lib/services/computeManagement2/lib/models/runCommandInput.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Capture Virtual Machine parameters. * diff --git a/lib/services/computeManagement2/lib/models/runCommandResult.js b/lib/services/computeManagement2/lib/models/runCommandResult.js index f23a7d1b8c..7b5d56c547 100644 --- a/lib/services/computeManagement2/lib/models/runCommandResult.js +++ b/lib/services/computeManagement2/lib/models/runCommandResult.js @@ -10,20 +10,15 @@ 'use strict'; -const models = require('./index'); - /** - * Run command operation response. - * - * @extends models['OperationStatusResponse'] + * Class representing a RunCommandResult. */ -class RunCommandResult extends models['OperationStatusResponse'] { +class RunCommandResult { /** * Create a RunCommandResult. - * @member {object} [output] Operation output data (raw JSON) + * @member {array} [value] Run command operation response. */ constructor() { - super(); } /** @@ -40,52 +35,19 @@ class RunCommandResult extends models['OperationStatusResponse'] { name: 'Composite', className: 'RunCommandResult', modelProperties: { - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - status: { - required: false, - readOnly: true, - serializedName: 'status', - type: { - name: 'String' - } - }, - startTime: { - required: false, - readOnly: true, - serializedName: 'startTime', - type: { - name: 'DateTime' - } - }, - endTime: { - required: false, - readOnly: true, - serializedName: 'endTime', - type: { - name: 'DateTime' - } - }, - error: { - required: false, - readOnly: true, - serializedName: 'error', - type: { - name: 'Composite', - className: 'ApiError' - } - }, - output: { + value: { required: false, - serializedName: 'properties.output', + serializedName: 'value', type: { - name: 'Object' + name: 'Sequence', + element: { + required: false, + serializedName: 'InstanceViewStatusElementType', + type: { + name: 'Composite', + className: 'InstanceViewStatus' + } + } } } } diff --git a/lib/services/computeManagement2/lib/models/snapshotUpdate.js b/lib/services/computeManagement2/lib/models/snapshotUpdate.js index c09c4e427f..967545e4f8 100644 --- a/lib/services/computeManagement2/lib/models/snapshotUpdate.js +++ b/lib/services/computeManagement2/lib/models/snapshotUpdate.js @@ -10,14 +10,11 @@ 'use strict'; -const models = require('./index'); - /** * Snapshot update resource. * - * @extends models['ResourceUpdate'] */ -class SnapshotUpdate extends models['ResourceUpdate'] { +class SnapshotUpdate { /** * Create a SnapshotUpdate. * @member {string} [osType] the Operating System type. Possible values @@ -50,9 +47,13 @@ class SnapshotUpdate extends models['ResourceUpdate'] { * Resource Id * @member {string} [encryptionSettings.keyEncryptionKey.keyUrl] Url pointing * to a key or secret in KeyVault + * @member {object} [tags] Resource tags + * @member {object} [sku] + * @member {string} [sku.name] The sku name. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' + * @member {string} [sku.tier] The sku tier. */ constructor() { - super(); } /** @@ -69,28 +70,6 @@ class SnapshotUpdate extends models['ResourceUpdate'] { name: 'Composite', className: 'SnapshotUpdate', modelProperties: { - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - sku: { - required: false, - serializedName: 'sku', - type: { - name: 'Composite', - className: 'DiskSku' - } - }, osType: { required: false, serializedName: 'properties.osType', @@ -113,6 +92,28 @@ class SnapshotUpdate extends models['ResourceUpdate'] { name: 'Composite', className: 'EncryptionSettings' } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sku: { + required: false, + serializedName: 'sku', + type: { + name: 'Composite', + className: 'SnapshotSku' + } } } } diff --git a/lib/services/computeManagement2/lib/models/sshConfiguration.js b/lib/services/computeManagement2/lib/models/sshConfiguration.js index 0dc25e1a7e..dea2921dd5 100644 --- a/lib/services/computeManagement2/lib/models/sshConfiguration.js +++ b/lib/services/computeManagement2/lib/models/sshConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * SSH configuration for Linux based VMs running on Azure * diff --git a/lib/services/computeManagement2/lib/models/storageProfile.js b/lib/services/computeManagement2/lib/models/storageProfile.js index 38b108fcd0..864a758aa1 100644 --- a/lib/services/computeManagement2/lib/models/storageProfile.js +++ b/lib/services/computeManagement2/lib/models/storageProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies the storage settings for the virtual machine disks. * @@ -95,8 +93,8 @@ class StorageProfile { * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * a data disk to a virtual machine.

For more information about * disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfo.js b/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfo.js new file mode 100644 index 0000000000..cc5a4f043b --- /dev/null +++ b/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfo.js @@ -0,0 +1,143 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Virtual Machine Scale Set OS Upgrade History operation response. + * + */ +class UpgradeOperationHistoricalStatusInfo { + /** + * Create a UpgradeOperationHistoricalStatusInfo. + * @member {object} [properties] Information about the properties of the + * upgrade operation. + * @member {object} [properties.runningStatus] Information about the overall + * status of the upgrade operation. + * @member {string} [properties.runningStatus.code] Code indicating the + * current status of the upgrade. Possible values include: 'RollingForward', + * 'Cancelled', 'Completed', 'Faulted' + * @member {date} [properties.runningStatus.startTime] Start time of the + * upgrade. + * @member {date} [properties.runningStatus.endTime] End time of the upgrade. + * @member {object} [properties.progress] Counts of the VM's in each state. + * @member {number} [properties.progress.successfulInstanceCount] The number + * of instances that have been successfully upgraded. + * @member {number} [properties.progress.failedInstanceCount] The number of + * instances that have failed to be upgraded successfully. + * @member {number} [properties.progress.inProgressInstanceCount] The number + * of instances that are currently being upgraded. + * @member {number} [properties.progress.pendingInstanceCount] The number of + * instances that have not yet begun to be upgraded. + * @member {object} [properties.error] Error Details for this upgrade if + * there are any. + * @member {array} [properties.error.details] The Api error details + * @member {object} [properties.error.innererror] The Api inner error + * @member {string} [properties.error.innererror.exceptiontype] The exception + * type. + * @member {string} [properties.error.innererror.errordetail] The internal + * error message or exception dump. + * @member {string} [properties.error.code] The error code. + * @member {string} [properties.error.target] The target of the particular + * error. + * @member {string} [properties.error.message] The error message. + * @member {string} [properties.startedBy] Invoker of the Upgrade Operation. + * Possible values include: 'Unknown', 'User', 'Platform' + * @member {object} [properties.targetImageReference] Image Reference details + * @member {string} [properties.targetImageReference.publisher] The image + * publisher. + * @member {string} [properties.targetImageReference.offer] Specifies the + * offer of the platform image or marketplace image used to create the + * virtual machine. + * @member {string} [properties.targetImageReference.sku] The image SKU. + * @member {string} [properties.targetImageReference.version] Specifies the + * version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time + * even if a new version becomes available. + * @member {object} [properties.rollbackInfo] Information about OS rollback + * if performed + * @member {number} + * [properties.rollbackInfo.successfullyRolledbackInstanceCount] The number + * of instances which have been successfully rolled back. + * @member {number} [properties.rollbackInfo.failedRolledbackInstanceCount] + * The number of instances which failed to rollback. + * @member {object} [properties.rollbackInfo.rollbackError] Error details if + * OS rollback failed. + * @member {array} [properties.rollbackInfo.rollbackError.details] The Api + * error details + * @member {object} [properties.rollbackInfo.rollbackError.innererror] The + * Api inner error + * @member {string} + * [properties.rollbackInfo.rollbackError.innererror.exceptiontype] The + * exception type. + * @member {string} + * [properties.rollbackInfo.rollbackError.innererror.errordetail] The + * internal error message or exception dump. + * @member {string} [properties.rollbackInfo.rollbackError.code] The error + * code. + * @member {string} [properties.rollbackInfo.rollbackError.target] The target + * of the particular error. + * @member {string} [properties.rollbackInfo.rollbackError.message] The error + * message. + * @member {string} [type] Resource type + * @member {string} [location] Resource location + */ + constructor() { + } + + /** + * Defines the metadata of UpgradeOperationHistoricalStatusInfo + * + * @returns {object} metadata of UpgradeOperationHistoricalStatusInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'UpgradeOperationHistoricalStatusInfo', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoricalStatusInfo', + modelProperties: { + properties: { + required: false, + readOnly: true, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoricalStatusInfoProperties' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + readOnly: true, + serializedName: 'location', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = UpgradeOperationHistoricalStatusInfo; diff --git a/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfoProperties.js b/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfoProperties.js new file mode 100644 index 0000000000..2b6ff23fa5 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/upgradeOperationHistoricalStatusInfoProperties.js @@ -0,0 +1,155 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Describes each OS upgrade on the Virtual Machine Scale Set. + * + */ +class UpgradeOperationHistoricalStatusInfoProperties { + /** + * Create a UpgradeOperationHistoricalStatusInfoProperties. + * @member {object} [runningStatus] Information about the overall status of + * the upgrade operation. + * @member {string} [runningStatus.code] Code indicating the current status + * of the upgrade. Possible values include: 'RollingForward', 'Cancelled', + * 'Completed', 'Faulted' + * @member {date} [runningStatus.startTime] Start time of the upgrade. + * @member {date} [runningStatus.endTime] End time of the upgrade. + * @member {object} [progress] Counts of the VM's in each state. + * @member {number} [progress.successfulInstanceCount] The number of + * instances that have been successfully upgraded. + * @member {number} [progress.failedInstanceCount] The number of instances + * that have failed to be upgraded successfully. + * @member {number} [progress.inProgressInstanceCount] The number of + * instances that are currently being upgraded. + * @member {number} [progress.pendingInstanceCount] The number of instances + * that have not yet begun to be upgraded. + * @member {object} [error] Error Details for this upgrade if there are any. + * @member {array} [error.details] The Api error details + * @member {object} [error.innererror] The Api inner error + * @member {string} [error.innererror.exceptiontype] The exception type. + * @member {string} [error.innererror.errordetail] The internal error message + * or exception dump. + * @member {string} [error.code] The error code. + * @member {string} [error.target] The target of the particular error. + * @member {string} [error.message] The error message. + * @member {string} [startedBy] Invoker of the Upgrade Operation. Possible + * values include: 'Unknown', 'User', 'Platform' + * @member {object} [targetImageReference] Image Reference details + * @member {string} [targetImageReference.publisher] The image publisher. + * @member {string} [targetImageReference.offer] Specifies the offer of the + * platform image or marketplace image used to create the virtual machine. + * @member {string} [targetImageReference.sku] The image SKU. + * @member {string} [targetImageReference.version] Specifies the version of + * the platform image or marketplace image used to create the virtual + * machine. The allowed formats are Major.Minor.Build or 'latest'. Major, + * Minor, and Build are decimal numbers. Specify 'latest' to use the latest + * version of an image available at deploy time. Even if you use 'latest', + * the VM image will not automatically update after deploy time even if a new + * version becomes available. + * @member {object} [rollbackInfo] Information about OS rollback if performed + * @member {number} [rollbackInfo.successfullyRolledbackInstanceCount] The + * number of instances which have been successfully rolled back. + * @member {number} [rollbackInfo.failedRolledbackInstanceCount] The number + * of instances which failed to rollback. + * @member {object} [rollbackInfo.rollbackError] Error details if OS rollback + * failed. + * @member {array} [rollbackInfo.rollbackError.details] The Api error details + * @member {object} [rollbackInfo.rollbackError.innererror] The Api inner + * error + * @member {string} [rollbackInfo.rollbackError.innererror.exceptiontype] The + * exception type. + * @member {string} [rollbackInfo.rollbackError.innererror.errordetail] The + * internal error message or exception dump. + * @member {string} [rollbackInfo.rollbackError.code] The error code. + * @member {string} [rollbackInfo.rollbackError.target] The target of the + * particular error. + * @member {string} [rollbackInfo.rollbackError.message] The error message. + */ + constructor() { + } + + /** + * Defines the metadata of UpgradeOperationHistoricalStatusInfoProperties + * + * @returns {object} metadata of UpgradeOperationHistoricalStatusInfoProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'UpgradeOperationHistoricalStatusInfoProperties', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoricalStatusInfoProperties', + modelProperties: { + runningStatus: { + required: false, + readOnly: true, + serializedName: 'runningStatus', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoryStatus' + } + }, + progress: { + required: false, + readOnly: true, + serializedName: 'progress', + type: { + name: 'Composite', + className: 'RollingUpgradeProgressInfo' + } + }, + error: { + required: false, + readOnly: true, + serializedName: 'error', + type: { + name: 'Composite', + className: 'ApiError' + } + }, + startedBy: { + required: false, + readOnly: true, + serializedName: 'startedBy', + type: { + name: 'Enum', + allowedValues: [ 'Unknown', 'User', 'Platform' ] + } + }, + targetImageReference: { + required: false, + readOnly: true, + serializedName: 'targetImageReference', + type: { + name: 'Composite', + className: 'ImageReference' + } + }, + rollbackInfo: { + required: false, + readOnly: true, + serializedName: 'rollbackInfo', + type: { + name: 'Composite', + className: 'RollbackStatusInfo' + } + } + } + } + }; + } +} + +module.exports = UpgradeOperationHistoricalStatusInfoProperties; diff --git a/lib/services/computeManagement2/lib/models/upgradeOperationHistoryStatus.js b/lib/services/computeManagement2/lib/models/upgradeOperationHistoryStatus.js new file mode 100644 index 0000000000..989c1480d4 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/upgradeOperationHistoryStatus.js @@ -0,0 +1,74 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Information about the current running state of the overall upgrade. + * + */ +class UpgradeOperationHistoryStatus { + /** + * Create a UpgradeOperationHistoryStatus. + * @member {string} [code] Code indicating the current status of the upgrade. + * Possible values include: 'RollingForward', 'Cancelled', 'Completed', + * 'Faulted' + * @member {date} [startTime] Start time of the upgrade. + * @member {date} [endTime] End time of the upgrade. + */ + constructor() { + } + + /** + * Defines the metadata of UpgradeOperationHistoryStatus + * + * @returns {object} metadata of UpgradeOperationHistoryStatus + * + */ + mapper() { + return { + required: false, + serializedName: 'UpgradeOperationHistoryStatus', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoryStatus', + modelProperties: { + code: { + required: false, + readOnly: true, + serializedName: 'code', + type: { + name: 'Enum', + allowedValues: [ 'RollingForward', 'Cancelled', 'Completed', 'Faulted' ] + } + }, + startTime: { + required: false, + readOnly: true, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + readOnly: true, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = UpgradeOperationHistoryStatus; diff --git a/lib/services/computeManagement2/lib/models/upgradePolicy.js b/lib/services/computeManagement2/lib/models/upgradePolicy.js index eb5f4643c8..401ac53237 100644 --- a/lib/services/computeManagement2/lib/models/upgradePolicy.js +++ b/lib/services/computeManagement2/lib/models/upgradePolicy.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes an upgrade policy - automatic, manual, or rolling. * @@ -54,6 +52,10 @@ class UpgradePolicy { * @member {boolean} [automaticOSUpgrade] Whether OS upgrades should * automatically be applied to scale set instances in a rolling fashion when * a newer version of the image becomes available. + * @member {object} [autoOSUpgradePolicy] Configuration parameters used for + * performing automatic OS Upgrade. + * @member {boolean} [autoOSUpgradePolicy.disableAutoRollback] Whether OS + * image rollback feature should be disabled. Default value is false. */ constructor() { } @@ -94,6 +96,14 @@ class UpgradePolicy { type: { name: 'Boolean' } + }, + autoOSUpgradePolicy: { + required: false, + serializedName: 'autoOSUpgradePolicy', + type: { + name: 'Composite', + className: 'AutoOSUpgradePolicy' + } } } } diff --git a/lib/services/computeManagement2/lib/models/usage.js b/lib/services/computeManagement2/lib/models/usage.js index 8566e4ebee..c840e66a99 100644 --- a/lib/services/computeManagement2/lib/models/usage.js +++ b/lib/services/computeManagement2/lib/models/usage.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes Compute Resource Usage. * diff --git a/lib/services/computeManagement2/lib/models/vaultSecretGroup.js b/lib/services/computeManagement2/lib/models/vaultSecretGroup.js index e1a7e3f5ff..9922059631 100644 --- a/lib/services/computeManagement2/lib/models/vaultSecretGroup.js +++ b/lib/services/computeManagement2/lib/models/vaultSecretGroup.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a set of certificates which are all in the same Key Vault. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachine.js b/lib/services/computeManagement2/lib/models/virtualMachine.js index dfb237a362..937e0fab38 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachine.js +++ b/lib/services/computeManagement2/lib/models/virtualMachine.js @@ -187,8 +187,8 @@ class VirtualMachine extends models['Resource'] { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual @@ -271,8 +271,18 @@ class VirtualMachine extends models['Resource'] { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine. + *

This may only be set to False when no extensions are present on + * the virtual machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -389,10 +399,10 @@ class VirtualMachine extends models['Resource'] { * type 'None' will remove any identities from the virtual machine. Possible * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, * UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine zones. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/virtualMachineAgentInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineAgentInstanceView.js index 93bc2c51be..25fe929ef7 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineAgentInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineAgentInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of the VM Agent running on the virtual machine. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js b/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js index 82d3ef372b..67facb1d8a 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineCaptureResult.js @@ -13,14 +13,18 @@ const models = require('./index'); /** - * Resource Id. + * Output of virtual machine capture operation. * * @extends models['SubResource'] */ class VirtualMachineCaptureResult extends models['SubResource'] { /** * Create a VirtualMachineCaptureResult. - * @member {object} [output] Operation output data (raw JSON) + * @member {string} [schema] the schema of the captured virtual machine + * @member {string} [contentVersion] the version of the content + * @member {object} [parameters] parameters of the captured virtual machine + * @member {array} [resources] a list of resource items of the captured + * virtual machine */ constructor() { super(); @@ -47,12 +51,44 @@ class VirtualMachineCaptureResult extends models['SubResource'] { name: 'String' } }, - output: { + schema: { required: false, - serializedName: 'properties.output', + readOnly: true, + serializedName: '$schema', + type: { + name: 'String' + } + }, + contentVersion: { + required: false, + readOnly: true, + serializedName: 'contentVersion', + type: { + name: 'String' + } + }, + parameters: { + required: false, + readOnly: true, + serializedName: 'parameters', type: { name: 'Object' } + }, + resources: { + required: false, + readOnly: true, + serializedName: 'resources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineExtensionHandlerInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineExtensionHandlerInstanceView.js index a4ce866b57..4900bc611b 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineExtensionHandlerInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineExtensionHandlerInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of a virtual machine extension handler. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineExtensionInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineExtensionInstanceView.js index cdd03e40d8..5e49fb98fa 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineExtensionInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineExtensionInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of a virtual machine extension. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineExtensionsListResult.js b/lib/services/computeManagement2/lib/models/virtualMachineExtensionsListResult.js index f3d08ea382..f405c3d0f6 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineExtensionsListResult.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineExtensionsListResult.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The List Extension operation response * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineHealthStatus.js b/lib/services/computeManagement2/lib/models/virtualMachineHealthStatus.js index 0ccd89fedd..8a4fe2090e 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineHealthStatus.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineHealthStatus.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The health status of the VM. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineIdentity.js b/lib/services/computeManagement2/lib/models/virtualMachineIdentity.js index 741dcde48e..bc329d687a 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineIdentity.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineIdentity.js @@ -29,10 +29,10 @@ class VirtualMachineIdentity { * will remove any identities from the virtual machine. Possible values * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' - * @member {array} [identityIds] The list of user identities associated with - * the Virtual Machine. The user identity references will be ARM resource ids - * in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the Virtual Machine. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ constructor() { } @@ -75,16 +75,17 @@ class VirtualMachineIdentity { allowedValues: [ 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' ] } }, - identityIds: { + userAssignedIdentities: { required: false, - serializedName: 'identityIds', + serializedName: 'userAssignedIdentities', type: { - name: 'Sequence', - element: { + name: 'Dictionary', + value: { required: false, - serializedName: 'StringElementType', + serializedName: 'VirtualMachineIdentityUserAssignedIdentitiesValueElementType', type: { - name: 'String' + name: 'Composite', + className: 'VirtualMachineIdentityUserAssignedIdentitiesValue' } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineIdentityUserAssignedIdentitiesValue.js b/lib/services/computeManagement2/lib/models/virtualMachineIdentityUserAssignedIdentitiesValue.js new file mode 100644 index 0000000000..09033f5b29 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/virtualMachineIdentityUserAssignedIdentitiesValue.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Class representing a VirtualMachineIdentityUserAssignedIdentitiesValue. + */ +class VirtualMachineIdentityUserAssignedIdentitiesValue { + /** + * Create a VirtualMachineIdentityUserAssignedIdentitiesValue. + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualMachineIdentityUserAssignedIdentitiesValue + * + * @returns {object} metadata of VirtualMachineIdentityUserAssignedIdentitiesValue + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualMachineIdentity_userAssignedIdentitiesValue', + type: { + name: 'Composite', + className: 'VirtualMachineIdentityUserAssignedIdentitiesValue', + modelProperties: { + principalId: { + required: false, + readOnly: true, + serializedName: 'principalId', + type: { + name: 'String' + } + }, + clientId: { + required: false, + readOnly: true, + serializedName: 'clientId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualMachineIdentityUserAssignedIdentitiesValue; diff --git a/lib/services/computeManagement2/lib/models/virtualMachineInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineInstanceView.js index aa4805f496..0092fc874e 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of a virtual machine. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js index 58136094b6..fea0ed48e7 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSet.js @@ -79,6 +79,11 @@ class VirtualMachineScaleSet extends models['Resource'] { * @member {boolean} [upgradePolicy.automaticOSUpgrade] Whether OS upgrades * should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. + * @member {object} [upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * @member {boolean} [upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] + * Whether OS image rollback feature should be disabled. Default value is + * false. * @member {object} [virtualMachineProfile] The virtual machine profile. * @member {object} [virtualMachineProfile.osProfile] Specifies the operating * system settings for the virtual machines in the scale set. @@ -165,6 +170,13 @@ class VirtualMachineScaleSet extends models['Resource'] { * @member {array} * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. + * @member {boolean} + * [virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [virtualMachineProfile.osProfile.secrets] Specifies set of * certificates that should be installed onto the virtual machines in the * scale set. @@ -217,6 +229,10 @@ class VirtualMachineScaleSet extends models['Resource'] { * 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} [virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

This value cannot be larger than 1023 GB * @member {string} [virtualMachineProfile.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 user-image or a specialized VHD.

@@ -236,8 +252,8 @@ class VirtualMachineScaleSet extends models['Resource'] { * @member {string} * [virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] Specifies * the parameters that are used to add data disks to the virtual machines in * the scale set.

For more information about disks, see [About disks @@ -291,6 +307,10 @@ class VirtualMachineScaleSet extends models['Resource'] { * @member {string} [virtualMachineProfile.priority] Specifies the priority * for the virtual machines in the scale set.

Minimum api-version: * 2017-10-30-preview. Possible values include: 'Regular', 'Low' + * @member {string} [virtualMachineProfile.evictionPolicy] Specifies the + * eviction policy for virtual machines in a low priority scale set. + *

Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' * @member {string} [provisioningState] The provisioning state, which only * appears in the response. * @member {boolean} [overprovision] Specifies whether the Virtual Machine @@ -317,10 +337,10 @@ class VirtualMachineScaleSet extends models['Resource'] { * type 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity - * references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine scale set zones. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js index 764ded8a19..0ed7bb5261 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetDataDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set data disk. * @@ -33,12 +31,13 @@ class VirtualMachineScaleSetDataDisk { * @member {string} createOption The create option. 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 + * gigabytes. This element can be used to overwrite the size of the disk in a * virtual machine image.

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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetExtensionProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetExtensionProfile.js index fa2d107f7e..d27660bf3a 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetExtensionProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetExtensionProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set extension profile. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIPConfiguration.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIPConfiguration.js index acba9a2b2c..35be769b56 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIPConfiguration.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIPConfiguration.js @@ -38,6 +38,12 @@ class VirtualMachineScaleSetIPConfiguration extends models['SubResource'] { * [publicIPAddressConfiguration.dnsSettings.domainNameLabel] The Domain name * label.The concatenation of the domain name label and vm index will be the * domain name labels of the PublicIPAddress resources that will be created + * @member {array} [publicIPAddressConfiguration.ipTags] The list of IP tags + * associated with the public IP address. + * @member {object} [publicIPAddressConfiguration.publicIPPrefix] The + * PublicIPPrefix from which to allocate publicIP addresses. + * @member {string} [publicIPAddressConfiguration.publicIPPrefix.id] Resource + * Id * @member {string} [privateIPAddressVersion] Available from Api-Version * 2017-03-30 onwards, it represents whether the specific ipconfiguration is * IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and @@ -46,6 +52,8 @@ class VirtualMachineScaleSetIPConfiguration extends models['SubResource'] { * of references to backend address pools of application gateways. A scale * set can reference backend address pools of multiple application gateways. * Multiple scale sets cannot use the same application gateway. + * @member {array} [applicationSecurityGroups] Specifies an array of + * references to application security group. * @member {array} [loadBalancerBackendAddressPools] Specifies an array of * references to backend address pools of load balancers. A scale set can * reference backend address pools of one public and one internal load @@ -132,6 +140,21 @@ class VirtualMachineScaleSetIPConfiguration extends models['SubResource'] { } } }, + applicationSecurityGroups: { + required: false, + serializedName: 'properties.applicationSecurityGroups', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubResourceElementType', + type: { + name: 'Composite', + className: 'SubResource' + } + } + } + }, loadBalancerBackendAddressPools: { required: false, serializedName: 'properties.loadBalancerBackendAddressPools', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentity.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentity.js index c820acdcf9..c57257efe5 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentity.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentity.js @@ -29,10 +29,10 @@ class VirtualMachineScaleSetIdentity { * type 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identityIds] The list of user identities associated with - * the virtual machine scale set. The user identity references will be ARM - * resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [userAssignedIdentities] The list of user identities + * associated with the virtual machine scale set. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ constructor() { } @@ -75,16 +75,17 @@ class VirtualMachineScaleSetIdentity { allowedValues: [ 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' ] } }, - identityIds: { + userAssignedIdentities: { required: false, - serializedName: 'identityIds', + serializedName: 'userAssignedIdentities', type: { - name: 'Sequence', - element: { + name: 'Dictionary', + value: { required: false, - serializedName: 'StringElementType', + serializedName: 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValueElementType', type: { - name: 'String' + name: 'Composite', + className: 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue' } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentityUserAssignedIdentitiesValue.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentityUserAssignedIdentitiesValue.js new file mode 100644 index 0000000000..0752bf5253 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIdentityUserAssignedIdentitiesValue.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Class representing a VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + */ +class VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue { + /** + * Create a VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue. + * @member {string} [principalId] The principal id of user assigned identity. + * @member {string} [clientId] The client id of user assigned identity. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + * + * @returns {object} metadata of VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualMachineScaleSetIdentity_userAssignedIdentitiesValue', + type: { + name: 'Composite', + className: 'VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue', + modelProperties: { + principalId: { + required: false, + readOnly: true, + serializedName: 'principalId', + type: { + name: 'String' + } + }, + clientId: { + required: false, + readOnly: true, + serializedName: 'clientId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue; diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceView.js index b1ef6a6a1f..9229eec790 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of a virtual machine scale set. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceViewStatusesSummary.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceViewStatusesSummary.js index c5755dfc84..c852cb303e 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceViewStatusesSummary.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetInstanceViewStatusesSummary.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Instance view statuses summary for virtual machines of a virtual machine * scale set. diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIpTag.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIpTag.js new file mode 100644 index 0000000000..f133b20ed3 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetIpTag.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Contains the IP tag associated with the public IP address. + * + */ +class VirtualMachineScaleSetIpTag { + /** + * Create a VirtualMachineScaleSetIpTag. + * @member {string} [ipTagType] IP tag type. Example: FirstPartyUsage. + * @member {string} [tag] IP tag associated with the public IP. Example: SQL, + * Storage etc. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualMachineScaleSetIpTag + * + * @returns {object} metadata of VirtualMachineScaleSetIpTag + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualMachineScaleSetIpTag', + type: { + name: 'Composite', + className: 'VirtualMachineScaleSetIpTag', + modelProperties: { + ipTagType: { + required: false, + serializedName: 'ipTagType', + type: { + name: 'String' + } + }, + tag: { + required: false, + serializedName: 'tag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualMachineScaleSetIpTag; diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetListOSUpgradeHistory.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetListOSUpgradeHistory.js new file mode 100644 index 0000000000..67be7c8893 --- /dev/null +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetListOSUpgradeHistory.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * List of Virtual Machine Scale Set OS Upgrade History operation response. + */ +class VirtualMachineScaleSetListOSUpgradeHistory extends Array { + /** + * Create a VirtualMachineScaleSetListOSUpgradeHistory. + * @member {string} [nextLink] The uri to fetch the next page of OS Upgrade + * History. Call ListNext() with this to fetch the next page of history of + * upgrades. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VirtualMachineScaleSetListOSUpgradeHistory + * + * @returns {object} metadata of VirtualMachineScaleSetListOSUpgradeHistory + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualMachineScaleSetListOSUpgradeHistory', + type: { + name: 'Composite', + className: 'VirtualMachineScaleSetListOSUpgradeHistory', + modelProperties: { + value: { + required: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'UpgradeOperationHistoricalStatusInfoElementType', + type: { + name: 'Composite', + className: 'UpgradeOperationHistoricalStatusInfo' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualMachineScaleSetListOSUpgradeHistory; diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js index a11dae5d33..aeb0c452f0 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetManagedDiskParameters.js @@ -18,8 +18,9 @@ class VirtualMachineScaleSetManagedDiskParameters { /** * Create a VirtualMachineScaleSetManagedDiskParameters. * @member {string} [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' + * for the managed disk. Possible values are: Standard_LRS, Premium_LRS, and + * StandardSSD_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS', + * 'StandardSSD_LRS' */ constructor() { } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetNetworkProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetNetworkProfile.js index f3b8e80b4e..6b069ffceb 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetNetworkProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetNetworkProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set network profile. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js index 737b7c9db1..f72c6c0bb8 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set operating system disk. * @@ -34,6 +32,10 @@ class VirtualMachineScaleSetOSDisk { * 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 the operating system + * disk in gigabytes. This element can be used to overwrite the size of the + * disk in a virtual machine image.

This value cannot be larger than + * 1023 GB * @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.

Possible values are:

**Windows** @@ -45,8 +47,9 @@ class VirtualMachineScaleSetOSDisk { * to store operating system disks for the scale set. * @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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ constructor() { } @@ -94,6 +97,13 @@ class VirtualMachineScaleSetOSDisk { name: 'String' } }, + diskSizeGB: { + required: false, + serializedName: 'diskSizeGB', + type: { + name: 'Number' + } + }, osType: { required: false, serializedName: 'osType', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSProfile.js index 83622b758e..5520c6f135 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetOSProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set OS profile. * @@ -88,6 +86,11 @@ class VirtualMachineScaleSetOSProfile { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * @member {array} [secrets] Specifies set of certificates that should be * installed onto the virtual machines in the scale set. */ diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetPublicIPAddressConfiguration.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetPublicIPAddressConfiguration.js index 7b99a1abf7..d46e68fd16 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetPublicIPAddressConfiguration.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetPublicIPAddressConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress * configuration @@ -28,6 +26,11 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration { * @member {string} [dnsSettings.domainNameLabel] The Domain name label.The * concatenation of the domain name label and vm index will be the domain * name labels of the PublicIPAddress resources that will be created + * @member {array} [ipTags] The list of IP tags associated with the public IP + * address. + * @member {object} [publicIPPrefix] The PublicIPPrefix from which to + * allocate publicIP addresses. + * @member {string} [publicIPPrefix.id] Resource Id */ constructor() { } @@ -67,6 +70,29 @@ class VirtualMachineScaleSetPublicIPAddressConfiguration { name: 'Composite', className: 'VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings' } + }, + ipTags: { + required: false, + serializedName: 'properties.ipTags', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualMachineScaleSetIpTagElementType', + type: { + name: 'Composite', + className: 'VirtualMachineScaleSetIpTag' + } + } + } + }, + publicIPPrefix: { + required: false, + serializedName: 'properties.publicIPPrefix', + type: { + name: 'Composite', + className: 'SubResource' + } } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetSku.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetSku.js index 6fe583507e..9f9719323c 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetSku.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetSku.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes an available virtual machine scale set sku. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js index b8ab9a175b..4c0b81de04 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetStorageProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set storage profile. * @@ -54,6 +52,10 @@ class VirtualMachineScaleSetStorageProfile { * 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} [osDisk.diskSizeGB] Specifies the size of the operating + * system disk in gigabytes. This element can be used to overwrite the size + * of the disk in a virtual machine image.

This value cannot be + * larger than 1023 GB * @member {string} [osDisk.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.

Possible values are:

@@ -67,8 +69,8 @@ class VirtualMachineScaleSetStorageProfile { * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] Specifies the parameters that are used to add * data disks to the virtual machines in the scale set.

For more * information about disks, see [About disks and VHDs for Azure virtual diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js index 693917b226..c43ab504ac 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdate.js @@ -74,6 +74,11 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * @member {boolean} [upgradePolicy.automaticOSUpgrade] Whether OS upgrades * should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. + * @member {object} [upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * @member {boolean} [upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] + * Whether OS image rollback feature should be disabled. Default value is + * false. * @member {object} [virtualMachineProfile] The virtual machine profile. * @member {object} [virtualMachineProfile.osProfile] The virtual machine * scale set OS profile. @@ -115,6 +120,13 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * @member {array} * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. + * @member {boolean} + * [virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [virtualMachineProfile.osProfile.secrets] The List of * certificates for addition to the VM. * @member {object} [virtualMachineProfile.storageProfile] The virtual @@ -146,6 +158,10 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * [virtualMachineProfile.storageProfile.osDisk.writeAcceleratorEnabled] * Specifies whether writeAccelerator should be enabled or disabled on the * disk. + * @member {number} [virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

This value cannot be larger than 1023 GB * @member {object} [virtualMachineProfile.storageProfile.osDisk.image] The * Source User Image VirtualHardDisk. This VirtualHardDisk will be copied * before using it to attach to the Virtual Machine. If SourceImage is @@ -160,8 +176,8 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * @member {string} * [virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] The data * disks. * @member {object} [virtualMachineProfile.networkProfile] The virtual @@ -209,10 +225,10 @@ class VirtualMachineScaleSetUpdate extends models['UpdateResource'] { * type 'None' will remove any identities from the virtual machine scale set. * Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity - * references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ constructor() { super(); diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateIPConfiguration.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateIPConfiguration.js index 861de94e23..602dae90fc 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateIPConfiguration.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateIPConfiguration.js @@ -44,6 +44,8 @@ class VirtualMachineScaleSetUpdateIPConfiguration extends models['SubResource'] * 'IPv6'. Possible values include: 'IPv4', 'IPv6' * @member {array} [applicationGatewayBackendAddressPools] The application * gateway backend address pools. + * @member {array} [applicationSecurityGroups] Specifies an array of + * references to application security group. * @member {array} [loadBalancerBackendAddressPools] The load balancer * backend address pools. * @member {array} [loadBalancerInboundNatPools] The load balancer inbound @@ -126,6 +128,21 @@ class VirtualMachineScaleSetUpdateIPConfiguration extends models['SubResource'] } } }, + applicationSecurityGroups: { + required: false, + serializedName: 'properties.applicationSecurityGroups', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubResourceElementType', + type: { + name: 'Composite', + className: 'SubResource' + } + } + } + }, loadBalancerBackendAddressPools: { required: false, serializedName: 'properties.loadBalancerBackendAddressPools', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateNetworkProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateNetworkProfile.js index 9b4153b3ab..cddb45cbfe 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateNetworkProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateNetworkProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set network profile. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js index 3ef0f2ea89..7302df893f 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSDisk.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes virtual machine scale set operating system disk Update Object. * This should be used for Updating VMSS OS Disk. @@ -24,6 +22,10 @@ class VirtualMachineScaleSetUpdateOSDisk { * 'None', 'ReadOnly', 'ReadWrite' * @member {boolean} [writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. + * @member {number} [diskSizeGB] Specifies the size of the operating system + * disk in gigabytes. This element can be used to overwrite the size of the + * disk in a virtual machine image.

This value cannot be larger than + * 1023 GB * @member {object} [image] The Source User Image VirtualHardDisk. This * VirtualHardDisk will be copied before using it to attach to the Virtual * Machine. If SourceImage is provided, the destination VirtualHardDisk @@ -33,8 +35,9 @@ class VirtualMachineScaleSetUpdateOSDisk { * uris. * @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' + * account type for the managed disk. Possible values are: Standard_LRS, + * Premium_LRS, and StandardSSD_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS' */ constructor() { } @@ -68,6 +71,13 @@ class VirtualMachineScaleSetUpdateOSDisk { name: 'Boolean' } }, + diskSizeGB: { + required: false, + serializedName: 'diskSizeGB', + type: { + name: 'Number' + } + }, image: { required: false, serializedName: 'image', diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSProfile.js index 54fbf6cd9d..90c31f219f 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateOSProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set OS profile. * @@ -46,6 +44,11 @@ class VirtualMachineScaleSetUpdateOSProfile { * configuration for a Linux OS. * @member {array} [linuxConfiguration.ssh.publicKeys] The list of SSH public * keys used to authenticate with linux based VMs. + * @member {boolean} [linuxConfiguration.provisionVMAgent] Indicates whether + * virtual machine agent should be provisioned on the virtual machine. + *

When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * @member {array} [secrets] The List of certificates for addition to the VM. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdatePublicIPAddressConfiguration.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdatePublicIPAddressConfiguration.js index 66c86376cc..840a0afbf0 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdatePublicIPAddressConfiguration.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdatePublicIPAddressConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress * configuration diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js index 4d51b93ded..11055e0402 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateStorageProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set storage profile. * @@ -36,6 +34,10 @@ class VirtualMachineScaleSetUpdateStorageProfile { * include: 'None', 'ReadOnly', 'ReadWrite' * @member {boolean} [osDisk.writeAcceleratorEnabled] Specifies whether * writeAccelerator should be enabled or disabled on the disk. + * @member {number} [osDisk.diskSizeGB] Specifies the size of the operating + * system disk in gigabytes. This element can be used to overwrite the size + * of the disk in a virtual machine image.

This value cannot be + * larger than 1023 GB * @member {object} [osDisk.image] The Source User Image VirtualHardDisk. * This VirtualHardDisk will be copied before using it to attach to the * Virtual Machine. If SourceImage is provided, the destination @@ -46,8 +48,8 @@ class VirtualMachineScaleSetUpdateStorageProfile { * @member {object} [osDisk.managedDisk] The managed disk parameters. * @member {string} [osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [dataDisks] The data disks. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js index 4f8962feef..0626b85606 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetUpdateVMProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set virtual machine profile. * @@ -51,6 +49,12 @@ class VirtualMachineScaleSetUpdateVMProfile { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [osProfile.secrets] The List of certificates for addition * to the VM. * @member {object} [storageProfile] The virtual machine scale set storage @@ -75,6 +79,10 @@ class VirtualMachineScaleSetUpdateVMProfile { * @member {boolean} [storageProfile.osDisk.writeAcceleratorEnabled] * Specifies whether writeAccelerator should be enabled or disabled on the * disk. + * @member {number} [storageProfile.osDisk.diskSizeGB] Specifies the size of + * the operating system disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * @member {object} [storageProfile.osDisk.image] The Source User Image * VirtualHardDisk. This VirtualHardDisk will be copied before using it to * attach to the Virtual Machine. If SourceImage is provided, the destination @@ -87,8 +95,8 @@ class VirtualMachineScaleSetUpdateVMProfile { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] The data disks. * @member {object} [networkProfile] The virtual machine scale set network * profile. diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js index 7b9e19dea1..ce0b9c63f4 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVM.js @@ -32,16 +32,10 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * has been applied to the virtual machine. * @member {string} [vmId] Azure VM unique ID. * @member {object} [instanceView] The virtual machine instance view. - * @member {number} [instanceView.platformUpdateDomain] Specifies the update - * domain of the virtual machine. - * @member {number} [instanceView.platformFaultDomain] Specifies the fault - * domain of the virtual machine. - * @member {string} [instanceView.computerName] The computer name assigned to - * the virtual machine. - * @member {string} [instanceView.osName] The Operating System running on the - * virtual machine. - * @member {string} [instanceView.osVersion] The version of Operating System - * running on the virtual machine. + * @member {number} [instanceView.platformUpdateDomain] The Update Domain + * count. + * @member {number} [instanceView.platformFaultDomain] The Fault Domain + * count. * @member {string} [instanceView.rdpThumbPrint] The Remote desktop * certificate thumbprint. * @member {object} [instanceView.vmAgent] The VM Agent running on the @@ -76,8 +70,19 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * @member {string} * [instanceView.maintenanceRedeployStatus.lastOperationMessage] Message * returned for the last Maintenance Operation. - * @member {array} [instanceView.disks] The virtual machine disk information. + * @member {array} [instanceView.disks] The disks information. * @member {array} [instanceView.extensions] The extensions information. + * @member {object} [instanceView.vmHealth] The health status for the VM. + * @member {object} [instanceView.vmHealth.status] The health status + * information for the VM. + * @member {string} [instanceView.vmHealth.status.code] The status code. + * @member {string} [instanceView.vmHealth.status.level] The level code. + * Possible values include: 'Info', 'Warning', 'Error' + * @member {string} [instanceView.vmHealth.status.displayStatus] The short + * localizable label for the status. + * @member {string} [instanceView.vmHealth.status.message] The detailed + * status message, including for alerts and error messages. + * @member {date} [instanceView.vmHealth.status.time] The time of the status. * @member {object} [instanceView.bootDiagnostics] Boot Diagnostics is a * debugging feature which allows you to view Console Output and Screenshot * to diagnose VM status.

For Linux Virtual Machines, you can easily @@ -89,6 +94,9 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * @member {string} [instanceView.bootDiagnostics.serialConsoleLogBlobUri] * The Linux serial console log blob Uri. * @member {array} [instanceView.statuses] The resource status information. + * @member {string} [instanceView.placementGroupId] The placement group in + * which the VM is running. If the VM is deallocated it will not have a + * placementGroupId. * @member {object} [hardwareProfile] Specifies the hardware settings for the * virtual machine. * @member {string} [hardwareProfile.vmSize] Specifies the size of the @@ -243,8 +251,8 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual @@ -327,8 +335,18 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine. + *

This may only be set to False when no extensions are present on + * the virtual machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -383,6 +401,7 @@ class VirtualMachineScaleSetVM extends models['Resource'] { * element. * @member {string} [plan.promotionCode] The promotion code. * @member {array} [resources] The virtual machine child extension resources. + * @member {array} [zones] The virtual machine zones. */ constructor() { super(); @@ -486,7 +505,7 @@ class VirtualMachineScaleSetVM extends models['Resource'] { serializedName: 'properties.instanceView', type: { name: 'Composite', - className: 'VirtualMachineInstanceView' + className: 'VirtualMachineScaleSetVMInstanceView' } }, hardwareProfile: { @@ -575,6 +594,21 @@ class VirtualMachineScaleSetVM extends models['Resource'] { } } } + }, + zones: { + required: false, + readOnly: true, + serializedName: 'zones', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMExtensionsSummary.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMExtensionsSummary.js index ec86ebf39d..ddeedbc348 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMExtensionsSummary.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMExtensionsSummary.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Extensions summary for virtual machines of a virtual machine scale set. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMInstanceView.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMInstanceView.js index e408d869b7..2b34d4980f 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMInstanceView.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMInstanceView.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * The instance view of a virtual machine scale set VM. * diff --git a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js index 59d202754a..c701443c3f 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineScaleSetVMProfile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes a virtual machine scale set virtual machine profile. * @@ -94,6 +92,12 @@ class VirtualMachineScaleSetVMProfile { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machines in the scale set. * @member {object} [storageProfile] Specifies the storage settings for the @@ -137,6 +141,10 @@ class VirtualMachineScaleSetVMProfile { * 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} [storageProfile.osDisk.diskSizeGB] Specifies the size of + * the operating system disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * @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 user-image or a specialized VHD.

Possible values are: @@ -153,8 +161,8 @@ class VirtualMachineScaleSetVMProfile { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add data disks to the virtual machines in the scale set. *

For more information about disks, see [About disks and VHDs for @@ -199,6 +207,9 @@ class VirtualMachineScaleSetVMProfile { * @member {string} [priority] Specifies the priority for the virtual * machines in the scale set.

Minimum api-version: * 2017-10-30-preview. Possible values include: 'Regular', 'Low' + * @member {string} [evictionPolicy] Specifies the eviction policy for + * virtual machines in a low priority scale set.

Minimum api-version: + * 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete' */ constructor() { } @@ -270,6 +281,13 @@ class VirtualMachineScaleSetVMProfile { type: { name: 'String' } + }, + evictionPolicy: { + required: false, + serializedName: 'evictionPolicy', + type: { + name: 'String' + } } } } diff --git a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js index bfc6f87c21..bdfe0816aa 100644 --- a/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js +++ b/lib/services/computeManagement2/lib/models/virtualMachineUpdate.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Describes a Virtual Machine. + * Describes a Virtual Machine Update. * * @extends models['UpdateResource'] */ @@ -187,8 +187,8 @@ class VirtualMachineUpdate extends models['UpdateResource'] { * parameters. * @member {string} [storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * @member {array} [storageProfile.dataDisks] Specifies the parameters that * are used to add a data disk to a virtual machine.

For more * information about disks, see [About disks and VHDs for Azure virtual @@ -271,8 +271,18 @@ class VirtualMachineUpdate extends models['UpdateResource'] { * configuration for a Linux OS. * @member {array} [osProfile.linuxConfiguration.ssh.publicKeys] The list of * SSH public keys used to authenticate with linux based VMs. + * @member {boolean} [osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the + * virtual machine.

When this property is not specified in the + * request body, default behavior is to set it to true. This will ensure + * that VM Agent is installed on the VM so that extensions can be added to + * the VM later. * @member {array} [osProfile.secrets] Specifies set of certificates that * should be installed onto the virtual machine. + * @member {boolean} [osProfile.allowExtensionOperations] Specifies whether + * extension operations should be allowed on the virtual machine. + *

This may only be set to False when no extensions are present on + * the virtual machine. * @member {object} [networkProfile] Specifies the network interfaces of the * virtual machine. * @member {array} [networkProfile.networkInterfaces] Specifies the list of @@ -388,10 +398,10 @@ class VirtualMachineUpdate extends models['UpdateResource'] { * type 'None' will remove any identities from the virtual machine. Possible * values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, * UserAssigned', 'None' - * @member {array} [identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @member {object} [identity.userAssignedIdentities] The list of user + * identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * @member {array} [zones] The virtual machine zones. */ constructor() { diff --git a/lib/services/computeManagement2/lib/models/winRMConfiguration.js b/lib/services/computeManagement2/lib/models/winRMConfiguration.js index 0ce512bfb7..a3f2d1ba8d 100644 --- a/lib/services/computeManagement2/lib/models/winRMConfiguration.js +++ b/lib/services/computeManagement2/lib/models/winRMConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Describes Windows Remote Management configuration of the VM * diff --git a/lib/services/computeManagement2/lib/models/windowsConfiguration.js b/lib/services/computeManagement2/lib/models/windowsConfiguration.js index c3cf889c8d..5d2cb0544a 100644 --- a/lib/services/computeManagement2/lib/models/windowsConfiguration.js +++ b/lib/services/computeManagement2/lib/models/windowsConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Specifies Windows operating system settings on the virtual machine. * diff --git a/lib/services/computeManagement2/lib/operations/availabilitySets.js b/lib/services/computeManagement2/lib/operations/availabilitySets.js index 292da5c63a..af9d53c1b8 100644 --- a/lib/services/computeManagement2/lib/operations/availabilitySets.js +++ b/lib/services/computeManagement2/lib/operations/availabilitySets.js @@ -74,7 +74,7 @@ function _createOrUpdate(resourceGroupName, availabilitySetName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -257,7 +257,7 @@ function _update(resourceGroupName, availabilitySetName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -400,9 +400,7 @@ function _update(resourceGroupName, availabilitySetName, parameters, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -418,7 +416,7 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -504,6 +502,132 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback // Create Result let result = null; if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieves information about an availability set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} availabilitySetName The name of the availability set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySet} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, availabilitySetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (availabilitySetName === null || availabilitySetName === undefined || typeof availabilitySetName.valueOf() !== 'string') { + throw new Error('availabilitySetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{availabilitySetName}', encodeURIComponent(availabilitySetName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; @@ -511,7 +635,7 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); + let resultMapper = new client.models['AvailabilitySet']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -527,11 +651,141 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback } /** - * Retrieves information about an availability set. + * Lists all availability sets in a subscription. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [options] Optional Parameters. * - * @param {string} availabilitySetName The name of the availability set. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['AvailabilitySetListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all availability sets in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * @@ -545,13 +799,14 @@ function _deleteMethod(resourceGroupName, availabilitySetName, options, callback * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AvailabilitySet} for more information. + * See {@link AvailabilitySetListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, availabilitySetName, options, callback) { +function _list(resourceGroupName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -561,15 +816,12 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } - if (availabilitySetName === null || availabilitySetName === undefined || typeof availabilitySetName.valueOf() !== 'string') { - throw new Error('availabilitySetName cannot be null or undefined and it must be of type string.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -582,9 +834,8 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{availabilitySetName}', encodeURIComponent(availabilitySetName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -654,7 +905,7 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['AvailabilitySet']().mapper(); + let resultMapper = new client.models['AvailabilitySetListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -670,10 +921,13 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { } /** - * Lists all availability sets in a resource group. + * Lists all available virtual machine sizes that can be used to create a new + * virtual machine in an existing availability set. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} availabilitySetName The name of the availability set. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -686,14 +940,14 @@ function _get(resourceGroupName, availabilitySetName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link AvailabilitySetListResult} for more + * See {@link VirtualMachineSizeListResult} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _list(resourceGroupName, options, callback) { +function _listAvailableSizes(resourceGroupName, availabilitySetName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -703,12 +957,15 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); } + if (availabilitySetName === null || availabilitySetName === undefined || typeof availabilitySetName.valueOf() !== 'string') { + throw new Error('availabilitySetName cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -721,8 +978,9 @@ function _list(resourceGroupName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{availabilitySetName}', encodeURIComponent(availabilitySetName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -730,6 +988,134 @@ function _list(resourceGroupName, options, callback) { requestUrl += '?' + queryParameters.join('&'); } + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineSizeListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all availability sets in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; @@ -808,12 +1194,10 @@ function _list(resourceGroupName, options, callback) { } /** - * Lists all available virtual machine sizes that can be used to create a new - * virtual machine in an existing availability set. - * - * @param {string} resourceGroupName The name of the resource group. + * Lists all availability sets in a resource group. * - * @param {string} availabilitySetName The name of the availability set. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -827,14 +1211,14 @@ function _list(resourceGroupName, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more + * See {@link AvailabilitySetListResult} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listAvailableSizes(resourceGroupName, availabilitySetName, options, callback) { +function _listNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -844,17 +1228,10 @@ function _listAvailableSizes(resourceGroupName, availabilitySetName, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; // Validate try { - if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (availabilitySetName === null || availabilitySetName === undefined || typeof availabilitySetName.valueOf() !== 'string') { - throw new Error('availabilitySetName cannot be null or undefined and it must be of type string.'); - } - if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { - throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -864,16 +1241,8 @@ function _listAvailableSizes(resourceGroupName, availabilitySetName, options, ca } // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{availabilitySetName}', encodeURIComponent(availabilitySetName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -937,7 +1306,7 @@ function _listAvailableSizes(resourceGroupName, availabilitySetName, options, ca parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VirtualMachineSizeListResult']().mapper(); + let resultMapper = new client.models['AvailabilitySetListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -964,8 +1333,11 @@ class AvailabilitySets { this._update = _update; this._deleteMethod = _deleteMethod; this._get = _get; + this._listBySubscription = _listBySubscription; this._list = _list; this._listAvailableSizes = _listAvailableSizes; + this._listBySubscriptionNext = _listBySubscriptionNext; + this._listNext = _listNext; } /** @@ -1250,7 +1622,7 @@ class AvailabilitySets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1287,7 +1659,7 @@ class AvailabilitySets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1295,9 +1667,7 @@ class AvailabilitySets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1409,6 +1779,85 @@ class AvailabilitySets { } } + /** + * Lists all availability sets in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all availability sets in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscription(options, optionalCallback); + } + } + /** * Lists all availability sets in a resource group. * @@ -1581,6 +2030,176 @@ class AvailabilitySets { } } + /** + * Lists all availability sets in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all availability sets in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Lists all availability sets in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all availability sets in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = AvailabilitySets; diff --git a/lib/services/computeManagement2/lib/operations/disks.js b/lib/services/computeManagement2/lib/operations/disks.js index aeb9e01a49..0650e9ba33 100644 --- a/lib/services/computeManagement2/lib/operations/disks.js +++ b/lib/services/computeManagement2/lib/operations/disks.js @@ -31,7 +31,7 @@ const WebResource = msRest.WebResource; * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -233,7 +233,7 @@ function _createOrUpdate(resourceGroupName, diskName, disk, options, callback) { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -473,9 +473,7 @@ function _get(resourceGroupName, diskName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -513,20 +511,6 @@ function _deleteMethod(resourceGroupName, diskName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -913,9 +897,7 @@ function _grantAccess(resourceGroupName, diskName, grantAccessData, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -953,20 +935,6 @@ function _revokeAccess(resourceGroupName, diskName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -989,7 +957,7 @@ function _revokeAccess(resourceGroupName, diskName, options, callback) { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -1290,7 +1258,7 @@ function _beginCreateOrUpdate(resourceGroupName, diskName, disk, options, callba * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -1483,9 +1451,7 @@ function _beginUpdate(resourceGroupName, diskName, disk, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1587,23 +1553,6 @@ function _beginDeleteMethod(resourceGroupName, diskName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1802,9 +1751,7 @@ function _beginGrantAccess(resourceGroupName, diskName, grantAccessData, options * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1906,23 +1853,6 @@ function _beginRevokeAccess(resourceGroupName, diskName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2223,7 +2153,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -2338,7 +2268,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -2516,7 +2446,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -2600,7 +2530,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -2758,7 +2688,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2798,7 +2728,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2806,9 +2736,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3121,7 +3049,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3161,7 +3089,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3169,9 +3097,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3213,7 +3139,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -3328,7 +3254,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -3506,7 +3432,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -3590,7 +3516,7 @@ class Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -3656,7 +3582,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3696,7 +3622,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3704,9 +3630,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3859,7 +3783,7 @@ class Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3899,7 +3823,7 @@ class Disks { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3907,9 +3831,7 @@ class Disks { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/galleries.js b/lib/services/computeManagement2/lib/operations/galleries.js new file mode 100644 index 0000000000..d4ac24efb0 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleries.js @@ -0,0 +1,2013 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, gallery, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (gallery === null || gallery === undefined) { + throw new Error('gallery cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (gallery !== null && gallery !== undefined) { + let requestModelMapper = new client.models['Gallery']().mapper(); + requestModel = client.serialize(requestModelMapper, gallery, 'gallery'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(gallery, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a Galleries. */ +class Galleries { + /** + * Create a Galleries. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listByResourceGroup = _listByResourceGroup; + this._listBySubscription = _listBySubscription; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listBySubscriptionNext = _listBySubscriptionNext; + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, gallery, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscription(options, optionalCallback); + } + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, gallery, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} gallery Parameters supplied to the create or update gallery + * operation. + * + * @param {string} [gallery.description] The description of this gallery + * resource. + * + * @param {object} [gallery.identifier] + * + * @param {string} gallery.location Resource location + * + * @param {object} [gallery.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, gallery, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = Galleries; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageOperations.js b/lib/services/computeManagement2/lib/operations/galleryImageOperations.js new file mode 100644 index 0000000000..f54b4fa9a0 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageOperations.js @@ -0,0 +1,1680 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesInGallery(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImage']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageOperations. */ +class GalleryImageOperations { + /** + * Create a GalleryImageOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImagesInGallery = _listGalleryImagesInGallery; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesInGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesInGallery(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [parameters.description] The description of this gallery + * image resource. + * + * @param {string} [parameters.eula] The Eula agreement for the gallery image. + * + * @param {string} [parameters.privacyStatementUri] The privacy statement uri. + * + * @param {string} [parameters.releaseNoteUri] The release note uri. + * + * @param {string} [parameters.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.

Possible values are:

**Windows** + *

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [parameters.osState] The OS State. Possible values include: + * 'Generalized', 'Specialized' + * + * @param {date} [parameters.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [parameters.identifier] + * + * @param {string} [parameters.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [parameters.identifier.offer] The gallery image offer name. + * + * @param {string} [parameters.identifier.sku] The gallery image sku name. + * + * @param {object} [parameters.recommended] + * + * @param {object} [parameters.recommended.vCPUs] + * + * @param {object} [parameters.recommended.memory] + * + * @param {number} [parameters.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [parameters.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [parameters.disallowed] + * + * @param {array} [parameters.disallowed.diskTypes] A list of disk types. + * + * @param {object} [parameters.purchasePlan] + * + * @param {string} [parameters.purchasePlan.name] The plan ID. + * + * @param {string} [parameters.purchasePlan.publisher] The publisher ID. + * + * @param {string} [parameters.purchasePlan.product] The product ID. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageOperations; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js new file mode 100644 index 0000000000..ff9e763145 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersionOperations.js @@ -0,0 +1,1535 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['GalleryImageVersion']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageVersionOperations. */ +class GalleryImageVersionOperations { + /** + * Create a GalleryImageVersionOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImageVersionsInGalleryImage = _listGalleryImageVersionsInGalleryImage; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsInGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsInGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery image version operation. + * + * @param {object} [parameters.publishingProfile] + * + * @param {boolean} [parameters.publishingProfile.excludeFromLatest] The flag + * means that if it is set to true, people deploying VMs with 'latest' as + * version will not use this version. + * + * @param {date} [parameters.publishingProfile.endOfLifeDate] The end of life + * date of the gallery image version. + * + * @param {array} [parameters.publishingProfile.regions] The regions where the + * artifact is going to be published. + * + * @param {object} [parameters.publishingProfile.source] + * + * @param {object} [parameters.publishingProfile.source.managedImage] + * + * @param {string} [parameters.publishingProfile.source.managedImage.id] The + * managed artifact id. + * + * @param {object} [parameters.storageProfile] + * + * @param {object} [parameters.storageProfile.osDiskImage] + * + * @param {number} [parameters.storageProfile.osDiskImage.sizedInGB] It + * indicates the size of the VHD to create. + * + * @param {string} [parameters.storageProfile.osDiskImage.hostCaching] The host + * caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. + * Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [parameters.storageProfile.dataDiskImages] A list of data + * disk images. + * + * @param {object} [parameters.replicationStatus] + * + * @param {string} [parameters.replicationStatus.aggregatedState] This is the + * aggregated replication status based on the regional replication status. + * Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed' + * + * @param {array} [parameters.replicationStatus.summary] This is a summary of + * replication status for each region. + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, parameters, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageVersionOperations; diff --git a/lib/services/computeManagement2/lib/operations/galleryImageVersions.js b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js new file mode 100644 index 0000000000..60c7922175 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImageVersions.js @@ -0,0 +1,1967 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'ReplicationStatus' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (expand) { + let allowedValues = [ 'ReplicationStatus' ]; + if (!allowedValues.some( function(item) { return item === expand; })) { + throw new Error(expand + ' is not a valid value. The valid values are: ' + allowedValues); + } + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersion === null || galleryImageVersion === undefined) { + throw new Error('galleryImageVersion cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (galleryImageVersion !== null && galleryImageVersion !== undefined) { + let requestModelMapper = new client.models['GalleryImageVersion']().mapper(); + requestModel = client.serialize(requestModelMapper, galleryImageVersion, 'galleryImageVersion'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(galleryImageVersion, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersion']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageVersionName === null || galleryImageVersionName === undefined || typeof galleryImageVersionName.valueOf() !== 'string') { + throw new Error('galleryImageVersionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + requestUrl = requestUrl.replace('{galleryImageVersionName}', encodeURIComponent(galleryImageVersionName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageVersionList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImageVersions. */ +class GalleryImageVersions { + /** + * Create a GalleryImageVersions. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImageVersionsByGalleryImage = _listGalleryImageVersionsByGalleryImage; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listGalleryImageVersionsByGalleryImageNext = _listGalleryImageVersionsByGalleryImageNext; + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'ReplicationStatus' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'ReplicationStatus' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsByGalleryImageWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsByGalleryImage(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} galleryImageVersion Parameters supplied to the create or + * update gallery image version operation. + * + * @param {object} [galleryImageVersion.publishingProfile] + * + * @param {boolean} [galleryImageVersion.publishingProfile.excludeFromLatest] + * The flag means that if it is set to true, people deploying VMs with 'latest' + * as version will not use this version. + * + * @param {date} [galleryImageVersion.publishingProfile.endOfLifeDate] The end + * of life date of the gallery image version. + * + * @param {array} [galleryImageVersion.publishingProfile.regions] The regions + * where the artifact is going to be published. + * + * @param {object} [galleryImageVersion.publishingProfile.source] + * + * @param {object} [galleryImageVersion.publishingProfile.source.managedImage] + * + * @param {string} + * [galleryImageVersion.publishingProfile.source.managedImage.id] The managed + * artifact id. + * + * @param {object} [galleryImageVersion.storageProfile] + * + * @param {object} [galleryImageVersion.storageProfile.osDiskImage] + * + * @param {number} [galleryImageVersion.storageProfile.osDiskImage.sizedInGB] + * It indicates the size of the VHD to create. + * + * @param {string} [galleryImageVersion.storageProfile.osDiskImage.hostCaching] + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and + * 'ReadWrite'. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * + * @param {array} [galleryImageVersion.storageProfile.dataDiskImages] A list of + * data disk images. + * + * @param {object} [galleryImageVersion.replicationStatus] + * + * @param {string} [galleryImageVersion.replicationStatus.aggregatedState] This + * is the aggregated replication status based on the regional replication + * status. Possible values include: 'Unknown', 'InProgress', 'Completed', + * 'Failed' + * + * @param {array} [galleryImageVersion.replicationStatus.summary] This is a + * summary of replication status for each region. + * + * @param {string} galleryImageVersion.location Resource location + * + * @param {object} [galleryImageVersion.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersion} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersion} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion, options, optionalCallback); + } + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image version. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {string} galleryImageVersionName The name of the gallery image + * version. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, options, optionalCallback); + } + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImageVersionsByGalleryImageNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery image versions under a gallery image. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageVersionList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageVersionList} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImageVersionsByGalleryImageNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = GalleryImageVersions; diff --git a/lib/services/computeManagement2/lib/operations/galleryImages.js b/lib/services/computeManagement2/lib/operations/galleryImages.js new file mode 100644 index 0000000000..43ddc1bc74 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryImages.js @@ -0,0 +1,1949 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesByGallery(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (galleryImage === null || galleryImage === undefined) { + throw new Error('galleryImage cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (galleryImage !== null && galleryImage !== undefined) { + let requestModelMapper = new client.models['GalleryImage']().mapper(); + requestModel = client.serialize(requestModelMapper, galleryImage, 'galleryImage'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(galleryImage, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImage']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (galleryImageName === null || galleryImageName === undefined || typeof galleryImageName.valueOf() !== 'string') { + throw new Error('galleryImageName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + requestUrl = requestUrl.replace('{galleryImageName}', encodeURIComponent(galleryImageName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['OperationStatusResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleryImagesByGalleryNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryImageList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryImages. */ +class GalleryImages { + /** + * Create a GalleryImages. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleryImagesByGallery = _listGalleryImagesByGallery; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listGalleryImagesByGalleryNext = _listGalleryImagesByGalleryNext; + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImage, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesByGalleryWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesByGallery(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesByGallery(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, galleryImage, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} galleryImage Parameters supplied to the create or update + * gallery image operation. + * + * @param {string} [galleryImage.description] The description of this gallery + * image resource. + * + * @param {string} [galleryImage.eula] The Eula agreement for the gallery + * image. + * + * @param {string} [galleryImage.privacyStatementUri] The privacy statement + * uri. + * + * @param {string} [galleryImage.releaseNoteUri] The release note uri. + * + * @param {string} [galleryImage.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.

Possible values are:

+ * **Windows**

**Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} [galleryImage.osState] The OS State. Possible values + * include: 'Generalized', 'Specialized' + * + * @param {date} [galleryImage.endOfLifeDate] The end of life of this gallery + * image. + * + * @param {object} [galleryImage.identifier] + * + * @param {string} [galleryImage.identifier.publisher] The gallery image + * publisher name. + * + * @param {string} [galleryImage.identifier.offer] The gallery image offer + * name. + * + * @param {string} [galleryImage.identifier.sku] The gallery image sku name. + * + * @param {object} [galleryImage.recommended] + * + * @param {object} [galleryImage.recommended.vCPUs] + * + * @param {object} [galleryImage.recommended.memory] + * + * @param {number} [galleryImage.recommended.memory.min] The minimum number of + * the resource. + * + * @param {number} [galleryImage.recommended.memory.max] The maximum number of + * the resource. + * + * @param {object} [galleryImage.disallowed] + * + * @param {array} [galleryImage.disallowed.diskTypes] A list of disk types. + * + * @param {object} [galleryImage.purchasePlan] + * + * @param {string} [galleryImage.purchasePlan.name] The plan ID. + * + * @param {string} [galleryImage.purchasePlan.publisher] The publisher ID. + * + * @param {string} [galleryImage.purchasePlan.product] The product ID. + * + * @param {string} galleryImage.location Resource location + * + * @param {object} [galleryImage.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImage} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImage} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, galleryImageName, galleryImage, options, optionalCallback); + } + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, galleryImageName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {string} galleryImageName The name of the gallery image. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {OperationStatusResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, galleryImageName, options, optionalCallback); + } + } + + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleryImagesByGalleryNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleryImagesByGalleryNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List gallery images under a gallery. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryImageList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryImageList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleryImagesByGalleryNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleryImagesByGalleryNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleryImagesByGalleryNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = GalleryImages; diff --git a/lib/services/computeManagement2/lib/operations/galleryOperations.js b/lib/services/computeManagement2/lib/operations/galleryOperations.js new file mode 100644 index 0000000000..983c8a3208 --- /dev/null +++ b/lib/services/computeManagement2/lib/operations/galleryOperations.js @@ -0,0 +1,1550 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, galleryName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGalleriesInSubscription(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['GalleryList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['Gallery']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Gallery']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, galleryName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (galleryName === null || galleryName === undefined || typeof galleryName.valueOf() !== 'string') { + throw new Error('galleryName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{galleryName}', encodeURIComponent(galleryName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a GalleryOperations. */ +class GalleryOperations { + /** + * Create a GalleryOperations. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._listGalleriesInResourceGroup = _listGalleriesInResourceGroup; + this._listGalleriesInSubscription = _listGalleriesInSubscription; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves information about a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGalleriesInSubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * List galleries under a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GalleryList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GalleryList} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGalleriesInSubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGalleriesInSubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGalleriesInSubscription(options, optionalCallback); + } + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, galleryName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} parameters Parameters supplied to the create or update + * gallery operation. + * + * @param {string} [parameters.description] The description of this gallery + * resource. + * + * @param {object} [parameters.identifier] + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Gallery} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Gallery} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, galleryName, parameters, options, optionalCallback); + } + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, galleryName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a gallery. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} galleryName The name of the gallery. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, galleryName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, galleryName, options, optionalCallback); + } + } + +} + +module.exports = GalleryOperations; diff --git a/lib/services/computeManagement2/lib/operations/images.js b/lib/services/computeManagement2/lib/operations/images.js index 27ee1a0181..536aac6b3f 100644 --- a/lib/services/computeManagement2/lib/operations/images.js +++ b/lib/services/computeManagement2/lib/operations/images.js @@ -68,8 +68,8 @@ const WebResource = msRest.WebResource; * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -209,8 +209,8 @@ function _createOrUpdate(resourceGroupName, imageName, parameters, options, call * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -313,9 +313,7 @@ function _update(resourceGroupName, imageName, parameters, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -353,20 +351,6 @@ function _deleteMethod(resourceGroupName, imageName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -412,7 +396,7 @@ function _get(resourceGroupName, imageName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -559,7 +543,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -696,7 +680,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -849,8 +833,8 @@ function _list(options, callback) { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -894,7 +878,7 @@ function _beginCreateOrUpdate(resourceGroupName, imageName, parameters, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1089,8 +1073,8 @@ function _beginCreateOrUpdate(resourceGroupName, imageName, parameters, options, * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1132,7 +1116,7 @@ function _beginUpdate(resourceGroupName, imageName, parameters, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1292,9 +1276,7 @@ function _beginUpdate(resourceGroupName, imageName, parameters, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1310,7 +1292,7 @@ function _beginDeleteMethod(resourceGroupName, imageName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1396,23 +1378,6 @@ function _beginDeleteMethod(resourceGroupName, imageName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1748,8 +1713,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1843,8 +1808,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -1960,8 +1925,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2053,8 +2018,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2129,7 +2094,7 @@ class Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2166,7 +2131,7 @@ class Images { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2174,9 +2139,7 @@ class Images { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2511,8 +2474,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2606,8 +2569,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2723,8 +2686,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2816,8 +2779,8 @@ class Images { * * @param {string} [parameters.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2892,7 +2855,7 @@ class Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2929,7 +2892,7 @@ class Images { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2937,9 +2900,7 @@ class Images { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index e625011837..c9d18fa3e7 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -310,11 +310,11 @@ export interface AvailabilitySets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Delete an availability set. @@ -335,7 +335,7 @@ export interface AvailabilitySets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -343,17 +343,15 @@ export interface AvailabilitySets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, availabilitySetName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, availabilitySetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -415,6 +413,58 @@ export interface AvailabilitySets { get(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Lists all availability sets in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all availability sets in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilitySetListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Lists all availability sets in a resource group. * @@ -531,6 +581,122 @@ export interface AvailabilitySets { listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listAvailableSizes(resourceGroupName: string, availabilitySetName: string, callback: ServiceCallback): void; listAvailableSizes(resourceGroupName: string, availabilitySetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all availability sets in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all availability sets in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilitySetListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all availability sets in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all availability sets in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AvailabilitySetListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AvailabilitySetListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AvailabilitySetListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -1060,11 +1226,11 @@ export interface VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -1088,7 +1254,7 @@ export interface VirtualMachineExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1096,17 +1262,15 @@ export interface VirtualMachineExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1181,6 +1345,74 @@ export interface VirtualMachineExtensions { get(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachineExtensionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachineExtensionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtensionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * The operation to create or update the extension. * @@ -1490,11 +1722,11 @@ export interface VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -1518,7 +1750,7 @@ export interface VirtualMachineExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1526,64 +1758,66 @@ export interface VirtualMachineExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * VirtualMachines + * VirtualMachineImages * __NOTE__: An instance of this class is automatically created for an * instance of the ComputeManagementClient. */ -export interface VirtualMachines { +export interface VirtualMachineImages { /** - * The operation to get all extensions of a Virtual Machine. + * Gets a virtual machine image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @param {string} vmName The name of the virtual machine containing the - * extension. + * @param {string} publisherName A valid image publisher. * - * @param {object} [options] Optional Parameters. + * @param {string} offer A valid image publisher offer. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. + * @param {string} skus A valid image SKU. + * + * @param {string} version A valid image SKU version. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getExtensionsWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to get all extensions of a Virtual Machine. + * Gets a virtual machine image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @param {string} vmName The name of the virtual machine containing the - * extension. + * @param {string} publisherName A valid image publisher. * - * @param {object} [options] Optional Parameters. + * @param {string} offer A valid image publisher offer. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. + * @param {string} skus A valid image SKU. + * + * @param {string} version A valid image SKU version. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1595,7 +1829,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineExtensionsListResult} - The deserialized result object. + * @resolve {VirtualMachineImage} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1603,73 +1837,68 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineExtensionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineExtensionsListResult} for more - * information. + * {VirtualMachineImage} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineImage} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getExtensions(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getExtensions(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - getExtensions(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(location: string, publisherName: string, offer: string, skus: string, version: string, callback: ServiceCallback): void; + get(location: string, publisherName: string, offer: string, skus: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * Gets a list of all virtual machine image versions for the specified + * location, publisher, offer, and SKU. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @param {string} vmName The name of the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {string} offer A valid image publisher offer. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {string} skus A valid image SKU. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {object} [options] Optional Parameters. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {string} [options.filter] The filter to apply on the operation. * - * @param {object} [options] Optional Parameters. + * @param {number} [options.top] + * + * @param {string} [options.orderby] * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * Gets a list of all virtual machine image versions for the specified + * location, publisher, offer, and SKU. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @param {string} vmName The name of the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {string} offer A valid image publisher offer. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {string} skus A valid image SKU. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {object} [options] Optional Parameters. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {string} [options.filter] The filter to apply on the operation. * - * @param {object} [options] Optional Parameters. + * @param {number} [options.top] + * + * @param {string} [options.orderby] * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1681,7 +1910,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1689,1216 +1918,272 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineCaptureResult} for more - * information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, publisherName: string, offer: string, skus: string, callback: ServiceCallback): void; + list(location: string, publisherName: string, offer: string, skus: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to create or update a virtual machine. + * Gets a list of virtual machine image offers for the specified location and + * publisher. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @param {string} vmName The name of the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.plan] Specifies information about the - * marketplace image used to create the virtual machine. This element is only - * used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, - * find the marketplace image that you want to use and then click **Want to - * deploy programmatically, Get Started ->**. Enter any required information - * and then click **Save**. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.plan.name] The plan ID. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.plan.publisher] The publisher ID. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * @reject {Error|ServiceError} - The error object. + */ + listOffersWithHttpOperationResponse(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image offers for the specified location and + * publisher. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @param {string} location The name of a supported Azure region. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

The available VM sizes depend on region and availability set. For a - * list of available sizes use these APIs:

[List all available - * virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

[List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

[List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', - * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', - * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', - * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', - * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', - * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', - * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', - * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - * 'Standard_NV12', 'Standard_NV24' + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.storageProfile.imageReference] Specifies - * information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element - * is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @resolve {Array} - The deserialized result object. * - * @param {string} [parameters.storageProfile.imageReference.version] Specifies - * the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. - * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the - * latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even - * if a new version becomes available. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.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 user-image or a specialized VHD.

Possible values - * are:

**Windows**

**Linux**. Possible values include: - * 'Windows', 'Linux' + * {Array} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

Minimum - * api-version: 2015-06-15 + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listOffers(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listOffers(location: string, publisherName: string, callback: ServiceCallback): void; + listOffers(location: string, publisherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual machine image publishers for the specified Azure + * location. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @param {string} location The name of a supported Azure region. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @param {object} [options] Optional Parameters. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. - * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. - * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. - * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. - * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. - * - * @param {object} [parameters.storageProfile.osDisk.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. - * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. - * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

Possible values are:

**None** - *

**ReadOnly**

**ReadWrite**

Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' - * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param {string} parameters.storageProfile.osDisk.createOption Specifies how - * the virtual machine 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' - * - * @param {number} [parameters.storageProfile.osDisk.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.

This - * value cannot be larger than 1023 GB - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. - * - * @param {string} - * [parameters.storageProfile.osDisk.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' - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

- * 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). - * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. - * - * @param {string} [parameters.osProfile.computerName] Specifies the host OS - * name of the virtual machine.

**Max-length (Windows):** 15 - * characters

**Max-length (Linux):** 64 characters.

For - * naming conventions and restrictions see [Azure infrastructure services - * implementation - * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - * - * @param {string} [parameters.osProfile.adminUsername] Specifies the name of - * the administrator account.

**Windows-only restriction:** Cannot end - * in "."

**Disallowed values:** "administrator", "admin", "user", - * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", - * "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

**Minimum-length - * (Linux):** 1 character

**Max-length (Linux):** 64 characters - *

**Max-length (Windows):** 20 characters

  • For root - * access to the Linux VM, see [Using root privileges on Linux virtual machines - * in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * For a list of built-in system users on Linux that should not be used in this - * field, see [Selecting User Names for Linux on - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {string} [parameters.osProfile.adminPassword] Specifies the password - * of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    - * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 - * characters

    **Complexity requirements:** 3 out of 4 conditions below - * need to be fulfilled
    Has lower characters
    Has upper characters
    - * Has a digit
    Has a special character (Regex match [\W_])

    - * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

    For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - * - * @param {string} [parameters.osProfile.customData] Specifies a base-64 - * encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum - * length of the binary array is 65535 bytes.

    For using cloud-init for - * your VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates - * whether virtual machine agent should be provisioned on the virtual machine. - *

    When this property is not specified in the request body, default - * behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. - * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" - * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. - * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. - * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners - * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. - * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. - * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. - * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. - * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. - * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. - * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. - * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. - * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. - * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. - * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. - * - * @param {string} [parameters.availabilitySet.id] Resource Id - * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 - * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. - * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' - * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - * - * @param {array} [parameters.zones] The virtual machine zones. - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to create or update a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. - * - * @param {object} parameters Parameters supplied to the Create Virtual Machine - * operation. - * - * @param {object} [parameters.plan] Specifies information about the - * marketplace image used to create the virtual machine. This element is only - * used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, - * find the marketplace image that you want to use and then click **Want to - * deploy programmatically, Get Started ->**. Enter any required information - * and then click **Save**. - * - * @param {string} [parameters.plan.name] The plan ID. - * - * @param {string} [parameters.plan.publisher] The publisher ID. - * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. - * - * @param {string} [parameters.plan.promotionCode] The promotion code. - * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. - * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    The available VM sizes depend on region and availability set. For a - * list of available sizes use these APIs:

    [List all available - * virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', - * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', - * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', - * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', - * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', - * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', - * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', - * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - * 'Standard_NV12', 'Standard_NV24' - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.imageReference] Specifies - * information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element - * is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. - * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. - * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. - * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. - * - * @param {string} [parameters.storageProfile.imageReference.version] Specifies - * the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. - * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the - * latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even - * if a new version becomes available. - * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values - * are:

    **Windows**

    **Linux**. Possible values include: - * 'Windows', 'Linux' - * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 - * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. - * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. - * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. - * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. - * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. - * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. - * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. - * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. - * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. - * - * @param {object} [parameters.storageProfile.osDisk.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. - * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. - * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' - * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param {string} parameters.storageProfile.osDisk.createOption Specifies how - * the virtual machine 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' - * - * @param {number} [parameters.storageProfile.osDisk.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.

    This - * value cannot be larger than 1023 GB - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. - * - * @param {string} - * [parameters.storageProfile.osDisk.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' - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). - * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. - * - * @param {string} [parameters.osProfile.computerName] Specifies the host OS - * name of the virtual machine.

    **Max-length (Windows):** 15 - * characters

    **Max-length (Linux):** 64 characters.

    For - * naming conventions and restrictions see [Azure infrastructure services - * implementation - * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - * - * @param {string} [parameters.osProfile.adminUsername] Specifies the name of - * the administrator account.

    **Windows-only restriction:** Cannot end - * in "."

    **Disallowed values:** "administrator", "admin", "user", - * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", - * "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length - * (Linux):** 1 character

    **Max-length (Linux):** 64 characters - *

    **Max-length (Windows):** 20 characters

  • For root - * access to the Linux VM, see [Using root privileges on Linux virtual machines - * in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * For a list of built-in system users on Linux that should not be used in this - * field, see [Selecting User Names for Linux on - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {string} [parameters.osProfile.adminPassword] Specifies the password - * of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    - * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 - * characters

    **Complexity requirements:** 3 out of 4 conditions below - * need to be fulfilled
    Has lower characters
    Has upper characters
    - * Has a digit
    Has a special character (Regex match [\W_])

    - * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

    For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - * - * @param {string} [parameters.osProfile.customData] Specifies a base-64 - * encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum - * length of the binary array is 65535 bytes.

    For using cloud-init for - * your VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates - * whether virtual machine agent should be provisioned on the virtual machine. - *

    When this property is not specified in the request body, default - * behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. - * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" - * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. - * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. - * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners - * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. - * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. - * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. - * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. - * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. - * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. - * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. - * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. - * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. - * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. - * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. - * - * @param {string} [parameters.availabilitySet.id] Resource Id - * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 - * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. - * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' - * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. - * - * @param {array} [parameters.zones] The virtual machine zones. - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VirtualMachine} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * The operation to update a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. - * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. - * - * @param {object} [parameters.plan] Specifies information about the - * marketplace image used to create the virtual machine. This element is only - * used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, - * find the marketplace image that you want to use and then click **Want to - * deploy programmatically, Get Started ->**. Enter any required information - * and then click **Save**. - * - * @param {string} [parameters.plan.name] The plan ID. - * - * @param {string} [parameters.plan.publisher] The publisher ID. - * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. - * - * @param {string} [parameters.plan.promotionCode] The promotion code. - * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. - * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    The available VM sizes depend on region and availability set. For a - * list of available sizes use these APIs:

    [List all available - * virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', - * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', - * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', - * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', - * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', - * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', - * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', - * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - * 'Standard_NV12', 'Standard_NV24' - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.imageReference] Specifies - * information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element - * is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + listPublishersWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image publishers for the specified Azure + * location. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {string} location The name of a supported Azure region. * - * @param {string} [parameters.storageProfile.imageReference.version] Specifies - * the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. - * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the - * latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even - * if a new version becomes available. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values - * are:

    **Windows**

    **Linux**. Possible values include: - * 'Windows', 'Linux' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * {Promise} A promise is returned. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @resolve {Array} - The deserialized result object. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @reject {Error|ServiceError} - The error object. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * {Array} [result] - The deserialized result object if an error did not occur. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listPublishers(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listPublishers(location: string, callback: ServiceCallback): void; + listPublishers(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual machine image SKUs for the specified location, + * publisher, and offer. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {string} location The name of a supported Azure region. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {string} publisherName A valid image publisher. * - * @param {object} [parameters.storageProfile.osDisk.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. + * @param {string} offer A valid image publisher offer. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @returns {Promise} A promise is returned * - * @param {string} parameters.storageProfile.osDisk.createOption Specifies how - * the virtual machine 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' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [parameters.storageProfile.osDisk.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.

    This - * value cannot be larger than 1023 GB + * @reject {Error|ServiceError} - The error object. + */ + listSkusWithHttpOperationResponse(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image SKUs for the specified location, + * publisher, and offer. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @param {string} location The name of a supported Azure region. * - * @param {string} - * [parameters.storageProfile.osDisk.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' + * @param {string} publisherName A valid image publisher. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} offer A valid image publisher offer. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.osProfile.computerName] Specifies the host OS - * name of the virtual machine.

    **Max-length (Windows):** 15 - * characters

    **Max-length (Linux):** 64 characters.

    For - * naming conventions and restrictions see [Azure infrastructure services - * implementation - * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.osProfile.adminUsername] Specifies the name of - * the administrator account.

    **Windows-only restriction:** Cannot end - * in "."

    **Disallowed values:** "administrator", "admin", "user", - * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", - * "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length - * (Linux):** 1 character

    **Max-length (Linux):** 64 characters - *

    **Max-length (Windows):** 20 characters

  • For root - * access to the Linux VM, see [Using root privileges on Linux virtual machines - * in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * For a list of built-in system users on Linux that should not be used in this - * field, see [Selecting User Names for Linux on - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.osProfile.adminPassword] Specifies the password - * of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    - * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 - * characters

    **Complexity requirements:** 3 out of 4 conditions below - * need to be fulfilled
    Has lower characters
    Has upper characters
    - * Has a digit
    Has a special character (Regex match [\W_])

    - * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

    For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * {Promise} A promise is returned. * - * @param {string} [parameters.osProfile.customData] Specifies a base-64 - * encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum - * length of the binary array is 65535 bytes.

    For using cloud-init for - * your VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @resolve {Array} - The deserialized result object. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates - * whether virtual machine agent should be provisioned on the virtual machine. - *

    When this property is not specified in the request body, default - * behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {Array} [result] - The deserialized result object if an error did not occur. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSkus(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSkus(location: string, publisherName: string, offer: string, callback: ServiceCallback): void; + listSkus(location: string, publisherName: string, offer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * UsageOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface UsageOperations { + + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {string} location The location for which resource usage is queried. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @returns {Promise} A promise is returned * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {string} location The location for which resource usage is queried. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * {Promise} A promise is returned. * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @resolve {ListUsagesResult} - The deserialized result object. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' + * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListUsagesResult} for more information. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.zones] The virtual machine zones. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, callback: ServiceCallback): void; + list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {object} [parameters.tags] Resource tags + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -2907,185 +2192,169 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to update a virtual machine. + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.plan] Specifies information about the - * marketplace image used to create the virtual machine. This element is only - * used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, - * find the marketplace image that you want to use and then click **Want to - * deploy programmatically, Get Started ->**. Enter any required information - * and then click **Save**. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.plan.name] The plan ID. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.plan.publisher] The publisher ID. + * {Promise} A promise is returned. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * @resolve {ListUsagesResult} - The deserialized result object. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    The available VM sizes depend on region and availability set. For a - * list of available sizes use these APIs:

    [List all available - * virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', - * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', - * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', - * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', - * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', - * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', - * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', - * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - * 'Standard_NV12', 'Standard_NV24' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListUsagesResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * VirtualMachineSizes + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface VirtualMachineSizes { + + + /** + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) + * + * @param {string} location The location upon which virtual-machine-sizes is + * queried. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * - * @param {object} [parameters.storageProfile.imageReference] Specifies - * information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element - * is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. + * @param {string} location The location upon which virtual-machine-sizes is + * queried. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.storageProfile.imageReference.version] Specifies - * the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. - * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the - * latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even - * if a new version becomes available. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {Promise} A promise is returned. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @resolve {VirtualMachineSizeListResult} - The deserialized result object. * - * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values - * are:

    **Windows**

    **Linux**. Possible values include: - * 'Windows', 'Linux' + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineSizeListResult} for more + * information. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, callback: ServiceCallback): void; + list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Images + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface Images { + + + /** + * Create or update an image. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {string} imageName The name of the image. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {object} parameters Parameters supplied to the Create Image + * operation. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [parameters.storageProfile.osDisk.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. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the * caching requirements.

    Possible values are:

    **None** @@ -3093,36 +2362,15 @@ export interface VirtualMachines { * Standard storage. ReadOnly for Premium storage**. Possible values include: * 'None', 'ReadOnly', 'ReadWrite' * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param {string} parameters.storageProfile.osDisk.createOption Specifies how - * the virtual machine 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' - * * @param {number} [parameters.storageProfile.osDisk.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.

    This - * value cannot be larger than 1023 GB - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. - * - * @param {string} - * [parameters.storageProfile.osDisk.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' + * size of empty data disks in 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 * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

    @@ -3130,169 +2378,94 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. - * - * @param {string} [parameters.osProfile.computerName] Specifies the host OS - * name of the virtual machine.

    **Max-length (Windows):** 15 - * characters

    **Max-length (Linux):** 64 characters.

    For - * naming conventions and restrictions see [Azure infrastructure services - * implementation - * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - * - * @param {string} [parameters.osProfile.adminUsername] Specifies the name of - * the administrator account.

    **Windows-only restriction:** Cannot end - * in "."

    **Disallowed values:** "administrator", "admin", "user", - * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", - * "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length - * (Linux):** 1 character

    **Max-length (Linux):** 64 characters - *

    **Max-length (Windows):** 20 characters

  • For root - * access to the Linux VM, see [Using root privileges on Linux virtual machines - * in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * For a list of built-in system users on Linux that should not be used in this - * field, see [Selecting User Names for Linux on - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {string} [parameters.osProfile.adminPassword] Specifies the password - * of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    - * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 - * characters

    **Complexity requirements:** 3 out of 4 conditions below - * need to be fulfilled
    Has lower characters
    Has upper characters
    - * Has a digit
    Has a special character (Regex match [\W_])

    - * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

    For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - * - * @param {string} [parameters.osProfile.customData] Specifies a base-64 - * encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum - * length of the binary array is 65535 bytes.

    For using cloud-init for - * your VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates - * whether virtual machine agent should be provisioned on the virtual machine. - *

    When this property is not specified in the request body, default - * behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. + * @param {string} parameters.location Resource location * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {object} [parameters.tags] Resource tags * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @param {object} [options] Optional Parameters. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @returns {Promise} A promise is returned * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update an image. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {string} imageName The name of the image. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {object} parameters Parameters supplied to the Create Image + * operation. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * @@ -3308,7 +2481,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3316,114 +2489,168 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to delete a virtual machine. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to delete a virtual machine. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * {Promise} A promise is returned. + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @reject {Error|ServiceError} - The error object. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.tags] Resource tags * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * @param {object} [options] Optional Parameters. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. */ - deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + updateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves information about the model view or the instance view of a virtual - * machine. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves information about the model view or the instance view of a virtual - * machine. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' + * + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @param {string} vmName The name of the virtual machine. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {object} [options] Optional Parameters. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3435,7 +2662,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3443,24 +2670,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Retrieves information about the run-time state of a virtual machine. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -3469,18 +2696,18 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - instanceViewWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves information about the run-time state of a virtual machine. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -3494,7 +2721,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineInstanceView} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3502,50 +2729,52 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineInstanceView} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineInstanceView} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - instanceView(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - instanceView(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - instanceView(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + * Gets an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + * Gets an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3556,7 +2785,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3564,27 +2793,23 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, imageName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Gets the list of images under a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3592,20 +2817,17 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Gets the list of images under a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3618,7 +2840,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3626,25 +2848,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Sets the state of the virtual machine to generalized. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {object} [options] Optional Parameters. * @@ -3653,18 +2872,16 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Sets the state of the virtual machine to generalized. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {object} [options] Optional Parameters. * @@ -3678,7 +2895,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3686,25 +2903,88 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all of the virtual machines in the specified resource group. Use the - * nextLink property in the response to get the next page of virtual machines. + * Create or update an image. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Create Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' + * + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3712,18 +2992,82 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all of the virtual machines in the specified resource group. Use the - * nextLink property in the response to get the next page of virtual machines. + * Create or update an image. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Create Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' + * + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3736,7 +3080,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3744,80 +3088,85 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all of the virtual machines in the specified subscription. Use the - * nextLink property in the response to get the next page of virtual machines. - * - * @param {object} [options] Optional Parameters. + * Update an image. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} resourceGroupName The name of the resource group. * - * @returns {Promise} A promise is returned + * @param {string} imageName The name of the image. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @reject {Error|ServiceError} - The error object. - */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Lists all of the virtual machines in the specified subscription. Use the - * nextLink property in the response to get the next page of virtual machines. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * {Promise} A promise is returned. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Lists all available virtual machine sizes to which the specified virtual - * machine can be resized. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -3826,83 +3175,79 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAvailableSizesWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all available virtual machine sizes to which the specified virtual - * machine can be resized. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. + * @param {string} imageName The name of the image. * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more - * information. + * @param {string} parameters.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.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAvailableSizes(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAvailableSizes(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - listAvailableSizes(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can - * be restarted with the same provisioned resources. You are still charged for - * this virtual machine. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * @returns {Promise} A promise is returned + * @param {number} [parameters.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.

    This value cannot + * be larger than 1023 GB * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @reject {Error|ServiceError} - The error object. - */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to power off (stop) a virtual machine. The virtual machine can - * be restarted with the same provisioned resources. You are still charged for - * this virtual machine. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -3916,7 +3261,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3924,25 +3269,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to restart a virtual machine. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -3951,18 +3295,18 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to restart a virtual machine. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -3976,7 +3320,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3984,25 +3328,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to start a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets the list of images under a resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4011,18 +3352,17 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to start a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets the list of images under a resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4036,7 +3376,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4044,25 +3384,25 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to redeploy a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * - * @param {string} vmName The name of the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4071,18 +3411,19 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - /** - * The operation to redeploy a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. + /** + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * - * @param {string} vmName The name of the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4096,7 +3437,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4104,26 +3445,47 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * VirtualMachines + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface VirtualMachines { /** - * The operation to perform maintenance on a virtual machine. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4131,19 +3493,32 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to perform maintenance on a virtual machine. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4156,7 +3531,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4164,183 +3539,427 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more + * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineCaptureResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Run command on the VM. + * The operation to create or update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Run command operation. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * @param {string} parameters.commandId The run command id. + * @param {object} [parameters.plan] Specifies information about the + * marketplace image used to create the virtual machine. This element is only + * used for marketplace images. Before you can use a marketplace image from an + * API, you must enable the image for programmatic use. In the Azure portal, + * find the marketplace image that you want to use and then click **Want to + * deploy programmatically, Get Started ->**. Enter any required information + * and then click **Save**. * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {array} [parameters.parameters] The run command parameters. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.plan.promotionCode] The promotion code. + * + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. + * + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    The available VM sizes depend on region and availability set. For a + * list of available sizes use these APIs:

    [List all available + * virtual machine sizes in an availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', + * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', + * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', + * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24' + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.imageReference] Specifies + * information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element + * is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. + * + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. + * + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. + * + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. + * + * @param {string} [parameters.storageProfile.imageReference.version] Specifies + * the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. + * + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values + * are:

    **Windows**

    **Linux**. Possible values include: + * 'Windows', 'Linux' + * + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 + * + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. + * + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. + * + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. + * + * @param {object} [parameters.storageProfile.osDisk.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. + * + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. + * + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' + * + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param {string} parameters.storageProfile.osDisk.createOption Specifies how + * the virtual machine 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' + * + * @param {number} [parameters.storageProfile.osDisk.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.

    This + * value cannot be larger than 1023 GB * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @reject {Error|ServiceError} - The error object. - */ - runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Run command on the VM. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {object} parameters Parameters supplied to the Run command operation. + * @param {string} [parameters.osProfile.computerName] Specifies the host OS + * name of the virtual machine.

    **Max-length (Windows):** 15 + * characters

    **Max-length (Linux):** 64 characters.

    For + * naming conventions and restrictions see [Azure infrastructure services + * implementation + * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @param {string} parameters.commandId The run command id. + * @param {string} [parameters.osProfile.adminUsername] Specifies the name of + * the administrator account.

    **Windows-only restriction:** Cannot end + * in "."

    **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + * "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length + * (Linux):** 1 character

    **Max-length (Linux):** 64 characters + *

    **Max-length (Windows):** 20 characters

  • For root + * access to the Linux VM, see [Using root privileges on Linux virtual machines + * in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * For a list of built-in system users on Linux that should not be used in this + * field, see [Selecting User Names for Linux on + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. + * @param {string} [parameters.osProfile.adminPassword] Specifies the password + * of the administrator account.

    **Minimum-length (Windows):** 8 + * characters

    **Minimum-length (Linux):** 6 characters

    + * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 + * characters

    **Complexity requirements:** 3 out of 4 conditions below + * need to be fulfilled
    Has lower characters
    Has upper characters
    + * Has a digit
    Has a special character (Regex match [\W_])

    + * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!"

    For resetting the password, see [How to reset the + * Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {array} [parameters.parameters] The run command parameters. + * @param {string} [parameters.osProfile.customData] Specifies a base-64 + * encoded string of custom data. The base-64 encoded string is decoded to a + * binary array that is saved as a file on the Virtual Machine. The maximum + * length of the binary array is 65535 bytes.

    For using cloud-init for + * your VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

    When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * {Promise} A promise is returned. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @resolve {RunCommandResult} - The deserialized result object. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @reject {Error|ServiceError} - The error object. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * {RunCommandResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {string} vmName The name of the virtual machine. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @reject {Error|ServiceError} - The error object. - */ - beginCaptureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {string} parameters.location Resource location * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineCaptureResult} for more - * information. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to create or update a virtual machine. @@ -4547,8 +4166,8 @@ export interface VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4655,9 +4274,20 @@ export interface VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -4716,10 +4346,10 @@ export interface VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -4732,22 +4362,41 @@ export interface VirtualMachines { * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {Promise} A promise is returned. + * + * @resolve {VirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * The operation to create or update a virtual machine. + * The operation to update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine + * @param {object} parameters Parameters supplied to the Update Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -4945,8 +4594,8 @@ export interface VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -5053,9 +4702,20 @@ export interface VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -5114,15 +4774,13 @@ export interface VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} parameters.location Resource location - * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. @@ -5130,32 +4788,13 @@ export interface VirtualMachines { * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VirtualMachine} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to update a virtual machine. @@ -5362,8 +5001,8 @@ export interface VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -5464,81 +5103,256 @@ export interface VirtualMachines { * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] * Specifies whether password authentication should be disabled. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. + * + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. + * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. + * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. + * + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. + * + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. + * + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. + * + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. + * + * @param {string} [parameters.availabilitySet.id] Resource Id + * + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 + * + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. + * + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' + * + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param {array} [parameters.zones] The virtual machine zones. + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to delete a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to delete a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about the model view or the instance view of a virtual + * machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'instanceView' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about the model view or the instance view of a virtual + * machine. + * + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {string} vmName The name of the virtual machine. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'instanceView' * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {Promise} A promise is returned. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @resolve {VirtualMachine} - The deserialized result object. * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about the run-time state of a virtual machine. * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -5547,394 +5361,198 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + instanceViewWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to update a virtual machine. + * Retrieves information about the run-time state of a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. - * - * @param {object} [parameters.plan] Specifies information about the - * marketplace image used to create the virtual machine. This element is only - * used for marketplace images. Before you can use a marketplace image from an - * API, you must enable the image for programmatic use. In the Azure portal, - * find the marketplace image that you want to use and then click **Want to - * deploy programmatically, Get Started ->**. Enter any required information - * and then click **Save**. - * - * @param {string} [parameters.plan.name] The plan ID. - * - * @param {string} [parameters.plan.publisher] The publisher ID. - * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. - * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    The available VM sizes depend on region and availability set. For a - * list of available sizes use these APIs:

    [List all available - * virtual machine sizes in an availability - * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', - * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', - * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', - * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', - * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', - * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', - * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', - * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', - * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', - * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', - * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', - * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', - * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', - * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', - * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', - * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', - * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', - * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', - * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - * 'Standard_NV12', 'Standard_NV24' + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.storageProfile.imageReference] Specifies - * information about the image to use. You can specify information about - * platform images, marketplace images, or virtual machine images. This element - * is required when you want to use a platform image, marketplace image, or - * virtual machine image, but is not used in other creation operations. + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @resolve {VirtualMachineInstanceView} - The deserialized result object. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.imageReference.version] Specifies - * the version of the platform image or marketplace image used to create the - * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. - * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the - * latest version of an image available at deploy time. Even if you use - * 'latest', the VM image will not automatically update after deploy time even - * if a new version becomes available. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {VirtualMachineInstanceView} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineInstanceView} for more + * information. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values - * are:

    **Windows**

    **Linux**. Possible values include: - * 'Windows', 'Linux' + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + instanceView(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + instanceView(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + instanceView(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @param {string} vmName The name of the virtual machine. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @param {object} [options] Optional Parameters. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @returns {Promise} A promise is returned * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @reject {Error|ServiceError} - The error object. + */ + convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.storageProfile.osDisk.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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * {Promise} A promise is returned. * - * @param {string} parameters.storageProfile.osDisk.createOption Specifies how - * the virtual machine 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' + * @resolve {null} - The deserialized result object. * - * @param {number} [parameters.storageProfile.osDisk.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.

    This - * value cannot be larger than 1023 GB + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * [parameters.storageProfile.osDisk.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' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * - * @param {string} [parameters.osProfile.computerName] Specifies the host OS - * name of the virtual machine.

    **Max-length (Windows):** 15 - * characters

    **Max-length (Linux):** 64 characters.

    For - * naming conventions and restrictions see [Azure infrastructure services - * implementation - * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.osProfile.adminUsername] Specifies the name of - * the administrator account.

    **Windows-only restriction:** Cannot end - * in "."

    **Disallowed values:** "administrator", "admin", "user", - * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", - * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", - * "john", "owner", "root", "server", "sql", "support", "support_388945a0", - * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length - * (Linux):** 1 character

    **Max-length (Linux):** 64 characters - *

    **Max-length (Windows):** 20 characters

  • For root - * access to the Linux VM, see [Using root privileges on Linux virtual machines - * in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * For a list of built-in system users on Linux that should not be used in this - * field, see [Selecting User Names for Linux on - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.osProfile.adminPassword] Specifies the password - * of the administrator account.

    **Minimum-length (Windows):** 8 - * characters

    **Minimum-length (Linux):** 6 characters

    - * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 - * characters

    **Complexity requirements:** 3 out of 4 conditions below - * need to be fulfilled
    Has lower characters
    Has upper characters
    - * Has a digit
    Has a special character (Regex match [\W_])

    - * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", - * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", - * "iloveyou!"

    For resetting the password, see [How to reset the - * Remote Desktop service or its login password in a Windows - * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.osProfile.customData] Specifies a base-64 - * encoded string of custom data. The base-64 encoded string is decoded to a - * binary array that is saved as a file on the Virtual Machine. The maximum - * length of the binary array is 65535 bytes.

    For using cloud-init for - * your VM, see [Using cloud-init to customize a Linux VM during - * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @returns {Promise} A promise is returned * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates - * whether virtual machine agent should be provisioned on the virtual machine. - *

    When this property is not specified in the request body, default - * behavior is to set it to true. This will ensure that VM Agent is installed - * on the VM so that extensions can be added to the VM later. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @reject {Error|ServiceError} - The error object. + */ + deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * {Promise} A promise is returned. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @resolve {null} - The deserialized result object. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, - * you can easily view the output of your console log.

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Sets the state of the virtual machine to generalized. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.availabilitySet] Specifies information about the - * availability set that the virtual machine should be assigned to. Virtual - * machines specified in the same availability set are allocated to different - * nodes to maximize availability. For more information about availability - * sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.licenseType] Specifies that the image or disk - * that is being used was licensed on-premises. This element is only used for - * images that contain the Windows Server operating system.

    Possible - * values are:

    Windows_Client

    Windows_Server

    If this - * element is included in a request for an update, the value must match the - * initial value. This value cannot be updated.

    For more information, - * see [Azure Hybrid Use Benefit for Windows - * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.identity.type] The type of identity used for the - * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an - * implicitly created identity and a set of user assigned identities. The type - * 'None' will remove any identities from the virtual machine. Possible values - * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', - * 'None' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @reject {Error|ServiceError} - The error object. + */ + generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Sets the state of the virtual machine to generalized. * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -5948,7 +5566,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5956,25 +5574,23 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to delete a virtual machine. + * Lists all of the virtual machines in the specified resource group. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5982,19 +5598,18 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to delete a virtual machine. + * Lists all of the virtual machines in the specified resource group. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6007,7 +5622,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6015,26 +5630,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Lists all of the virtual machines in the specified subscription. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {object} [options] Optional Parameters. * @@ -6043,19 +5654,15 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Lists all of the virtual machines in the specified subscription. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {object} [options] Optional Parameters. * @@ -6069,7 +5676,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6077,22 +5684,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Lists all available virtual machine sizes to which the specified virtual + * machine can be resized. * * @param {string} resourceGroupName The name of the resource group. * @@ -6105,15 +5712,15 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAvailableSizesWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Lists all available virtual machine sizes to which the specified virtual + * machine can be resized. * * @param {string} resourceGroupName The name of the resource group. * @@ -6131,7 +5738,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {VirtualMachineSizeListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6139,17 +5746,17 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more + * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineSizeListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAvailableSizes(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAvailableSizes(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + listAvailableSizes(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6168,11 +5775,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to power off (stop) a virtual machine. The virtual machine can @@ -6195,7 +5802,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6203,17 +5810,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6230,11 +5835,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to restart a virtual machine. @@ -6255,7 +5860,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6263,17 +5868,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6290,11 +5893,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to start a virtual machine. @@ -6315,7 +5918,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6323,17 +5926,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6350,11 +5951,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to redeploy a virtual machine. @@ -6375,7 +5976,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6383,17 +5984,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6410,11 +6009,11 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to perform maintenance on a virtual machine. @@ -6435,7 +6034,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6443,17 +6042,15 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -6484,7 +6081,7 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Run command on the VM. @@ -6530,17 +6127,30 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all of the virtual machines in the specified resource group. Use the - * nextLink property in the response to get the next page of virtual machines. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. * * @param {object} [options] Optional Parameters. * @@ -6549,18 +6159,31 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCaptureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all of the virtual machines in the specified resource group. Use the - * nextLink property in the response to get the next page of virtual machines. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. * * @param {object} [options] Optional Parameters. * @@ -6574,7 +6197,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6582,246 +6205,414 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more + * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineCaptureResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * Lists all of the virtual machines in the specified subscription. Use the - * nextLink property in the response to get the next page of virtual machines. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all of the virtual machines in the specified subscription. Use the - * nextLink property in the response to get the next page of virtual machines. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * The operation to create or update a virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} vmName The name of the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.plan] Specifies information about the + * marketplace image used to create the virtual machine. This element is only + * used for marketplace images. Before you can use a marketplace image from an + * API, you must enable the image for programmatic use. In the Azure portal, + * find the marketplace image that you want to use and then click **Want to + * deploy programmatically, Get Started ->**. Enter any required information + * and then click **Save**. * - * {Promise} A promise is returned. + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    The available VM sizes depend on region and availability set. For a + * list of available sizes use these APIs:

    [List all available + * virtual machine sizes in an availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', + * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', + * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', + * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * VirtualMachineImages - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface VirtualMachineImages { - - - /** - * Gets a virtual machine image. + * @param {object} [parameters.storageProfile.imageReference] Specifies + * information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element + * is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. * - * @param {string} location The name of a supported Azure region. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {string} publisherName A valid image publisher. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @param {string} offer A valid image publisher offer. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @param {string} skus A valid image SKU. + * @param {string} [parameters.storageProfile.imageReference.version] Specifies + * the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. * - * @param {string} version A valid image SKU version. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values + * are:

    **Windows**

    **Linux**. Possible values include: + * 'Windows', 'Linux' * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a virtual machine image. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {string} location The name of a supported Azure region. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} publisherName A valid image publisher. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {string} offer A valid image publisher offer. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {string} skus A valid image SKU. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {string} version A valid image SKU version. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.storageProfile.osDisk.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. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * @resolve {VirtualMachineImage} - The deserialized result object. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @reject {Error|ServiceError} - The error object. + * @param {string} parameters.storageProfile.osDisk.createOption Specifies how + * the virtual machine 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' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {number} [parameters.storageProfile.osDisk.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.

    This + * value cannot be larger than 1023 GB * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * {VirtualMachineImage} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineImage} for more information. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(location: string, publisherName: string, offer: string, skus: string, version: string, callback: ServiceCallback): void; - get(location: string, publisherName: string, offer: string, skus: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a list of all virtual machine image versions for the specified - * location, publisher, offer, and SKU. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * @param {string} location The name of a supported Azure region. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {string} publisherName A valid image publisher. + * @param {string} [parameters.osProfile.computerName] Specifies the host OS + * name of the virtual machine.

    **Max-length (Windows):** 15 + * characters

    **Max-length (Linux):** 64 characters.

    For + * naming conventions and restrictions see [Azure infrastructure services + * implementation + * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @param {string} offer A valid image publisher offer. + * @param {string} [parameters.osProfile.adminUsername] Specifies the name of + * the administrator account.

    **Windows-only restriction:** Cannot end + * in "."

    **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + * "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length + * (Linux):** 1 character

    **Max-length (Linux):** 64 characters + *

    **Max-length (Windows):** 20 characters

  • For root + * access to the Linux VM, see [Using root privileges on Linux virtual machines + * in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * For a list of built-in system users on Linux that should not be used in this + * field, see [Selecting User Names for Linux on + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {string} skus A valid image SKU. + * @param {string} [parameters.osProfile.adminPassword] Specifies the password + * of the administrator account.

    **Minimum-length (Windows):** 8 + * characters

    **Minimum-length (Linux):** 6 characters

    + * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 + * characters

    **Complexity requirements:** 3 out of 4 conditions below + * need to be fulfilled
    Has lower characters
    Has upper characters
    + * Has a digit
    Has a special character (Regex match [\W_])

    + * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!"

    For resetting the password, see [How to reset the + * Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.customData] Specifies a base-64 + * encoded string of custom data. The base-64 encoded string is decoded to a + * binary array that is saved as a file on the Virtual Machine. The maximum + * length of the binary array is 65535 bytes.

    For using cloud-init for + * your VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @param {number} [options.top] + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

    When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * - * @param {string} [options.orderby] + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @returns {Promise} A promise is returned + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of all virtual machine image versions for the specified - * location, publisher, offer, and SKU. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {string} location The name of a supported Azure region. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @param {string} publisherName A valid image publisher. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {string} offer A valid image publisher offer. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {string} skus A valid image SKU. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * - * @param {string} [options.filter] The filter to apply on the operation. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {number} [options.top] + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {string} [options.orderby] + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * {Promise} A promise is returned. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @resolve {Array} - The deserialized result object. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.availabilitySet.id] Resource Id * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * {Array} [result] - The deserialized result object if an error did not occur. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, publisherName: string, offer: string, skus: string, callback: ServiceCallback): void; - list(location: string, publisherName: string, offer: string, skus: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a list of virtual machine image offers for the specified location and - * publisher. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @param {string} location The name of a supported Azure region. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} publisherName A valid image publisher. + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -6830,267 +6621,407 @@ export interface VirtualMachineImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listOffersWithHttpOperationResponse(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of virtual machine image offers for the specified location and - * publisher. - * - * @param {string} location The name of a supported Azure region. - * - * @param {string} publisherName A valid image publisher. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. + * The operation to create or update a virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} resourceGroupName The name of the resource group. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} vmName The name of the virtual machine. * - * {Array} [result] - The deserialized result object if an error did not occur. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.plan] Specifies information about the + * marketplace image used to create the virtual machine. This element is only + * used for marketplace images. Before you can use a marketplace image from an + * API, you must enable the image for programmatic use. In the Azure portal, + * find the marketplace image that you want to use and then click **Want to + * deploy programmatically, Get Started ->**. Enter any required information + * and then click **Save**. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listOffers(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listOffers(location: string, publisherName: string, callback: ServiceCallback): void; - listOffers(location: string, publisherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a list of virtual machine image publishers for the specified Azure - * location. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {string} location The name of a supported Azure region. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    The available VM sizes depend on region and availability set. For a + * list of available sizes use these APIs:

    [List all available + * virtual machine sizes in an availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', + * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', + * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', + * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24' * - * @reject {Error|ServiceError} - The error object. - */ - listPublishersWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of virtual machine image publishers for the specified Azure - * location. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {string} location The name of a supported Azure region. + * @param {object} [parameters.storageProfile.imageReference] Specifies + * information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element + * is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.imageReference.version] Specifies + * the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * @resolve {Array} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values + * are:

    **Windows**

    **Linux**. Possible values include: + * 'Windows', 'Linux' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * {Array} [result] - The deserialized result object if an error did not occur. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listPublishers(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listPublishers(location: string, callback: ServiceCallback): void; - listPublishers(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a list of virtual machine image SKUs for the specified location, - * publisher, and offer. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {string} location The name of a supported Azure region. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {string} publisherName A valid image publisher. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {string} offer A valid image publisher offer. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile.osDisk.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. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * @reject {Error|ServiceError} - The error object. - */ - listSkusWithHttpOperationResponse(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of virtual machine image SKUs for the specified location, - * publisher, and offer. + * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the + * caching requirements.

    Possible values are:

    **None** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * Standard storage. ReadOnly for Premium storage**. Possible values include: + * 'None', 'ReadOnly', 'ReadWrite' * - * @param {string} location The name of a supported Azure region. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @param {string} publisherName A valid image publisher. + * @param {string} parameters.storageProfile.osDisk.createOption Specifies how + * the virtual machine 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' * - * @param {string} offer A valid image publisher offer. + * @param {number} [parameters.storageProfile.osDisk.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.

    This + * value cannot be larger than 1023 GB * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {array} [parameters.storageProfile.dataDisks] Specifies the + * parameters that are used to add a data disk to a virtual machine.

    + * 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). * - * {Promise} A promise is returned. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @resolve {Array} - The deserialized result object. + * @param {string} [parameters.osProfile.computerName] Specifies the host OS + * name of the virtual machine.

    **Max-length (Windows):** 15 + * characters

    **Max-length (Linux):** 64 characters.

    For + * naming conventions and restrictions see [Azure infrastructure services + * implementation + * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.osProfile.adminUsername] Specifies the name of + * the administrator account.

    **Windows-only restriction:** Cannot end + * in "."

    **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + * "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length + * (Linux):** 1 character

    **Max-length (Linux):** 64 characters + *

    **Max-length (Windows):** 20 characters

  • For root + * access to the Linux VM, see [Using root privileges on Linux virtual machines + * in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * For a list of built-in system users on Linux that should not be used in this + * field, see [Selecting User Names for Linux on + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.osProfile.adminPassword] Specifies the password + * of the administrator account.

    **Minimum-length (Windows):** 8 + * characters

    **Minimum-length (Linux):** 6 characters

    + * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 + * characters

    **Complexity requirements:** 3 out of 4 conditions below + * need to be fulfilled
    Has lower characters
    Has upper characters
    + * Has a digit
    Has a special character (Regex match [\W_])

    + * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!"

    For resetting the password, see [How to reset the + * Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.osProfile.customData] Specifies a base-64 + * encoded string of custom data. The base-64 encoded string is decoded to a + * binary array that is saved as a file on the Virtual Machine. The maximum + * length of the binary array is 65535 bytes.

    For using cloud-init for + * your VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * {Array} [result] - The deserialized result object if an error did not occur. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

    When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listSkus(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSkus(location: string, publisherName: string, offer: string, callback: ServiceCallback): void; - listSkus(location: string, publisherName: string, offer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * UsageOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface UsageOperations { - - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @param {string} location The location for which resource usage is queried. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {object} [options] Optional Parameters. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @returns {Promise} A promise is returned + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {string} location The location for which resource usage is queried. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * {Promise} A promise is returned. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @resolve {ListUsagesResult} - The deserialized result object. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListUsagesResult} for more information. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, callback: ServiceCallback): void; - list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * - * @returns {Promise} A promise is returned + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} [parameters.zones] The virtual machine zones. * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @param {string} parameters.location Resource location * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -7104,7 +7035,7 @@ export interface UsageOperations { * * {Promise} A promise is returned. * - * @resolve {ListUsagesResult} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7112,133 +7043,191 @@ export interface UsageOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListUsagesResult} for more information. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * VirtualMachineSizes - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface VirtualMachineSizes { - + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * Lists all available virtual machine sizes for a subscription in a location. - * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all available virtual machine sizes for a subscription in a location. - * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. + * The operation to update a virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} vmName The name of the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.plan] Specifies information about the + * marketplace image used to create the virtual machine. This element is only + * used for marketplace images. Before you can use a marketplace image from an + * API, you must enable the image for programmatic use. In the Azure portal, + * find the marketplace image that you want to use and then click **Want to + * deploy programmatically, Get Started ->**. Enter any required information + * and then click **Save**. * - * {Promise} A promise is returned. + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more - * information. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    The available VM sizes depend on region and availability set. For a + * list of available sizes use these APIs:

    [List all available + * virtual machine sizes in an availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', + * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', + * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', + * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, callback: ServiceCallback): void; - list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Images - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface Images { - - - /** - * Create or update an image. + * @param {object} [parameters.storageProfile.imageReference] Specifies + * information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element + * is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {string} imageName The name of the image. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @param {object} parameters Parameters supplied to the Create Image - * operation. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {string} [parameters.storageProfile.imageReference.version] Specifies + * the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values + * are:

    **Windows**

    **Linux**. Possible values include: + * 'Windows', 'Linux' * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. + * + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. + * + * @param {object} [parameters.storageProfile.osDisk.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. + * + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the * caching requirements.

    Possible values are:

    **None** @@ -7246,15 +7235,36 @@ export interface Images { * Standard storage. ReadOnly for Premium storage**. Possible values include: * 'None', 'ReadOnly', 'ReadWrite' * + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param {string} parameters.storageProfile.osDisk.createOption Specifies how + * the virtual machine 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' + * * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * 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.

    This + * value cannot be larger than 1023 GB * - * @param {string} [parameters.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' + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. + * + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

    @@ -7262,94 +7272,180 @@ export interface Images { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {string} parameters.location Resource location + * @param {string} [parameters.osProfile.computerName] Specifies the host OS + * name of the virtual machine.

    **Max-length (Windows):** 15 + * characters

    **Max-length (Linux):** 64 characters.

    For + * naming conventions and restrictions see [Azure infrastructure services + * implementation + * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @param {object} [parameters.tags] Resource tags + * @param {string} [parameters.osProfile.adminUsername] Specifies the name of + * the administrator account.

    **Windows-only restriction:** Cannot end + * in "."

    **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + * "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length + * (Linux):** 1 character

    **Max-length (Linux):** 64 characters + *

    **Max-length (Windows):** 20 characters

  • For root + * access to the Linux VM, see [Using root privileges on Linux virtual machines + * in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * For a list of built-in system users on Linux that should not be used in this + * field, see [Selecting User Names for Linux on + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.adminPassword] Specifies the password + * of the administrator account.

    **Minimum-length (Windows):** 8 + * characters

    **Minimum-length (Linux):** 6 characters

    + * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 + * characters

    **Complexity requirements:** 3 out of 4 conditions below + * need to be fulfilled
    Has lower characters
    Has upper characters
    + * Has a digit
    Has a special character (Regex match [\W_])

    + * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!"

    For resetting the password, see [How to reset the + * Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.osProfile.customData] Specifies a base-64 + * encoded string of custom data. The base-64 encoded string is decoded to a + * binary array that is saved as a file on the Virtual Machine. The maximum + * length of the binary array is 65535 bytes.

    For using cloud-init for + * your VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @returns {Promise} A promise is returned + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

    When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update an image. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {string} imageName The name of the image. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @param {object} parameters Parameters supplied to the Create Image - * operation. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. + * + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. + * + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. + * + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. + * + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {string} [parameters.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' + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @param {string} parameters.location Resource location + * @param {array} [parameters.zones] The virtual machine zones. * * @param {object} [parameters.tags] Resource tags * @@ -7358,72 +7454,187 @@ export interface Images { * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @returns {Promise} A promise is returned * - * {Promise} A promise is returned. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @resolve {Image} - The deserialized result object. + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to update a virtual machine. * - * @reject {Error|ServiceError} - The error object. + * @param {string} resourceGroupName The name of the resource group. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} vmName The name of the virtual machine. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * @param {object} [parameters.plan] Specifies information about the + * marketplace image used to create the virtual machine. This element is only + * used for marketplace images. Before you can use a marketplace image from an + * API, you must enable the image for programmatic use. In the Azure portal, + * find the marketplace image that you want to use and then click **Want to + * deploy programmatically, Get Started ->**. Enter any required information + * and then click **Save**. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.plan.name] The plan ID. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Update an image. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {string} imageName The name of the image. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    The available VM sizes depend on region and availability set. For a + * list of available sizes use these APIs:

    [List all available + * virtual machine sizes in an availability + * set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', + * 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + * 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', + * 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', + * 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', + * 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', + * 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', + * 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + * 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + * 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', + * 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', + * 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + * 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + * 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', + * 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', + * 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', + * 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', + * 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', + * 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', + * 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', + * 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', + * 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', + * 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + * 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + * 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + * 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + * 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + * 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + * 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + * 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', + * 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', + * 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', + * 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', + * 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', + * 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', + * 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', + * 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', + * 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', + * 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', + * 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', + * 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', + * 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', + * 'Standard_NV12', 'Standard_NV24' * * @param {object} [parameters.storageProfile] Specifies the storage settings * for the virtual machine disks. * + * @param {object} [parameters.storageProfile.imageReference] Specifies + * information about the image to use. You can specify information about + * platform images, marketplace images, or virtual machine images. This element + * is required when you want to use a platform image, marketplace image, or + * virtual machine image, but is not used in other creation operations. + * + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. + * + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. + * + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. + * + * @param {string} [parameters.storageProfile.imageReference.version] Specifies + * the version of the platform image or marketplace image used to create the + * virtual machine. The allowed formats are Major.Minor.Build or 'latest'. + * Major, Minor, and Build are decimal numbers. Specify 'latest' to use the + * latest version of an image available at deploy time. Even if you use + * 'latest', the VM image will not automatically update after deploy time even + * if a new version becomes available. + * + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @param {string} [parameters.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 user-image or a specialized VHD.

    Possible values + * are:

    **Windows**

    **Linux**. Possible values include: + * 'Windows', 'Linux' * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. + * + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. + * + * @param {object} [parameters.storageProfile.osDisk.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. + * + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the * caching requirements.

    Possible values are:

    **None** @@ -7431,15 +7642,36 @@ export interface Images { * Standard storage. ReadOnly for Premium storage**. Possible values include: * 'None', 'ReadOnly', 'ReadWrite' * + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param {string} parameters.storageProfile.osDisk.createOption Specifies how + * the virtual machine 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' + * * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * 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.

    This + * value cannot be larger than 1023 GB * - * @param {string} [parameters.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' + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. + * + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

    @@ -7447,90 +7679,180 @@ export interface Images { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {object} [parameters.tags] Resource tags + * @param {string} [parameters.osProfile.computerName] Specifies the host OS + * name of the virtual machine.

    **Max-length (Windows):** 15 + * characters

    **Max-length (Linux):** 64 characters.

    For + * naming conventions and restrictions see [Azure infrastructure services + * implementation + * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.adminUsername] Specifies the name of + * the administrator account.

    **Windows-only restriction:** Cannot end + * in "."

    **Disallowed values:** "administrator", "admin", "user", + * "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", + * "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", + * "john", "owner", "root", "server", "sql", "support", "support_388945a0", + * "sys", "test2", "test3", "user4", "user5".

    **Minimum-length + * (Linux):** 1 character

    **Max-length (Linux):** 64 characters + *

    **Max-length (Windows):** 20 characters

  • For root + * access to the Linux VM, see [Using root privileges on Linux virtual machines + * in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * For a list of built-in system users on Linux that should not be used in this + * field, see [Selecting User Names for Linux on + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.osProfile.adminPassword] Specifies the password + * of the administrator account.

    **Minimum-length (Windows):** 8 + * characters

    **Minimum-length (Linux):** 6 characters

    + * **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 + * characters

    **Complexity requirements:** 3 out of 4 conditions below + * need to be fulfilled
    Has lower characters
    Has upper characters
    + * Has a digit
    Has a special character (Regex match [\W_])

    + * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + * "iloveyou!"

    For resetting the password, see [How to reset the + * Remote Desktop service or its login password in a Windows + * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @returns {Promise} A promise is returned + * @param {string} [parameters.osProfile.customData] Specifies a base-64 + * encoded string of custom data. The base-64 encoded string is decoded to a + * binary array that is saved as a file on the Virtual Machine. The maximum + * length of the binary array is 65535 bytes.

    For using cloud-init for + * your VM, see [Using cloud-init to customize a Linux VM during + * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - updateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Update an image. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] Indicates + * whether virtual machine agent should be provisioned on the virtual machine. + *

    When this property is not specified in the request body, default + * behavior is to set it to true. This will ensure that VM Agent is installed + * on the VM so that extensions can be added to the VM later. * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @param {string} imageName The name of the image. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {string} [parameters.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' + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    For Linux Virtual Machines, + * you can easily view the output of your console log.

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. + * + * @param {object} [parameters.availabilitySet] Specifies information about the + * availability set that the virtual machine should be assigned to. Virtual + * machines specified in the same availability set are allocated to different + * nodes to maximize availability. For more information about availability + * sets, see [Manage the availability of virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. + * + * @param {string} [parameters.availabilitySet.id] Resource Id + * + * @param {string} [parameters.licenseType] Specifies that the image or disk + * that is being used was licensed on-premises. This element is only used for + * images that contain the Windows Server operating system.

    Possible + * values are:

    Windows_Client

    Windows_Server

    If this + * element is included in a request for an update, the value must match the + * initial value. This value cannot be updated.

    For more information, + * see [Azure Hybrid Use Benefit for Windows + * Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 + * + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. + * + * @param {string} [parameters.identity.type] The type of identity used for the + * virtual machine. The type 'SystemAssigned, UserAssigned' includes both an + * implicitly created identity and a set of user assigned identities. The type + * 'None' will remove any identities from the virtual machine. Possible values + * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' + * + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param {array} [parameters.zones] The virtual machine zones. * * @param {object} [parameters.tags] Resource tags * @@ -7546,7 +7868,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7554,24 +7876,24 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes an Image. + * The operation to delete a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7580,18 +7902,18 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes an Image. + * The operation to delete a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7605,7 +7927,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7613,54 +7935,48 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets an image. + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets an image. + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7671,7 +7987,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7679,23 +7995,25 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, imageName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the list of images under a resource group. + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} vmName The name of the virtual machine. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7703,17 +8021,20 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the list of images under a resource group. + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} vmName The name of the virtual machine. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7726,7 +8047,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7734,22 +8055,25 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * The operation to power off (stop) a virtual machine. The virtual machine can + * be restarted with the same provisioned resources. You are still charged for + * this virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7758,16 +8082,20 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * The operation to power off (stop) a virtual machine. The virtual machine can + * be restarted with the same provisioned resources. You are still charged for + * this virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7781,7 +8109,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7789,87 +8117,23 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or update an image. + * The operation to restart a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' - * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB - * - * @param {string} [parameters.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' - * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7878,81 +8142,18 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or update an image. + * The operation to restart a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' - * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB - * - * @param {string} [parameters.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' - * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7966,7 +8167,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7974,85 +8175,81 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Update an image. + * The operation to start a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @returns {Promise} A promise is returned * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @reject {Error|ServiceError} - The error object. + */ + beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to start a virtual machine. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @resolve {null} - The deserialized result object. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.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' + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to redeploy a virtual machine. * - * @param {object} [parameters.tags] Resource tags + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -8061,79 +8258,76 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update an image. + * The operation to redeploy a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} parameters.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.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * {Promise} A promise is returned. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the - * caching requirements.

    Possible values are:

    **None** - *

    **ReadOnly**

    **ReadWrite**

    Default: **None for - * Standard storage. ReadOnly for Premium storage**. Possible values include: - * 'None', 'ReadOnly', 'ReadWrite' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} [parameters.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.

    This value cannot - * be larger than 1023 GB + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to perform maintenance on a virtual machine. * - * @param {string} [parameters.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' + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [parameters.storageProfile.dataDisks] Specifies the - * parameters that are used to add a data disk to a virtual machine.

    - * 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). + * @param {string} vmName The name of the virtual machine. * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.tags] Resource tags + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to perform maintenance on a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -8147,7 +8341,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8155,24 +8349,33 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes an Image. + * Run command on the VM. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. * * @param {object} [options] Optional Parameters. * @@ -8181,18 +8384,28 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes an Image. + * Run command on the VM. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. * * @param {object} [options] Optional Parameters. * @@ -8206,7 +8419,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {RunCommandResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8214,21 +8427,21 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the list of images under a resource group. + * Lists all of the virtual machines in the specified resource group. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8240,14 +8453,15 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the list of images under a resource group. + * Lists all of the virtual machines in the specified resource group. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8264,7 +8478,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8272,22 +8486,22 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * Lists all of the virtual machines in the specified subscription. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8299,16 +8513,15 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * Lists all of the virtual machines in the specified subscription. Use the + * nextLink property in the response to get the next page of virtual machines. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8325,7 +8538,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8333,16 +8546,17 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -8440,6 +8654,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -8546,6 +8767,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -8617,6 +8845,12 @@ export interface VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -8644,8 +8878,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -8716,6 +8950,11 @@ export interface VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -8738,10 +8977,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -8848,6 +9087,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -8954,6 +9200,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -9025,6 +9278,12 @@ export interface VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -9052,8 +9311,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9124,6 +9383,11 @@ export interface VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -9146,10 +9410,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -9271,6 +9535,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -9329,6 +9600,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -9377,6 +9655,12 @@ export interface VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -9398,8 +9682,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -9457,10 +9741,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -9558,6 +9842,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -9616,6 +9907,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -9664,6 +9962,12 @@ export interface VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -9685,8 +9989,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -9744,10 +10048,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -9798,11 +10102,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VM scale set. @@ -9823,7 +10127,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9831,17 +10135,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9925,11 +10227,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates specific virtual machines in a VM scale set. Shuts down the @@ -9957,7 +10259,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9965,17 +10267,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -9994,11 +10294,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes virtual machines in a VM scale set. @@ -10021,7 +10321,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10029,17 +10329,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + deleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10278,6 +10576,66 @@ export interface VirtualMachineScaleSets { listSkus(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getOSUpgradeHistoryWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachineScaleSetListOSUpgradeHistory} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachineScaleSetListOSUpgradeHistory} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that * resources are still attached and you are getting charged for the resources. @@ -10299,11 +10657,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) one or more virtual machines in a VM scale set. Note that @@ -10331,7 +10689,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10339,17 +10697,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10371,11 +10727,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts one or more virtual machines in a VM scale set. @@ -10401,7 +10757,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10409,17 +10765,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10441,11 +10795,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts one or more virtual machines in a VM scale set. @@ -10471,7 +10825,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10479,17 +10833,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10511,11 +10863,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploy one or more virtual machines in a VM scale set. @@ -10541,7 +10893,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10549,21 +10901,22 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -10581,14 +10934,17 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -10611,7 +10967,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10619,17 +10975,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10649,11 +11003,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale @@ -10677,7 +11031,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10685,17 +11039,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + updateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10718,11 +11070,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) one or more virtual machines in a VM @@ -10749,7 +11101,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10757,17 +11109,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - reimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - reimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + reimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10790,11 +11140,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages all the disks ( including data disks ) in the virtual machines in a @@ -10821,7 +11171,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10829,17 +11179,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - reimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - reimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + reimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -10995,6 +11343,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -11101,6 +11456,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -11172,6 +11534,12 @@ export interface VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -11199,8 +11567,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -11271,6 +11639,11 @@ export interface VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -11293,10 +11666,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -11403,6 +11776,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -11509,6 +11889,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -11580,6 +11967,12 @@ export interface VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -11607,8 +12000,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -11679,6 +12072,11 @@ export interface VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -11701,10 +12099,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -11826,6 +12224,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -11884,6 +12289,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -11932,6 +12344,12 @@ export interface VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -11953,8 +12371,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -12012,10 +12430,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -12113,6 +12531,13 @@ export interface VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -12171,6 +12596,13 @@ export interface VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -12219,6 +12651,12 @@ export interface VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -12240,8 +12678,8 @@ export interface VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -12299,10 +12737,10 @@ export interface VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -12353,11 +12791,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a VM scale set. @@ -12378,7 +12816,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12386,17 +12824,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12420,11 +12856,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates specific virtual machines in a VM scale set. Shuts down the @@ -12452,7 +12888,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12460,17 +12896,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12489,11 +12923,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes virtual machines in a VM scale set. @@ -12516,7 +12950,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12524,17 +12958,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12558,11 +12990,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) one or more virtual machines in a VM scale set. Note that @@ -12590,7 +13022,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12598,17 +13030,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12630,11 +13060,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts one or more virtual machines in a VM scale set. @@ -12660,7 +13090,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12668,17 +13098,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12700,11 +13128,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts one or more virtual machines in a VM scale set. @@ -12730,7 +13158,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12738,17 +13166,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12770,11 +13196,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploy one or more virtual machines in a VM scale set. @@ -12800,7 +13226,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12808,21 +13234,22 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -12840,14 +13267,17 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -12870,7 +13300,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12878,17 +13308,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12908,11 +13336,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateInstancesWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale @@ -12936,7 +13364,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12944,17 +13372,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; - beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], callback: ServiceCallback): void; + beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, instanceIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12977,11 +13403,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) one or more virtual machines in a VM @@ -13008,7 +13434,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13016,17 +13442,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginReimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13049,11 +13473,11 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages all the disks ( including data disks ) in the virtual machines in a @@ -13080,7 +13504,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13088,17 +13512,15 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options: { instanceIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13210,22 +13632,81 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineScaleSetListWithLinkResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineScaleSetListWithLinkResult} - * for more information. + * {VirtualMachineScaleSetListWithLinkResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListWithLinkResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of SKUs available for your VM scale set, including the minimum + * and maximum VM instances allowed for each SKU. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listSkusNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of SKUs available for your VM scale set, including the minimum + * and maximum VM instances allowed for each SKU. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachineScaleSetListSkusResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachineScaleSetListSkusResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListSkusResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listSkusNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSkusNext(nextPageLink: string, callback: ServiceCallback): void; + listSkusNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of SKUs available for your VM scale set, including the minimum - * and maximum VM instances allowed for each SKU. + * Gets list of OS upgrades on a VM scale set instance. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -13237,15 +13718,14 @@ export interface VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listSkusNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getOSUpgradeHistoryNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of SKUs available for your VM scale set, including the minimum - * and maximum VM instances allowed for each SKU. + * Gets list of OS upgrades on a VM scale set instance. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -13262,7 +13742,7 @@ export interface VirtualMachineScaleSets { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineScaleSetListSkusResult} - The deserialized result object. + * @resolve {VirtualMachineScaleSetListOSUpgradeHistory} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13270,17 +13750,17 @@ export interface VirtualMachineScaleSets { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineScaleSetListSkusResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineScaleSetListSkusResult} for - * more information. + * {VirtualMachineScaleSetListOSUpgradeHistory} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listSkusNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSkusNext(nextPageLink: string, callback: ServiceCallback): void; - listSkusNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getOSUpgradeHistoryNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getOSUpgradeHistoryNext(nextPageLink: string, callback: ServiceCallback): void; + getOSUpgradeHistoryNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -13435,11 +13915,11 @@ export interface VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -13463,7 +13943,7 @@ export interface VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13471,17 +13951,15 @@ export interface VirtualMachineScaleSetExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13761,11 +14239,11 @@ export interface VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * The operation to delete the extension. @@ -13789,7 +14267,7 @@ export interface VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13797,17 +14275,15 @@ export interface VirtualMachineScaleSetExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, vmssExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13891,11 +14367,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - cancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Cancels the current virtual machine scale set rolling upgrade. @@ -13916,7 +14392,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13924,17 +14400,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - cancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + cancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13953,11 +14427,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a rolling upgrade to move all virtual machine scale set instances to @@ -13980,7 +14454,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13988,17 +14462,77 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + startExtensionUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - startOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + startExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + startExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + startExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14075,11 +14609,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCancelWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Cancels the current virtual machine scale set rolling upgrade. @@ -14100,7 +14634,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14108,17 +14642,15 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginCancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCancel(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCancel(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginCancel(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14137,11 +14669,11 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartOSUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a rolling upgrade to move all virtual machine scale set instances to @@ -14164,7 +14696,7 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14172,17 +14704,77 @@ export interface VirtualMachineScaleSetRollingUpgrades { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginStartExtensionUpgradeWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; - beginStartOSUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, callback: ServiceCallback): void; + beginStartExtensionUpgrade(resourceGroupName: string, vmScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -14211,11 +14803,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) a specific virtual machine in a VM @@ -14239,7 +14831,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14247,17 +14839,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + reimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14277,11 +14867,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + reimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Allows you to re-image all the disks ( including data disks ) in the a VM @@ -14305,7 +14895,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14313,17 +14903,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + reimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14345,11 +14933,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates a specific virtual machine in a VM scale set. Shuts down the @@ -14375,7 +14963,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14383,17 +14971,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -14586,8 +15172,8 @@ export interface VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -14694,9 +15280,20 @@ export interface VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -14970,8 +15567,8 @@ export interface VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -15078,9 +15675,20 @@ export interface VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -15200,11 +15808,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual machine from a VM scale set. @@ -15227,7 +15835,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15235,17 +15843,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15389,35 +15995,103 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} [options.select] The list parameters. * - * @param {string} [options.expand] The expand expression to apply to the - * operation. + * @param {string} [options.expand] The expand expression to apply to the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of all virtual machines in a VM scale sets. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualMachineScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] The filter to apply to the operation. + * + * @param {string} [options.select] The list parameters. + * + * @param {string} [options.expand] The expand expression to apply to the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachineScaleSetVMListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachineScaleSetVMListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetVMListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, virtualMachineScaleSetName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, virtualMachineScaleSetName: string, options: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources + * are still attached and you are getting charged for the resources. Instead, + * use deallocate to release resources and avoid charges. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of all virtual machines in a VM scale sets. + * Power off (stop) a virtual machine in a VM scale set. Note that resources + * are still attached and you are getting charged for the resources. Instead, + * use deallocate to release resources and avoid charges. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} virtualMachineScaleSetName The name of the VM scale set. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.filter] The filter to apply to the operation. + * @param {string} vmScaleSetName The name of the VM scale set. * - * @param {string} [options.select] The list parameters. + * @param {string} instanceId The instance ID of the virtual machine. * - * @param {string} [options.expand] The expand expression to apply to the - * operation. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -15429,7 +16103,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineScaleSetVMListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15437,23 +16111,19 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineScaleSetVMListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineScaleSetVMListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, virtualMachineScaleSetName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, virtualMachineScaleSetName: string, options: { filter? : string, select? : string, expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources - * are still attached and you are getting charged for the resources. Instead, - * use deallocate to release resources and avoid charges. + * Restarts a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15468,16 +16138,14 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Power off (stop) a virtual machine in a VM scale set. Note that resources - * are still attached and you are getting charged for the resources. Instead, - * use deallocate to release resources and avoid charges. + * Restarts a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15497,7 +16165,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15505,21 +16173,19 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Restarts a virtual machine in a VM scale set. + * Starts a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15534,14 +16200,14 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Restarts a virtual machine in a VM scale set. + * Starts a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15561,7 +16227,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15569,21 +16235,19 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Starts a virtual machine in a VM scale set. + * Redeploys a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15598,14 +16262,14 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Starts a virtual machine in a VM scale set. + * Redeploys a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15625,7 +16289,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15633,21 +16297,19 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Redeploys a virtual machine in a VM scale set. + * Performs maintenance on a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15662,14 +16324,14 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Redeploys a virtual machine in a VM scale set. + * Performs maintenance on a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15689,7 +16351,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15697,21 +16359,19 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Performs maintenance on a virtual machine in a VM scale set. + * Run command on a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15719,6 +16379,16 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} instanceId The instance ID of the virtual machine. * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15726,14 +16396,14 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + runCommandWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Performs maintenance on a virtual machine in a VM scale set. + * Run command on a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -15741,6 +16411,16 @@ export interface VirtualMachineScaleSetVMs { * * @param {string} instanceId The instance ID of the virtual machine. * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15753,7 +16433,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {RunCommandResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15761,17 +16441,16 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + runCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15791,11 +16470,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Reimages (upgrade the operating system) a specific virtual machine in a VM @@ -15819,7 +16498,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15827,17 +16506,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginReimage(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15857,11 +16534,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginReimageAllWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Allows you to re-image all the disks ( including data disks ) in the a VM @@ -15885,7 +16562,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15893,17 +16570,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginReimageAll(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -15925,11 +16600,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deallocates a specific virtual machine in a VM scale set. Shuts down the @@ -15955,7 +16630,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -15963,17 +16638,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16166,8 +16839,8 @@ export interface VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -16274,9 +16947,20 @@ export interface VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -16550,8 +17234,8 @@ export interface VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -16658,9 +17342,20 @@ export interface VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -16780,11 +17475,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a virtual machine from a VM scale set. @@ -16807,7 +17502,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16815,17 +17510,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16846,11 +17539,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Power off (stop) a virtual machine in a VM scale set. Note that resources @@ -16875,7 +17568,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16883,17 +17576,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16912,11 +17603,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Restarts a virtual machine in a VM scale set. @@ -16939,7 +17630,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16947,17 +17638,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -16976,11 +17665,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Starts a virtual machine in a VM scale set. @@ -17003,7 +17692,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17011,17 +17700,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17040,11 +17727,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Redeploys a virtual machine in a VM scale set. @@ -17067,7 +17754,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17075,17 +17762,15 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17104,11 +17789,11 @@ export interface VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Performs maintenance on a virtual machine in a VM scale set. @@ -17131,7 +17816,7 @@ export interface VirtualMachineScaleSetVMs { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17139,17 +17824,98 @@ export interface VirtualMachineScaleSetVMs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RunCommandResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, instanceId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmScaleSetName: string, instanceId: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -17949,7 +18715,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18052,7 +18818,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18215,7 +18981,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -18287,7 +19053,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -18403,11 +19169,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a disk. @@ -18431,7 +19197,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18439,17 +19205,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -18658,11 +19422,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - revokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + revokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a disk. @@ -18686,7 +19450,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18694,17 +19458,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - revokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - revokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - revokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + revokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -18723,7 +19485,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18826,7 +19588,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [disk.zones] The Logical zone list for Disk. * @@ -18989,7 +19751,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -19061,7 +19823,7 @@ export interface Disks { * @param {object} [disk.sku] * * @param {string} [disk.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {object} [options] Optional Parameters. * @@ -19112,11 +19874,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a disk. @@ -19140,7 +19902,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19148,17 +19910,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19261,11 +20021,11 @@ export interface Disks { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a disk. @@ -19289,7 +20049,7 @@ export interface Disks { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19297,17 +20057,15 @@ export interface Disks { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRevokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRevokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; - beginRevokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, diskName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRevokeAccess(resourceGroupName: string, diskName: string, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, diskName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -19713,7 +20471,7 @@ export interface Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -19785,7 +20543,7 @@ export interface Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -19901,11 +20659,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a snapshot. @@ -19929,7 +20687,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19937,17 +20695,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -20156,11 +20912,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - revokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + revokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a snapshot. @@ -20184,7 +20940,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20192,17 +20948,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - revokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - revokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - revokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + revokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + revokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -20485,7 +21239,7 @@ export interface Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -20557,7 +21311,7 @@ export interface Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -20608,11 +21362,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes a snapshot. @@ -20636,7 +21390,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20644,17 +21398,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -20757,11 +21509,11 @@ export interface Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRevokeAccessWithHttpOperationResponse(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Revokes access to a snapshot. @@ -20785,7 +21537,7 @@ export interface Snapshots { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20793,17 +21545,15 @@ export interface Snapshots { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRevokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; - beginRevokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, callback: ServiceCallback): void; + beginRevokeAccess(resourceGroupName: string, snapshotName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** diff --git a/lib/services/computeManagement2/lib/operations/index.js b/lib/services/computeManagement2/lib/operations/index.js index c6c01da729..26857f8e1c 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -18,11 +18,11 @@ exports.Operations = require('./operations'); exports.AvailabilitySets = require('./availabilitySets'); exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages'); exports.VirtualMachineExtensions = require('./virtualMachineExtensions'); -exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineImages = require('./virtualMachineImages'); exports.UsageOperations = require('./usageOperations'); exports.VirtualMachineSizes = require('./virtualMachineSizes'); exports.Images = require('./images'); +exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineScaleSets = require('./virtualMachineScaleSets'); exports.VirtualMachineScaleSetExtensions = require('./virtualMachineScaleSetExtensions'); exports.VirtualMachineScaleSetRollingUpgrades = require('./virtualMachineScaleSetRollingUpgrades'); diff --git a/lib/services/computeManagement2/lib/operations/logAnalytics.js b/lib/services/computeManagement2/lib/operations/logAnalytics.js index 8fa32eb27b..0b0902ca6b 100644 --- a/lib/services/computeManagement2/lib/operations/logAnalytics.js +++ b/lib/services/computeManagement2/lib/operations/logAnalytics.js @@ -273,7 +273,7 @@ function _beginExportRequestRateByInterval(parameters, location, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (parameters === null || parameters === undefined) { @@ -455,7 +455,7 @@ function _beginExportThrottledRequests(parameters, location, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/operations.js b/lib/services/computeManagement2/lib/operations/operations.js index bdb52b2e71..9a2c765fa6 100644 --- a/lib/services/computeManagement2/lib/operations/operations.js +++ b/lib/services/computeManagement2/lib/operations/operations.js @@ -46,7 +46,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/snapshots.js b/lib/services/computeManagement2/lib/operations/snapshots.js index 0bc6378ffd..988a1eeefc 100644 --- a/lib/services/computeManagement2/lib/operations/snapshots.js +++ b/lib/services/computeManagement2/lib/operations/snapshots.js @@ -232,7 +232,7 @@ function _createOrUpdate(resourceGroupName, snapshotName, snapshot, options, cal * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -472,9 +472,7 @@ function _get(resourceGroupName, snapshotName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -512,20 +510,6 @@ function _deleteMethod(resourceGroupName, snapshotName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -912,9 +896,7 @@ function _grantAccess(resourceGroupName, snapshotName, grantAccessData, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -952,20 +934,6 @@ function _revokeAccess(resourceGroupName, snapshotName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1288,7 +1256,7 @@ function _beginCreateOrUpdate(resourceGroupName, snapshotName, snapshot, options * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -1481,9 +1449,7 @@ function _beginUpdate(resourceGroupName, snapshotName, snapshot, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1585,23 +1551,6 @@ function _beginDeleteMethod(resourceGroupName, snapshotName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1800,9 +1749,7 @@ function _beginGrantAccess(resourceGroupName, snapshotName, grantAccessData, opt * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1904,23 +1851,6 @@ function _beginRevokeAccess(resourceGroupName, snapshotName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2512,7 +2442,7 @@ class Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -2596,7 +2526,7 @@ class Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -2754,7 +2684,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2794,7 +2724,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2802,9 +2732,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3117,7 +3045,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3157,7 +3085,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3165,9 +3093,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3500,7 +3426,7 @@ class Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -3584,7 +3510,7 @@ class Snapshots { * @param {object} [snapshot.sku] * * @param {string} [snapshot.sku.name] The sku name. Possible values include: - * 'Standard_LRS', 'Premium_LRS' + * 'Standard_LRS', 'Premium_LRS', 'Standard_ZRS' * * @param {object} [options] Optional Parameters. * @@ -3650,7 +3576,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3690,7 +3616,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3698,9 +3624,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3853,7 +3777,7 @@ class Snapshots { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3893,7 +3817,7 @@ class Snapshots { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3901,9 +3825,7 @@ class Snapshots { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/usageOperations.js b/lib/services/computeManagement2/lib/operations/usageOperations.js index a6a356e1f3..a8f631b573 100644 --- a/lib/services/computeManagement2/lib/operations/usageOperations.js +++ b/lib/services/computeManagement2/lib/operations/usageOperations.js @@ -49,7 +49,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js b/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js index fc9e07d629..a5442edb98 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineExtensionImages.js @@ -54,7 +54,7 @@ function _get(location, publisherName, type, version, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -204,7 +204,7 @@ function _listTypes(location, publisherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -371,7 +371,7 @@ function _listVersions(location, publisherName, type, options, callback) { let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js index 669cd7f9c8..2cee4674d3 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js @@ -280,9 +280,7 @@ function _update(resourceGroupName, vmName, vmExtensionName, extensionParameters * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -320,20 +318,6 @@ function _deleteMethod(resourceGroupName, vmName, vmExtensionName, options, call if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -383,7 +367,7 @@ function _get(resourceGroupName, vmName, vmExtensionName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -501,6 +485,161 @@ function _get(resourceGroupName, vmName, vmExtensionName, options, callback) { }); } +/** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtensionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, vmName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2018-06-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmName === null || vmName === undefined || typeof vmName.valueOf() !== 'string') { + throw new Error('vmName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmName}', encodeURIComponent(vmName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineExtensionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * The operation to create or update the extension. * @@ -590,7 +729,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, extens if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -805,7 +944,7 @@ function _beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParam if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -955,9 +1094,7 @@ function _beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParam * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -973,7 +1110,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1063,23 +1200,6 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1097,6 +1217,7 @@ class VirtualMachineExtensions { this._update = _update; this._deleteMethod = _deleteMethod; this._get = _get; + this._list = _list; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginUpdate = _beginUpdate; this._beginDeleteMethod = _beginDeleteMethod; @@ -1465,7 +1586,7 @@ class VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1505,7 +1626,7 @@ class VirtualMachineExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1513,9 +1634,7 @@ class VirtualMachineExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1640,6 +1759,101 @@ class VirtualMachineExtensions { } } + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, vmName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, vmName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualMachineExtensionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtensionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, vmName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, vmName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, vmName, options, optionalCallback); + } + } + /** * The operation to create or update the extension. * @@ -2003,7 +2217,7 @@ class VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -2043,7 +2257,7 @@ class VirtualMachineExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2051,9 +2265,7 @@ class VirtualMachineExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineImages.js b/lib/services/computeManagement2/lib/operations/virtualMachineImages.js index 236d37b95f..6b97f9d98b 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineImages.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineImages.js @@ -55,7 +55,7 @@ function _get(location, publisherName, offer, skus, version, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -223,7 +223,7 @@ function _list(location, publisherName, offer, skus, options, callback) { let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; let orderby = (options && options.orderby !== undefined) ? options.orderby : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -406,7 +406,7 @@ function _listOffers(location, publisherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -561,7 +561,7 @@ function _listPublishers(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -716,7 +716,7 @@ function _listSkus(location, publisherName, offer, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js b/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js index b5a3b434bb..3cffb62876 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineRunCommands.js @@ -47,7 +47,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -192,7 +192,7 @@ function _get(location, commandId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js index 591b99d1ab..dcd830292f 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetExtensions.js @@ -148,9 +148,7 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, e * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -188,20 +186,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName, opt if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -251,7 +235,7 @@ function _get(resourceGroupName, vmScaleSetName, vmssExtensionName, options, cal throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -406,7 +390,7 @@ function _list(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -583,7 +567,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionNa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -750,9 +734,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionNa * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -768,7 +750,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -858,23 +840,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, vmssExtensionName // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1195,7 +1160,7 @@ class VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1235,7 +1200,7 @@ class VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1243,9 +1208,7 @@ class VirtualMachineScaleSetExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1629,7 +1592,7 @@ class VirtualMachineScaleSetExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1669,7 +1632,7 @@ class VirtualMachineScaleSetExtensions { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1677,9 +1640,7 @@ class VirtualMachineScaleSetExtensions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js index 920f0cb874..03a188d421 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetRollingUpgrades.js @@ -33,9 +33,7 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -73,20 +71,6 @@ function _cancel(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -114,9 +98,7 @@ function _cancel(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -154,20 +136,71 @@ function _startOSUpgrade(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _startExtensionUpgrade(resourceGroupName, vmScaleSetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response return callback(null, result, httpRequest, response); }); @@ -210,7 +243,7 @@ function _getLatest(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -336,9 +369,7 @@ function _getLatest(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -354,7 +385,7 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -440,23 +471,6 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -482,9 +496,7 @@ function _beginCancel(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -500,7 +512,7 @@ function _beginStartOSUpgrade(resourceGroupName, vmScaleSetName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -586,23 +598,133 @@ function _beginStartOSUpgrade(resourceGroupName, vmScaleSetName, options, callba // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmScaleSetName === null || vmScaleSetName === undefined || typeof vmScaleSetName.valueOf() !== 'string') { + throw new Error('vmScaleSetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmScaleSetName}', encodeURIComponent(vmScaleSetName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); } + return callback(error); } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; return callback(null, result, httpRequest, response); }); @@ -618,9 +740,11 @@ class VirtualMachineScaleSetRollingUpgrades { this.client = client; this._cancel = _cancel; this._startOSUpgrade = _startOSUpgrade; + this._startExtensionUpgrade = _startExtensionUpgrade; this._getLatest = _getLatest; this._beginCancel = _beginCancel; this._beginStartOSUpgrade = _beginStartOSUpgrade; + this._beginStartExtensionUpgrade = _beginStartExtensionUpgrade; } /** @@ -637,7 +761,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -674,7 +798,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -682,9 +806,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -726,7 +848,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -765,7 +887,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -773,9 +895,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -801,6 +921,95 @@ class VirtualMachineScaleSetRollingUpgrades { } } + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + startExtensionUpgradeWithHttpOperationResponse(resourceGroupName, vmScaleSetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._startExtensionUpgrade(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + startExtensionUpgrade(resourceGroupName, vmScaleSetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._startExtensionUpgrade(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._startExtensionUpgrade(resourceGroupName, vmScaleSetName, options, optionalCallback); + } + } + /** * Gets the status of the latest virtual machine scale set rolling upgrade. * @@ -902,7 +1111,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -939,7 +1148,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -947,9 +1156,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -991,7 +1198,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -1030,7 +1237,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1038,9 +1245,7 @@ class VirtualMachineScaleSetRollingUpgrades { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1066,6 +1271,95 @@ class VirtualMachineScaleSetRollingUpgrades { } } + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginStartExtensionUpgradeWithHttpOperationResponse(resourceGroupName, vmScaleSetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Starts a rolling upgrade to move all extensions for all virtual machine + * scale set instances to the latest available extension version. Instances + * which are already running the latest extension versions are not affected. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStartExtensionUpgrade(resourceGroupName, vmScaleSetName, options, optionalCallback); + } + } + } module.exports = VirtualMachineScaleSetRollingUpgrades; diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js index a86c085fe7..9e6498ad03 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSetVMs.js @@ -36,9 +36,7 @@ const WebResource = msRest.WebResource; * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -76,20 +74,6 @@ function _reimage(resourceGroupName, vmScaleSetName, instanceId, options, callba if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -118,9 +102,7 @@ function _reimage(resourceGroupName, vmScaleSetName, instanceId, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -158,20 +140,6 @@ function _reimageAll(resourceGroupName, vmScaleSetName, instanceId, options, cal if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -202,9 +170,7 @@ function _reimageAll(resourceGroupName, vmScaleSetName, instanceId, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -242,20 +208,6 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -453,8 +405,8 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -561,9 +513,20 @@ function _deallocate(resourceGroupName, vmScaleSetName, instanceId, options, cal * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -726,9 +689,7 @@ function _update(resourceGroupName, vmScaleSetName, instanceId, parameters, opti * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -766,20 +727,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, instanceId, options, c if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -824,7 +771,7 @@ function _get(resourceGroupName, vmScaleSetName, instanceId, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -974,7 +921,7 @@ function _getInstanceView(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1132,7 +1079,7 @@ function _list(resourceGroupName, virtualMachineScaleSetName, options, callback) let filter = (options && options.filter !== undefined) ? options.filter : undefined; let select = (options && options.select !== undefined) ? options.select : undefined; let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1281,9 +1228,7 @@ function _list(resourceGroupName, virtualMachineScaleSetName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1321,20 +1266,6 @@ function _powerOff(resourceGroupName, vmScaleSetName, instanceId, options, callb if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1362,9 +1293,7 @@ function _powerOff(resourceGroupName, vmScaleSetName, instanceId, options, callb * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1402,20 +1331,6 @@ function _restart(resourceGroupName, vmScaleSetName, instanceId, options, callba if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1443,9 +1358,7 @@ function _restart(resourceGroupName, vmScaleSetName, instanceId, options, callba * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1483,20 +1396,6 @@ function _start(resourceGroupName, vmScaleSetName, instanceId, options, callback if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1524,9 +1423,7 @@ function _start(resourceGroupName, vmScaleSetName, instanceId, options, callback * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1564,20 +1461,6 @@ function _redeploy(resourceGroupName, vmScaleSetName, instanceId, options, callb if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1605,9 +1488,7 @@ function _redeploy(resourceGroupName, vmScaleSetName, instanceId, options, callb * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1629,6 +1510,82 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, instanceId, opti this.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, options, (err, parsedResult, httpRequest, response) => { if (err) return callback(err); + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _runCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + let initialResult = new msRest.HttpOperationResponse(); initialResult.request = httpRequest; initialResult.response = response; @@ -1650,7 +1607,7 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, instanceId, opti parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); + let resultMapper = new client.models['RunCommandResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1686,9 +1643,7 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, instanceId, opti * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1704,7 +1659,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1794,23 +1749,6 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1837,9 +1775,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, instanceId, options, c * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1855,7 +1791,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1945,23 +1881,6 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1990,9 +1909,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, options * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2008,7 +1925,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2098,23 +2015,6 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2310,8 +2210,8 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -2418,9 +2318,20 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, options * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -2520,7 +2431,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, instanceId, parameters, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2686,9 +2597,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, instanceId, parameters, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2704,7 +2613,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2794,23 +2703,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2838,9 +2730,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, instanceId, optio * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2856,7 +2746,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2946,23 +2836,6 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -2988,9 +2861,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, options, * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3006,7 +2877,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3096,23 +2967,6 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3138,9 +2992,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, instanceId, options, c * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3156,7 +3008,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3246,23 +3098,6 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3288,9 +3123,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, instanceId, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3306,7 +3139,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3396,30 +3229,144 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Performs maintenance on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmScaleSetName === null || vmScaleSetName === undefined || typeof vmScaleSetName.valueOf() !== 'string') { + throw new Error('vmScaleSetName cannot be null or undefined and it must be of type string.'); + } + if (instanceId === null || instanceId === undefined || typeof instanceId.valueOf() !== 'string') { + throw new Error('instanceId cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmScaleSetName}', encodeURIComponent(vmScaleSetName)); + requestUrl = requestUrl.replace('{instanceId}', encodeURIComponent(instanceId)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); } + return callback(error); } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; return callback(null, result, httpRequest, response); }); } /** - * Performs maintenance on a virtual machine in a VM scale set. + * Run command on a virtual machine in a VM scale set. * * @param {string} resourceGroupName The name of the resource group. * @@ -3427,6 +3374,16 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, * * @param {string} instanceId The instance ID of the virtual machine. * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3439,14 +3396,13 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, options, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * See {@link RunCommandResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, options, callback) { +function _beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3456,7 +3412,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3468,6 +3424,9 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, if (instanceId === null || instanceId === undefined || typeof instanceId.valueOf() !== 'string') { throw new Error('instanceId cannot be null or undefined and it must be of type string.'); } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -3480,7 +3439,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{vmScaleSetName}', encodeURIComponent(vmScaleSetName)); requestUrl = requestUrl.replace('{instanceId}', encodeURIComponent(instanceId)); @@ -3511,7 +3470,21 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['RunCommandInput']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3553,7 +3526,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); + let resultMapper = new client.models['RunCommandResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3717,6 +3690,7 @@ class VirtualMachineScaleSetVMs { this._start = _start; this._redeploy = _redeploy; this._performMaintenance = _performMaintenance; + this._runCommand = _runCommand; this._beginReimage = _beginReimage; this._beginReimageAll = _beginReimageAll; this._beginDeallocate = _beginDeallocate; @@ -3727,6 +3701,7 @@ class VirtualMachineScaleSetVMs { this._beginStart = _beginStart; this._beginRedeploy = _beginRedeploy; this._beginPerformMaintenance = _beginPerformMaintenance; + this._beginRunCommand = _beginRunCommand; this._listNext = _listNext; } @@ -3747,7 +3722,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3787,7 +3762,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3795,9 +3770,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3840,7 +3813,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3880,7 +3853,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3888,9 +3861,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3935,7 +3906,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -3977,7 +3948,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3985,9 +3956,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4203,8 +4172,8 @@ class VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4311,9 +4280,20 @@ class VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -4599,8 +4579,8 @@ class VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -4707,9 +4687,20 @@ class VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -4844,7 +4835,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -4883,7 +4874,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4891,9 +4882,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5220,7 +5209,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5261,7 +5250,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5269,9 +5258,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5313,7 +5300,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5352,7 +5339,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5360,9 +5347,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5404,7 +5389,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5443,7 +5428,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5451,9 +5436,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5495,7 +5478,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5534,7 +5517,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5542,9 +5525,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5586,7 +5567,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5625,7 +5606,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5633,9 +5614,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5661,6 +5640,116 @@ class VirtualMachineScaleSetVMs { } } + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + runCommandWithHttpOperationResponse(resourceGroupName, vmScaleSetName, instanceId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._runCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RunCommandResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + runCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._runCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._runCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, optionalCallback); + } + } + /** * Reimages (upgrade the operating system) a specific virtual machine in a VM * scale set. @@ -5678,7 +5767,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5718,7 +5807,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5726,9 +5815,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5771,7 +5858,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5811,7 +5898,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5819,9 +5906,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5866,7 +5951,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -5908,7 +5993,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5916,9 +6001,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6134,8 +6217,8 @@ class VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6242,9 +6325,20 @@ class VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -6530,8 +6624,8 @@ class VirtualMachineScaleSetVMs { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6638,9 +6732,20 @@ class VirtualMachineScaleSetVMs { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -6775,7 +6880,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6814,7 +6919,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6822,9 +6927,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6868,7 +6971,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -6909,7 +7012,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6917,9 +7020,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -6961,7 +7062,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7000,7 +7101,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7008,9 +7109,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7052,7 +7151,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7091,7 +7190,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7099,9 +7198,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7143,7 +7240,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7182,7 +7279,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7190,9 +7287,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7234,7 +7329,7 @@ class VirtualMachineScaleSetVMs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7273,7 +7368,7 @@ class VirtualMachineScaleSetVMs { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7281,9 +7376,7 @@ class VirtualMachineScaleSetVMs { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7309,6 +7402,116 @@ class VirtualMachineScaleSetVMs { } } + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginRunCommandWithHttpOperationResponse(resourceGroupName, vmScaleSetName, instanceId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Run command on a virtual machine in a VM scale set. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {string} instanceId The instance ID of the virtual machine. + * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {RunCommandResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginRunCommand(resourceGroupName, vmScaleSetName, instanceId, parameters, options, optionalCallback); + } + } + /** * Gets a list of all virtual machines in a VM scale sets. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js index f47ba7554c..b873fc9ba0 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineScaleSets.js @@ -101,6 +101,13 @@ const WebResource = msRest.WebResource; * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -207,6 +214,13 @@ const WebResource = msRest.WebResource; * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -278,6 +292,12 @@ const WebResource = msRest.WebResource; * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -305,8 +325,8 @@ const WebResource = msRest.WebResource; * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -377,6 +397,11 @@ const WebResource = msRest.WebResource; * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -399,10 +424,10 @@ const WebResource = msRest.WebResource; * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -563,6 +588,13 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -621,6 +653,13 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -669,6 +708,12 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -690,8 +735,8 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -749,10 +794,10 @@ function _createOrUpdate(resourceGroupName, vmScaleSetName, parameters, options, * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -846,9 +891,7 @@ function _update(resourceGroupName, vmScaleSetName, parameters, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -886,20 +929,6 @@ function _deleteMethod(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -942,7 +971,7 @@ function _get(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1076,9 +1105,7 @@ function _get(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1116,20 +1143,6 @@ function _deallocate(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1157,9 +1170,7 @@ function _deallocate(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1197,20 +1208,6 @@ function _deleteInstances(resourceGroupName, vmScaleSetName, instanceIds, option if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1253,7 +1250,7 @@ function _getInstanceView(resourceGroupName, vmScaleSetName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1395,7 +1392,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1534,7 +1531,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1671,7 +1668,7 @@ function _listSkus(resourceGroupName, vmScaleSetName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1779,6 +1776,150 @@ function _listSkus(resourceGroupName, vmScaleSetName, options, callback) { }); } +/** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-06-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmScaleSetName === null || vmScaleSetName === undefined || typeof vmScaleSetName.valueOf() !== 'string') { + throw new Error('vmScaleSetName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmScaleSetName}', encodeURIComponent(vmScaleSetName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineScaleSetListOSUpgradeHistory']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that @@ -1805,9 +1946,7 @@ function _listSkus(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1845,20 +1984,6 @@ function _powerOff(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1889,9 +2014,7 @@ function _powerOff(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1929,20 +2052,6 @@ function _restart(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1973,9 +2082,7 @@ function _restart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2013,20 +2120,6 @@ function _start(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2057,9 +2150,7 @@ function _start(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2097,20 +2188,6 @@ function _redeploy(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2120,6 +2197,9 @@ function _redeploy(resourceGroupName, vmScaleSetName, options, callback) { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -2141,9 +2221,7 @@ function _redeploy(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2181,20 +2259,6 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, options, callbac if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2223,9 +2287,7 @@ function _performMaintenance(resourceGroupName, vmScaleSetName, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2263,20 +2325,6 @@ function _updateInstances(resourceGroupName, vmScaleSetName, instanceIds, option if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2308,9 +2356,7 @@ function _updateInstances(resourceGroupName, vmScaleSetName, instanceIds, option * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2348,20 +2394,6 @@ function _reimage(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2393,9 +2425,7 @@ function _reimage(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2433,20 +2463,6 @@ function _reimageAll(resourceGroupName, vmScaleSetName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2492,7 +2508,7 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2690,6 +2706,13 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -2796,6 +2819,13 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -2867,6 +2897,12 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -2894,8 +2930,8 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -2966,6 +3002,11 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -2988,10 +3029,10 @@ function _forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -3028,7 +3069,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3251,6 +3292,13 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -3309,6 +3357,13 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -3357,6 +3412,12 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -3378,8 +3439,8 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -3437,10 +3498,10 @@ function _beginCreateOrUpdate(resourceGroupName, vmScaleSetName, parameters, opt * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -3473,7 +3534,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3616,9 +3677,7 @@ function _beginUpdate(resourceGroupName, vmScaleSetName, parameters, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3634,7 +3693,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3720,23 +3779,6 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3767,9 +3809,7 @@ function _beginDeleteMethod(resourceGroupName, vmScaleSetName, options, callback * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3786,7 +3826,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3898,23 +3938,6 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -3940,9 +3963,7 @@ function _beginDeallocate(resourceGroupName, vmScaleSetName, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -3958,7 +3979,7 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4071,23 +4092,6 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4118,9 +4122,7 @@ function _beginDeleteInstances(resourceGroupName, vmScaleSetName, instanceIds, o * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4137,7 +4139,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4249,23 +4251,6 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4294,9 +4279,7 @@ function _beginPowerOff(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4313,7 +4296,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4425,23 +4408,6 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4470,9 +4436,7 @@ function _beginRestart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4489,7 +4453,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4589,35 +4553,18 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); } + return callback(error); } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; return callback(null, result, httpRequest, response); }); @@ -4646,9 +4593,7 @@ function _beginStart(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4665,7 +4610,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4777,23 +4722,6 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4801,6 +4729,9 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -4822,9 +4753,7 @@ function _beginRedeploy(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4841,7 +4770,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4953,23 +4882,6 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4996,9 +4908,7 @@ function _beginPerformMaintenance(resourceGroupName, vmScaleSetName, options, ca * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5014,7 +4924,7 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5127,23 +5037,6 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5173,9 +5066,7 @@ function _beginUpdateInstances(resourceGroupName, vmScaleSetName, instanceIds, o * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5192,7 +5083,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5304,23 +5195,6 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5350,9 +5224,7 @@ function _beginReimage(resourceGroupName, vmScaleSetName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5369,7 +5241,7 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, options, callback) throw new Error('callback cannot be null.'); } let instanceIds = (options && options.instanceIds !== undefined) ? options.instanceIds : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5481,23 +5353,6 @@ function _beginReimageAll(resourceGroupName, vmScaleSetName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5891,6 +5746,134 @@ function _listSkusNext(nextPageLink, options, callback) { }); } +/** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getOSUpgradeHistoryNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineScaleSetListOSUpgradeHistory']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a VirtualMachineScaleSets. */ class VirtualMachineScaleSets { /** @@ -5909,6 +5892,7 @@ class VirtualMachineScaleSets { this._list = _list; this._listAll = _listAll; this._listSkus = _listSkus; + this._getOSUpgradeHistory = _getOSUpgradeHistory; this._powerOff = _powerOff; this._restart = _restart; this._start = _start; @@ -5934,6 +5918,7 @@ class VirtualMachineScaleSets { this._listNext = _listNext; this._listAllNext = _listAllNext; this._listSkusNext = _listSkusNext; + this._getOSUpgradeHistoryNext = _getOSUpgradeHistoryNext; } /** @@ -6022,6 +6007,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -6128,6 +6120,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -6199,6 +6198,12 @@ class VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -6226,8 +6231,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -6298,6 +6303,11 @@ class VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -6320,10 +6330,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -6442,6 +6452,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -6548,6 +6565,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -6619,6 +6643,12 @@ class VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -6646,8 +6676,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -6718,6 +6748,11 @@ class VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -6740,10 +6775,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -6880,6 +6915,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -6938,6 +6980,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -6986,6 +7035,12 @@ class VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -7007,8 +7062,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -7066,10 +7121,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -7179,6 +7234,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -7237,6 +7299,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -7285,6 +7354,12 @@ class VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -7306,8 +7381,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -7365,10 +7440,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -7434,7 +7509,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7471,7 +7546,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7479,9 +7554,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7615,7 +7688,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7659,7 +7732,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7667,9 +7740,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7711,7 +7782,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7750,7 +7821,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7758,9 +7829,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8130,6 +8199,93 @@ class VirtualMachineScaleSets { } } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getOSUpgradeHistoryWithHttpOperationResponse(resourceGroupName, vmScaleSetName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmScaleSetName The name of the VM scale set. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualMachineScaleSetListOSUpgradeHistory} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getOSUpgradeHistory(resourceGroupName, vmScaleSetName, options, optionalCallback); + } + } + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that * resources are still attached and you are getting charged for the resources. @@ -8151,7 +8307,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8195,7 +8351,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8203,9 +8359,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8250,7 +8404,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8292,7 +8446,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8300,9 +8454,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8347,7 +8499,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8389,7 +8541,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8397,9 +8549,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8444,7 +8594,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8486,7 +8636,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8494,9 +8644,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8524,6 +8672,9 @@ class VirtualMachineScaleSets { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -8541,7 +8692,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8561,6 +8712,9 @@ class VirtualMachineScaleSets { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -8583,7 +8737,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8591,9 +8745,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8636,7 +8788,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8676,7 +8828,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8684,9 +8836,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8732,7 +8882,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8775,7 +8925,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8783,9 +8933,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8831,7 +8979,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8874,7 +9022,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8882,9 +9030,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9090,6 +9236,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -9196,6 +9349,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -9267,6 +9427,12 @@ class VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -9294,8 +9460,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9366,6 +9532,11 @@ class VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -9388,10 +9559,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -9510,6 +9681,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -9616,6 +9794,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] * Specifies set of certificates that should be installed onto the virtual * machines in the scale set. @@ -9687,6 +9872,12 @@ class VirtualMachineScaleSets { * plan element previously described. Possible values include: 'FromImage', * 'Empty', 'Attach' * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.osType] This * property allows you to specify the type of the OS that is included in the @@ -9714,8 +9905,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * Specifies the parameters that are used to add data disks to the virtual @@ -9786,6 +9977,11 @@ class VirtualMachineScaleSets { * priority for the virtual machines in the scale set.

    Minimum * api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low' * + * @param {string} [parameters.virtualMachineProfile.evictionPolicy] Specifies + * the eviction policy for virtual machines in a low priority scale set. + *

    Minimum api-version: 2017-10-30-preview. Possible values include: + * 'Deallocate', 'Delete' + * * @param {boolean} [parameters.overprovision] Specifies whether the Virtual * Machine Scale Set should be overprovisioned. * @@ -9808,10 +10004,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine scale set zones. * @@ -9948,6 +10144,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -10006,6 +10209,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -10054,6 +10264,12 @@ class VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -10075,8 +10291,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -10134,10 +10350,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -10247,6 +10463,13 @@ class VirtualMachineScaleSets { * upgrades should automatically be applied to scale set instances in a rolling * fashion when a newer version of the image becomes available. * + * @param {object} [parameters.upgradePolicy.autoOSUpgradePolicy] Configuration + * parameters used for performing automatic OS Upgrade. + * + * @param {boolean} + * [parameters.upgradePolicy.autoOSUpgradePolicy.disableAutoRollback] Whether + * OS image rollback feature should be disabled. Default value is false. + * * @param {object} [parameters.virtualMachineProfile] The virtual machine * profile. * @@ -10305,6 +10528,13 @@ class VirtualMachineScaleSets { * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] * The list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} + * [parameters.virtualMachineProfile.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.virtualMachineProfile.osProfile.secrets] The List * of certificates for addition to the VM. * @@ -10353,6 +10583,12 @@ class VirtualMachineScaleSets { * Specifies whether writeAccelerator should be enabled or disabled on the * disk. * + * @param {number} + * [parameters.virtualMachineProfile.storageProfile.osDisk.diskSizeGB] + * Specifies the size of the operating system disk in gigabytes. This element + * can be used to overwrite the size of the disk in a virtual machine image. + *

    This value cannot be larger than 1023 GB + * * @param {object} * [parameters.virtualMachineProfile.storageProfile.osDisk.image] The Source * User Image VirtualHardDisk. This VirtualHardDisk will be copied before using @@ -10374,8 +10610,8 @@ class VirtualMachineScaleSets { * @param {string} * [parameters.virtualMachineProfile.storageProfile.osDisk.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' + * are: Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {array} [parameters.virtualMachineProfile.storageProfile.dataDisks] * The data disks. @@ -10433,10 +10669,10 @@ class VirtualMachineScaleSets { * set. Possible values include: 'SystemAssigned', 'UserAssigned', * 'SystemAssigned, UserAssigned', 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the virtual machine scale set. The user identity references - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the virtual machine scale set. The user + * identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {object} [parameters.tags] Resource tags * @@ -10502,7 +10738,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10539,7 +10775,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10547,9 +10783,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10596,7 +10830,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10640,7 +10874,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10648,9 +10882,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10692,7 +10924,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10731,7 +10963,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10739,9 +10971,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10788,7 +11018,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10832,7 +11062,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10840,9 +11070,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10887,7 +11115,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10929,7 +11157,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10937,9 +11165,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10984,7 +11210,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11026,7 +11252,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11034,9 +11260,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11081,7 +11305,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11123,7 +11347,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11131,9 +11355,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11161,6 +11383,9 @@ class VirtualMachineScaleSets { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -11178,7 +11403,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11198,6 +11423,9 @@ class VirtualMachineScaleSets { /** * Perform maintenance on one or more virtual machines in a VM scale set. + * Operation on instances which are not eligible for perform maintenance will + * be failed. Please refer to best practices for more details: + * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * * @param {string} resourceGroupName The name of the resource group. * @@ -11220,7 +11448,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11228,9 +11456,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11273,7 +11499,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11313,7 +11539,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11321,9 +11547,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11369,7 +11593,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11412,7 +11636,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11420,9 +11644,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11468,7 +11690,7 @@ class VirtualMachineScaleSets { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11511,7 +11733,7 @@ class VirtualMachineScaleSets { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11519,9 +11741,7 @@ class VirtualMachineScaleSets { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11810,6 +12030,91 @@ class VirtualMachineScaleSets { } } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getOSUpgradeHistoryNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getOSUpgradeHistoryNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualMachineScaleSetListOSUpgradeHistory} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineScaleSetListOSUpgradeHistory} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getOSUpgradeHistoryNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getOSUpgradeHistoryNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getOSUpgradeHistoryNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = VirtualMachineScaleSets; diff --git a/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js b/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js index f56a070623..898256e46d 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineSizes.js @@ -15,7 +15,8 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Lists all available virtual machine sizes for a subscription in a location. + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * * @param {string} location The location upon which virtual-machine-sizes is * queried. @@ -49,7 +50,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -171,7 +172,8 @@ class VirtualMachineSizes { } /** - * Lists all available virtual machine sizes for a subscription in a location. + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * * @param {string} location The location upon which virtual-machine-sizes is * queried. @@ -202,7 +204,8 @@ class VirtualMachineSizes { } /** - * Lists all available virtual machine sizes for a subscription in a location. + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * * @param {string} location The location upon which virtual-machine-sizes is * queried. diff --git a/lib/services/computeManagement2/lib/operations/virtualMachines.js b/lib/services/computeManagement2/lib/operations/virtualMachines.js index c5c28bb9c3..2d187abf11 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachines.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachines.js @@ -14,161 +14,6 @@ const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; -/** - * The operation to get all extensions of a Virtual Machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine containing the - * extension. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] The expand expression to apply on the - * operation. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineExtensionsListResult} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _getExtensions(resourceGroupName, vmName, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - if (!callback) { - throw new Error('callback cannot be null.'); - } - let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; - // Validate - try { - if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (vmName === null || vmName === undefined || typeof vmName.valueOf() !== 'string') { - throw new Error('vmName cannot be null or undefined and it must be of type string.'); - } - if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { - throw new Error('expand must be of type string.'); - } - if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { - throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{vmName}', encodeURIComponent(vmName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; - if (expand !== null && expand !== undefined) { - queryParameters.push('$expand=' + encodeURIComponent(expand)); - } - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VirtualMachineExtensionsListResult']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - /** * Captures the VM by copying virtual hard disks of the VM and outputs a @@ -467,8 +312,8 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -575,9 +420,20 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -636,10 +492,10 @@ function _capture(resourceGroupName, vmName, parameters, options, callback) { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -923,8 +779,8 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -1031,9 +887,20 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -1092,10 +959,10 @@ function _createOrUpdate(resourceGroupName, vmName, parameters, options, callbac * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -1190,9 +1057,7 @@ function _update(resourceGroupName, vmName, parameters, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1230,20 +1095,6 @@ function _deleteMethod(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1290,7 +1141,7 @@ function _get(resourceGroupName, vmName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1443,7 +1294,7 @@ function _instanceView(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1571,9 +1422,7 @@ function _instanceView(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1611,20 +1460,6 @@ function _convertToManagedDisks(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1651,9 +1486,7 @@ function _convertToManagedDisks(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1691,20 +1524,6 @@ function _deallocate(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -1729,9 +1548,7 @@ function _deallocate(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -1747,7 +1564,7 @@ function _generalize(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1833,23 +1650,6 @@ function _generalize(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -1890,7 +1690,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2027,7 +1827,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -2164,7 +1964,7 @@ function _listAvailableSizes(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2293,9 +2093,7 @@ function _listAvailableSizes(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2333,20 +2131,6 @@ function _powerOff(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2372,9 +2156,7 @@ function _powerOff(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2412,20 +2194,6 @@ function _restart(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2451,9 +2219,7 @@ function _restart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2491,20 +2257,6 @@ function _start(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2530,9 +2282,7 @@ function _start(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2570,20 +2320,6 @@ function _redeploy(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2609,9 +2345,7 @@ function _redeploy(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -2649,20 +2383,6 @@ function _performMaintenance(resourceGroupName, vmName, options, callback) { if (responseBody === '') responseBody = null; // Deserialize Response - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } return callback(null, result, httpRequest, response); }); @@ -2806,7 +2526,7 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3136,8 +2856,8 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -3244,9 +2964,20 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -3305,10 +3036,10 @@ function _beginCapture(resourceGroupName, vmName, parameters, options, callback) * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -3344,7 +3075,7 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3691,8 +3422,8 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -3799,9 +3530,20 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -3860,10 +3602,10 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, ca * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -3897,7 +3639,7 @@ function _beginUpdate(resourceGroupName, vmName, parameters, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4057,9 +3799,7 @@ function _beginUpdate(resourceGroupName, vmName, parameters, options, callback) * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4075,7 +3815,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4161,23 +3901,6 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4202,9 +3925,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4220,7 +3941,7 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4295,34 +4016,17 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); } + return callback(error); } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; return callback(null, result, httpRequest, response); }); @@ -4347,9 +4051,7 @@ function _beginConvertToManagedDisks(resourceGroupName, vmName, options, callbac * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4365,7 +4067,7 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4451,23 +4153,6 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4493,9 +4178,7 @@ function _beginDeallocate(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4511,7 +4194,7 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4597,23 +4280,6 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4637,9 +4303,7 @@ function _beginPowerOff(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4655,7 +4319,7 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4741,23 +4405,6 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4781,9 +4428,7 @@ function _beginRestart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4799,7 +4444,7 @@ function _beginStart(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -4885,23 +4530,6 @@ function _beginStart(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -4925,9 +4553,7 @@ function _beginStart(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -4943,7 +4569,7 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5029,23 +4655,6 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5069,9 +4678,7 @@ function _beginRedeploy(resourceGroupName, vmName, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -5087,7 +4694,7 @@ function _beginPerformMaintenance(resourceGroupName, vmName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5173,23 +4780,6 @@ function _beginPerformMaintenance(resourceGroupName, vmName, options, callback) // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); @@ -5240,7 +4830,7 @@ function _beginRunCommand(resourceGroupName, vmName, parameters, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-12-01'; + let apiVersion = '2018-06-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5631,7 +5221,6 @@ class VirtualMachines { */ constructor(client) { this.client = client; - this._getExtensions = _getExtensions; this._capture = _capture; this._createOrUpdate = _createOrUpdate; this._update = _update; @@ -5666,101 +5255,6 @@ class VirtualMachines { this._listAllNext = _listAllNext; } - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine containing the - * extension. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] The expand expression to apply on the - * operation. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getExtensionsWithHttpOperationResponse(resourceGroupName, vmName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._getExtensions(resourceGroupName, vmName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * The operation to get all extensions of a Virtual Machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine containing the - * extension. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] The expand expression to apply on the - * operation. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {VirtualMachineExtensionsListResult} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineExtensionsListResult} for more - * information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getExtensions(resourceGroupName, vmName, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getExtensions(resourceGroupName, vmName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getExtensions(resourceGroupName, vmName, options, optionalCallback); - } - } - /** * Captures the VM by copying virtual hard disks of the VM and outputs a * template that can be used to create similar VMs. @@ -6079,8 +5573,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6187,9 +5681,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -6248,10 +5753,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -6489,8 +5994,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -6597,9 +6102,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -6658,10 +6174,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -6921,8 +6437,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -7029,9 +6545,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -7090,10 +6617,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -7329,8 +6856,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -7437,9 +6964,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -7498,10 +7036,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -7568,7 +7106,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7605,7 +7143,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7613,9 +7151,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7837,7 +7373,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7875,7 +7411,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7883,9 +7419,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -7926,7 +7460,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -7964,7 +7498,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7972,9 +7506,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8014,7 +7546,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8051,7 +7583,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8059,9 +7591,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8358,7 +7888,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8397,7 +7927,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8405,9 +7935,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8447,7 +7975,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8484,7 +8012,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8492,9 +8020,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8534,7 +8060,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8571,7 +8097,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8579,9 +8105,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8621,7 +8145,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8658,7 +8182,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8666,9 +8190,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -8708,7 +8230,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -8745,7 +8267,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8753,9 +8275,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -9205,8 +8725,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -9313,9 +8833,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -9374,10 +8905,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -9615,8 +9146,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -9723,9 +9254,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -9784,10 +9326,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -10047,8 +9589,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -10155,9 +9697,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -10216,10 +9769,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -10455,8 +10008,8 @@ class VirtualMachines { * @param {string} * [parameters.storageProfile.osDisk.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' + * Standard_LRS, Premium_LRS, and StandardSSD_LRS. Possible values include: + * 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' * * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource * Id @@ -10563,9 +10116,20 @@ class VirtualMachines { * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * Indicates whether virtual machine agent should be provisioned on the virtual + * machine.

    When this property is not specified in the request body, + * default behavior is to set it to true. This will ensure that VM Agent is + * installed on the VM so that extensions can be added to the VM later. + * * @param {array} [parameters.osProfile.secrets] Specifies set of certificates * that should be installed onto the virtual machine. * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * * @param {object} [parameters.networkProfile] Specifies the network interfaces * of the virtual machine. * @@ -10624,10 +10188,10 @@ class VirtualMachines { * include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', * 'None' * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * * @param {array} [parameters.zones] The virtual machine zones. * @@ -10694,7 +10258,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10731,7 +10295,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10739,9 +10303,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10782,7 +10344,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10820,7 +10382,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10828,9 +10390,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10871,7 +10431,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -10909,7 +10469,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -10917,9 +10477,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -10961,7 +10519,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11000,7 +10558,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11008,9 +10566,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11050,7 +10606,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11087,7 +10643,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11095,9 +10651,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11137,7 +10691,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11174,7 +10728,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11182,9 +10736,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11224,7 +10776,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11261,7 +10813,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11269,9 +10821,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -11311,7 +10861,7 @@ class VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -11348,7 +10898,7 @@ class VirtualMachines { * * {Promise} A promise is returned * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -11356,9 +10906,7 @@ class VirtualMachines { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * diff --git a/lib/services/computeManagement2/package-lock.json b/lib/services/computeManagement2/package-lock.json new file mode 100644 index 0000000000..8694b53f1c --- /dev/null +++ b/lib/services/computeManagement2/package-lock.json @@ -0,0 +1,483 @@ +{ + "name": "azure-arm-compute", + "version": "6.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/node": { + "version": "8.10.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.28.tgz", + "integrity": "sha512-iHsAzDg3OLH7JP+wipniUULHoDSWLgEDYOvsar6/mpAkTJd9/n23Ap8ikruMlvRTqMv/LXrflH9v/AfiEqaBGg==" + }, + "adal-node": { + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.1.28.tgz", + "integrity": "sha1-RoxLs+u9lrEnBmn0ucuk4AZepIU=", + "requires": { + "@types/node": "^8.0.47", + "async": ">=0.6.0", + "date-utils": "*", + "jws": "3.x.x", + "request": ">= 2.52.0", + "underscore": ">= 1.3.1", + "uuid": "^3.1.0", + "xmldom": ">= 0.1.x", + "xpath.js": "~1.1.0" + } + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "^4.14.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-utils": { + "version": "1.2.21", + "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", + "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", + "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "requires": { + "ajv": "^5.3.0", + "har-schema": "^2.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jwa": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", + "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.10", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", + "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", + "requires": { + "jwa": "^1.1.5", + "safe-buffer": "^5.0.1" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "requires": { + "mime-db": "~1.36.0" + } + }, + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + }, + "ms-rest": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/ms-rest/-/ms-rest-2.3.6.tgz", + "integrity": "sha512-M+Lx9P7Wy4TeAk7jqPLwGS1QS1gvxF6Xo+OHv5j1g3Kcb44T/GTUuSjxTKarF6aKyeacZH1ZD++Nt7pcql7dDA==", + "requires": { + "duplexer": "^0.1.1", + "is-buffer": "^1.1.6", + "is-stream": "^1.1.0", + "moment": "^2.21.0", + "request": "^2.87.0", + "through": "^2.3.8", + "tunnel": "0.0.5", + "uuid": "^3.2.1" + } + }, + "ms-rest-azure": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/ms-rest-azure/-/ms-rest-azure-2.5.7.tgz", + "integrity": "sha512-e4lgB0z29Dx4ufu/c+PmEAYY1WXq98GYUBkE+iRx7WsxsN04lrM3B1vj8y+B8rKt7clPUE0niqB9VovVL8zvag==", + "requires": { + "adal-node": "^0.1.28", + "async": "2.6.0", + "moment": "^2.22.2", + "ms-rest": "^2.3.2", + "uuid": "^3.2.1" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sshpk": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + }, + "tunnel": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.5.tgz", + "integrity": "sha512-gj5sdqherx4VZKMcBA4vewER7zdK25Td+z1npBqpbDys4eJrLx+SlYjJvq1bDXs2irkuJM5pf8ktaEQVipkrbA==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + }, + "xpath.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", + "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==" + } + } +} diff --git a/lib/services/computeManagement2/package.json b/lib/services/computeManagement2/package.json index eacea5c8fb..d5e029c303 100644 --- a/lib/services/computeManagement2/package.json +++ b/lib/services/computeManagement2/package.json @@ -2,21 +2,24 @@ "name": "azure-arm-compute", "author": "Microsoft Corporation", "description": "ComputeManagementClient Library with typescript type definitions for node", - "version": "5.1.1", + "version": "6.0.0", "dependencies": { - "ms-rest": "^2.3.2", + "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" }, - "keywords": [ "node", "azure" ], + "keywords": [ + "node", + "azure" + ], "license": "MIT", "main": "./lib/computeManagementClient.js", "types": "./lib/computeManagementClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/computeManagement2", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } } diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_get_a_specific_extension_image_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_get_a_specific_extension_image_successfully.nock.js index 7f0c24b203..a184c14197 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_get_a_specific_extension_image_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_get_a_specific_extension_image_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions/2.0?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions/2.0?api-version=2018-06-01') .reply(200, "{\r\n \"properties\": {\r\n \"operatingSystem\": \"Windows\",\r\n \"computeRole\": \"IaaS\",\r\n \"vmScaleSetEnabled\": false,\r\n \"supportsMultipleExtensions\": false\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"2.0\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0\"\r\n}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '405', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions/2.0?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions/2.0?api-version=2018-06-01') .reply(200, "{\r\n \"properties\": {\r\n \"operatingSystem\": \"Windows\",\r\n \"computeRole\": \"IaaS\",\r\n \"vmScaleSetEnabled\": false,\r\n \"supportsMultipleExtensions\": false\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"2.0\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0\"\r\n}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '405', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_types_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_types_successfully.nock.js index 9901c49dda..bf702e25a7 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_types_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_types_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"BGInfo\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/BGInfo\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CustomScriptExtension\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/CustomScriptExtension\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"JsonADDomainExtension\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/JsonADDomainExtension\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"VMAccessAgent\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1033', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"BGInfo\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/BGInfo\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"CustomScriptExtension\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/CustomScriptExtension\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"JsonADDomainExtension\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/JsonADDomainExtension\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"VMAccessAgent\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1033', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_versions_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_versions_successfully.nock.js index 327cee26cf..e0e3fdf71f 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_versions_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Extension_Images_should_list_versions_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0.1\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0.1\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0.2\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0.2\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '779', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0.1\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0.1\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2.0.2\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/2.0.2\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '779', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_ascending_value_should_work.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_ascending_value_should_work.nock.js index 4296335b56..7163ac4228 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_ascending_value_should_work.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_ascending_value_should_work.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20asc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20asc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20asc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20asc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_descending_value_should_work.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_descending_value_should_work.nock.js index 17bee54b63..64926be73e 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_descending_value_should_work.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_orderby_with_descending_value_should_work.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20desc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20desc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20desc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$orderby=name%20desc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_positive_and_orderby_with_ascending_value_should_work.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_positive_and_orderby_with_ascending_value_should_work.nock.js index 2eb5263d20..0aff2a1a52 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_positive_and_orderby_with_ascending_value_should_work.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_positive_and_orderby_with_ascending_value_should_work.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&$orderby=name%20asc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&$orderby=name%20asc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '303', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&$orderby=name%20asc&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&$orderby=name%20asc&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '303', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_negative_value_should_work.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_negative_value_should_work.nock.js index 77a196e9af..85454fcf67 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_negative_value_should_work.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_negative_value_should_work.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=0&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=0&api-version=2018-06-01') .reply(200, "[]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '2', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=0&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=0&api-version=2018-06-01') .reply(200, "[]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '2', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_positive_value_should_work.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_positive_value_should_work.nock.js index e5b73cb36d..2c0e2400b8 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_positive_value_should_work.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_list_with_filter_top_with_positive_value_should_work.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '303', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?$top=1&api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '303', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_get_a_specific_image_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_get_a_specific_image_successfully.nock.js index ff66812132..fa92cac222 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_get_a_specific_image_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_get_a_specific_image_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions/4.0.20151120?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions/4.0.20151120?api-version=2018-06-01') .reply(200, "{\r\n \"properties\": {\r\n \"osDiskImage\": {\r\n \"operatingSystem\": \"Windows\"\r\n },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '404', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions/4.0.20151120?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions/4.0.20151120?api-version=2018-06-01') .reply(200, "{\r\n \"properties\": {\r\n \"osDiskImage\": {\r\n \"operatingSystem\": \"Windows\"\r\n },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n}", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '404', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_offers_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_offers_successfully.nock.js index 0e57072697..e3b12d7533 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_offers_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_offers_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WindowsServer\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '258', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"WindowsServer\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '258', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_publishers_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_publishers_successfully.nock.js index 06c52d849f..80f36f26a3 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_publishers_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_publishers_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers?api-version=2018-06-01') .reply(200, "[{\"location\":\"westus\",\"name\":\"4psa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/4psa\"},{\"location\":\"westus\",\"name\":\"4ward365\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/4ward365\"},{\"location\":\"westus\",\"name\":\"7isolutions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/7isolutions\"},{\"location\":\"westus\",\"name\":\"a10networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/a10networks\"},{\"location\":\"westus\",\"name\":\"abiquo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/abiquo\"},{\"location\":\"westus\",\"name\":\"Acronis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis\"},{\"location\":\"westus\",\"name\":\"Acronis.Abokov.Backup\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Abokov.Backup\"},{\"location\":\"westus\",\"name\":\"Acronis.Backup\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Backup\"},{\"location\":\"westus\",\"name\":\"Acronis2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis2\"},{\"location\":\"westus\",\"name\":\"actian_matrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/actian_matrix\"},{\"location\":\"westus\",\"name\":\"active-navigation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/active-navigation\"},{\"location\":\"westus\",\"name\":\"activeeon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/activeeon\"},{\"location\":\"westus\",\"name\":\"adam-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adam-software\"},{\"location\":\"westus\",\"name\":\"adatao\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adatao\"},{\"location\":\"westus\",\"name\":\"adobe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe\"},{\"location\":\"westus\",\"name\":\"adobe_test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe_test\"},{\"location\":\"westus\",\"name\":\"adra-match\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adra-match\"},{\"location\":\"westus\",\"name\":\"advantech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech\"},{\"location\":\"westus\",\"name\":\"advantech-webaccess\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech-webaccess\"},{\"location\":\"westus\",\"name\":\"aerospike\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike\"},{\"location\":\"westus\",\"name\":\"aimsinnovation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aimsinnovation\"},{\"location\":\"westus\",\"name\":\"aiscaler-cache-control-ddos-and-url-rewriting-\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aiscaler-cache-control-ddos-and-url-rewriting-\"},{\"location\":\"westus\",\"name\":\"alachisoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alachisoft\"},{\"location\":\"westus\",\"name\":\"alertlogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alertlogic\"},{\"location\":\"westus\",\"name\":\"AlertLogic.Extension\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/AlertLogic.Extension\"},{\"location\":\"westus\",\"name\":\"algebraix-data\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/algebraix-data\"},{\"location\":\"westus\",\"name\":\"alldigital-brevity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alldigital-brevity\"},{\"location\":\"westus\",\"name\":\"alteryx\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alteryx\"},{\"location\":\"westus\",\"name\":\"altiar\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/altiar\"},{\"location\":\"westus\",\"name\":\"appcelerator\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appcelerator\"},{\"location\":\"westus\",\"name\":\"appcitoinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appcitoinc\"},{\"location\":\"westus\",\"name\":\"appex-networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appex-networks\"},{\"location\":\"westus\",\"name\":\"appistry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appistry\"},{\"location\":\"westus\",\"name\":\"apprenda\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/apprenda\"},{\"location\":\"westus\",\"name\":\"appveyorci\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appveyorci\"},{\"location\":\"westus\",\"name\":\"appzero\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appzero\"},{\"location\":\"westus\",\"name\":\"arangodb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/arangodb\"},{\"location\":\"westus\",\"name\":\"aras\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aras\"},{\"location\":\"westus\",\"name\":\"array_networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/array_networks\"},{\"location\":\"westus\",\"name\":\"aspera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aspera\"},{\"location\":\"westus\",\"name\":\"aspex-managed-cloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex-managed-cloud\"},{\"location\":\"westus\",\"name\":\"attunity_cloudbeam\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/attunity_cloudbeam\"},{\"location\":\"westus\",\"name\":\"auriq-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/auriq-systems\"},{\"location\":\"westus\",\"name\":\"avepoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/avepoint\"},{\"location\":\"westus\",\"name\":\"aviatrix-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aviatrix-systems\"},{\"location\":\"westus\",\"name\":\"awingu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/awingu\"},{\"location\":\"westus\",\"name\":\"axway\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/axway\"},{\"location\":\"westus\",\"name\":\"azul\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/azul\"},{\"location\":\"westus\",\"name\":\"AzureRT.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureRT.Test\"},{\"location\":\"westus\",\"name\":\"azuresyncfusion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/azuresyncfusion\"},{\"location\":\"westus\",\"name\":\"balabit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/balabit\"},{\"location\":\"westus\",\"name\":\"Barracuda.Azure.ConnectivityAgent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Barracuda.Azure.ConnectivityAgent\"},{\"location\":\"westus\",\"name\":\"barracudanetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/barracudanetworks\"},{\"location\":\"westus\",\"name\":\"basho\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/basho\"},{\"location\":\"westus\",\"name\":\"Bitnami\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Bitnami\"},{\"location\":\"westus\",\"name\":\"bizagi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bizagi\"},{\"location\":\"westus\",\"name\":\"biztalk360\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/biztalk360\"},{\"location\":\"westus\",\"name\":\"blackberry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/blackberry\"},{\"location\":\"westus\",\"name\":\"bluetalon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bluetalon\"},{\"location\":\"westus\",\"name\":\"boundlessgeo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/boundlessgeo\"},{\"location\":\"westus\",\"name\":\"boxless\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/boxless\"},{\"location\":\"westus\",\"name\":\"brocade_communications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/brocade_communications\"},{\"location\":\"westus\",\"name\":\"bryte\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bryte\"},{\"location\":\"westus\",\"name\":\"bssw\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bssw\"},{\"location\":\"westus\",\"name\":\"buddhalabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/buddhalabs\"},{\"location\":\"westus\",\"name\":\"bwappengine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bwappengine\"},{\"location\":\"westus\",\"name\":\"Canonical\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical\"},{\"location\":\"westus\",\"name\":\"caringo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/caringo\"},{\"location\":\"westus\",\"name\":\"catechnologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/catechnologies\"},{\"location\":\"westus\",\"name\":\"cautelalabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cautelalabs\"},{\"location\":\"westus\",\"name\":\"cds\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cds\"},{\"location\":\"westus\",\"name\":\"certivox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/certivox\"},{\"location\":\"westus\",\"name\":\"checkpoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpoint\"},{\"location\":\"westus\",\"name\":\"checkpointsystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpointsystems\"},{\"location\":\"westus\",\"name\":\"chef-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/chef-software\"},{\"location\":\"westus\",\"name\":\"Chef.Bootstrap.WindowsAzure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Chef.Bootstrap.WindowsAzure\"},{\"location\":\"westus\",\"name\":\"cherwell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cherwell\"},{\"location\":\"westus\",\"name\":\"circleci\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/circleci\"},{\"location\":\"westus\",\"name\":\"cires21\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cires21\"},{\"location\":\"westus\",\"name\":\"cisco\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cisco\"},{\"location\":\"westus\",\"name\":\"citrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/citrix\"},{\"location\":\"westus\",\"name\":\"clickberry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/clickberry\"},{\"location\":\"westus\",\"name\":\"cloud-cruiser\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloud-cruiser\"},{\"location\":\"westus\",\"name\":\"cloudbees\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees\"},{\"location\":\"westus\",\"name\":\"cloudbees-enterprise-jenkins\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees-enterprise-jenkins\"},{\"location\":\"westus\",\"name\":\"cloudbolt-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbolt-software\"},{\"location\":\"westus\",\"name\":\"cloudboost\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudboost\"},{\"location\":\"westus\",\"name\":\"cloudera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera\"},{\"location\":\"westus\",\"name\":\"cloudera1qaz2wsx\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera1qaz2wsx\"},{\"location\":\"westus\",\"name\":\"cloudhouse\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudhouse\"},{\"location\":\"westus\",\"name\":\"cloudlink\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudlink\"},{\"location\":\"westus\",\"name\":\"CloudLink.SecureVM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLink.SecureVM\"},{\"location\":\"westus\",\"name\":\"CloudLinkEMC.SecureVM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM\"},{\"location\":\"westus\",\"name\":\"CloudLinkEMC.SecureVM.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test\"},{\"location\":\"westus\",\"name\":\"cloudsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsoft\"},{\"location\":\"westus\",\"name\":\"clustrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/clustrix\"},{\"location\":\"westus\",\"name\":\"codelathe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/codelathe\"},{\"location\":\"westus\",\"name\":\"codenvy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/codenvy\"},{\"location\":\"westus\",\"name\":\"cohesive\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesive\"},{\"location\":\"westus\",\"name\":\"commvault\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/commvault\"},{\"location\":\"westus\",\"name\":\"companyname-short\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/companyname-short\"},{\"location\":\"westus\",\"name\":\"Confer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer\"},{\"location\":\"westus\",\"name\":\"Confer.TestSensor\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer.TestSensor\"},{\"location\":\"westus\",\"name\":\"consensys\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/consensys\"},{\"location\":\"westus\",\"name\":\"cordis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cordis\"},{\"location\":\"westus\",\"name\":\"corent-technology-pvt\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/corent-technology-pvt\"},{\"location\":\"westus\",\"name\":\"CoreOS\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CoreOS\"},{\"location\":\"westus\",\"name\":\"cortical-io\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cortical-io\"},{\"location\":\"westus\",\"name\":\"couchbase\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/couchbase\"},{\"location\":\"westus\",\"name\":\"credativ\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/credativ\"},{\"location\":\"westus\",\"name\":\"Dans.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans.Windows.App\"},{\"location\":\"westus\",\"name\":\"Dans2.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans2.Windows.App\"},{\"location\":\"westus\",\"name\":\"Dans3.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans3.Windows.App\"},{\"location\":\"westus\",\"name\":\"dataart\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataart\"},{\"location\":\"westus\",\"name\":\"datacastle\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datacastle\"},{\"location\":\"westus\",\"name\":\"Datadog.Agent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Datadog.Agent\"},{\"location\":\"westus\",\"name\":\"dataexpeditioninc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataexpeditioninc\"},{\"location\":\"westus\",\"name\":\"dataiku\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataiku\"},{\"location\":\"westus\",\"name\":\"datalayer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datalayer\"},{\"location\":\"westus\",\"name\":\"dataliberation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataliberation\"},{\"location\":\"westus\",\"name\":\"datastax\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datastax\"},{\"location\":\"westus\",\"name\":\"datasunrise\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datasunrise\"},{\"location\":\"westus\",\"name\":\"defacto_global_\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/defacto_global_\"},{\"location\":\"westus\",\"name\":\"dell-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dell-software\"},{\"location\":\"westus\",\"name\":\"dell_software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dell_software\"},{\"location\":\"westus\",\"name\":\"denyall\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/denyall\"},{\"location\":\"westus\",\"name\":\"derdack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/derdack\"},{\"location\":\"westus\",\"name\":\"dgsecure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dgsecure\"},{\"location\":\"westus\",\"name\":\"docker\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/docker\"},{\"location\":\"westus\",\"name\":\"docscorp-us\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/docscorp-us\"},{\"location\":\"westus\",\"name\":\"dolbydeveloper\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dolbydeveloper\"},{\"location\":\"westus\",\"name\":\"dome9\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dome9\"},{\"location\":\"westus\",\"name\":\"donovapub\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/donovapub\"},{\"location\":\"westus\",\"name\":\"drone\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/drone\"},{\"location\":\"westus\",\"name\":\"dundas\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dundas\"},{\"location\":\"westus\",\"name\":\"dynatrace.ruxit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace.ruxit\"},{\"location\":\"westus\",\"name\":\"easyterritory\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/easyterritory\"},{\"location\":\"westus\",\"name\":\"edevtech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/edevtech\"},{\"location\":\"westus\",\"name\":\"egress\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/egress\"},{\"location\":\"westus\",\"name\":\"eip\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eip\"},{\"location\":\"westus\",\"name\":\"eip-eipower\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eip-eipower\"},{\"location\":\"westus\",\"name\":\"elastacloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elastacloud\"},{\"location\":\"westus\",\"name\":\"elasticbox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elasticbox\"},{\"location\":\"westus\",\"name\":\"elfiqnetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elfiqnetworks\"},{\"location\":\"westus\",\"name\":\"eloquera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eloquera\"},{\"location\":\"westus\",\"name\":\"eperi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eperi\"},{\"location\":\"westus\",\"name\":\"equilibrium\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/equilibrium\"},{\"location\":\"westus\",\"name\":\"ESET\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET\"},{\"location\":\"westus\",\"name\":\"ESET.FileSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET.FileSecurity\"},{\"location\":\"westus\",\"name\":\"esri\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/esri\"},{\"location\":\"westus\",\"name\":\"eurotech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eurotech\"},{\"location\":\"westus\",\"name\":\"exasol\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/exasol\"},{\"location\":\"westus\",\"name\":\"exit-games\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/exit-games\"},{\"location\":\"westus\",\"name\":\"expertime\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/expertime\"},{\"location\":\"westus\",\"name\":\"f5-networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/f5-networks\"},{\"location\":\"westus\",\"name\":\"filebridge\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/filebridge\"},{\"location\":\"westus\",\"name\":\"firehost\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/firehost\"},{\"location\":\"westus\",\"name\":\"flexerasoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/flexerasoftware\"},{\"location\":\"westus\",\"name\":\"foghorn-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/foghorn-systems\"},{\"location\":\"westus\",\"name\":\"forscene\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/forscene\"},{\"location\":\"westus\",\"name\":\"fortinet\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fortinet\"},{\"location\":\"westus\",\"name\":\"fortycloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fortycloud\"},{\"location\":\"westus\",\"name\":\"fw\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fw\"},{\"location\":\"westus\",\"name\":\"g-data-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/g-data-software\"},{\"location\":\"westus\",\"name\":\"gemalto-safenet\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/gemalto-safenet\"},{\"location\":\"westus\",\"name\":\"Gemalto.SafeNet.ProtectV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV\"},{\"location\":\"westus\",\"name\":\"Gemalto.SafeNet.ProtectV.Azure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV.Azure\"},{\"location\":\"westus\",\"name\":\"GitHub\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/GitHub\"},{\"location\":\"westus\",\"name\":\"greathorn\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/greathorn\"},{\"location\":\"westus\",\"name\":\"greensql\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/greensql\"},{\"location\":\"westus\",\"name\":\"haivision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/haivision\"},{\"location\":\"westus\",\"name\":\"halobicloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/halobicloud\"},{\"location\":\"westus\",\"name\":\"hanu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hanu\"},{\"location\":\"westus\",\"name\":\"hewlett-packard\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hewlett-packard\"},{\"location\":\"westus\",\"name\":\"hortonworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hortonworks\"},{\"location\":\"westus\",\"name\":\"humanlogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/humanlogic\"},{\"location\":\"westus\",\"name\":\"iaansys\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iaansys\"},{\"location\":\"westus\",\"name\":\"iamcloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iamcloud\"},{\"location\":\"westus\",\"name\":\"ibabs-eu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ibabs-eu\"},{\"location\":\"westus\",\"name\":\"imaginecommunications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imaginecommunications\"},{\"location\":\"westus\",\"name\":\"imc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imc\"},{\"location\":\"westus\",\"name\":\"imperva\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imperva\"},{\"location\":\"westus\",\"name\":\"incredibuild\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/incredibuild\"},{\"location\":\"westus\",\"name\":\"infolibrarian\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/infolibrarian\"},{\"location\":\"westus\",\"name\":\"informatica\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica\"},{\"location\":\"westus\",\"name\":\"informatica-cloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica-cloud\"},{\"location\":\"westus\",\"name\":\"infostrat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/infostrat\"},{\"location\":\"westus\",\"name\":\"intel\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/intel\"},{\"location\":\"westus\",\"name\":\"intelligent-plant-ltd\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/intelligent-plant-ltd\"},{\"location\":\"westus\",\"name\":\"iquest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iquest\"},{\"location\":\"westus\",\"name\":\"ishlangu-load-balancer-adc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ishlangu-load-balancer-adc\"},{\"location\":\"westus\",\"name\":\"itelios\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/itelios\"},{\"location\":\"westus\",\"name\":\"jedox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jedox\"},{\"location\":\"westus\",\"name\":\"jelastic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jelastic\"},{\"location\":\"westus\",\"name\":\"jetnexus\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jetnexus\"},{\"location\":\"westus\",\"name\":\"jfrog\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jfrog\"},{\"location\":\"westus\",\"name\":\"jitterbit_integration\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jitterbit_integration\"},{\"location\":\"westus\",\"name\":\"kaazing\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kaazing\"},{\"location\":\"westus\",\"name\":\"kaspersky_lab\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kaspersky_lab\"},{\"location\":\"westus\",\"name\":\"kemptech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kemptech\"},{\"location\":\"westus\",\"name\":\"kepion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kepion\"},{\"location\":\"westus\",\"name\":\"kollective\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kollective\"},{\"location\":\"westus\",\"name\":\"le\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/le\"},{\"location\":\"westus\",\"name\":\"lieberlieber\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/lieberlieber\"},{\"location\":\"westus\",\"name\":\"liebsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/liebsoft\"},{\"location\":\"westus\",\"name\":\"literatu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/literatu\"},{\"location\":\"westus\",\"name\":\"loadbalancer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/loadbalancer\"},{\"location\":\"westus\",\"name\":\"LocalTest.TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/LocalTest.TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"logi-analytics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/logi-analytics\"},{\"location\":\"westus\",\"name\":\"loginpeople\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/loginpeople\"},{\"location\":\"westus\",\"name\":\"logtrust\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/logtrust\"},{\"location\":\"westus\",\"name\":\"looker\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/looker\"},{\"location\":\"westus\",\"name\":\"luxoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/luxoft\"},{\"location\":\"westus\",\"name\":\"magelia\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/magelia\"},{\"location\":\"westus\",\"name\":\"manageengine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/manageengine\"},{\"location\":\"westus\",\"name\":\"mapr-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mapr-technologies\"},{\"location\":\"westus\",\"name\":\"mariadb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mariadb\"},{\"location\":\"westus\",\"name\":\"massiveanalytic-\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/massiveanalytic-\"},{\"location\":\"westus\",\"name\":\"McAfee.EndpointSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity\"},{\"location\":\"westus\",\"name\":\"McAfee.EndpointSecurity.test3\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity.test3\"},{\"location\":\"westus\",\"name\":\"meanio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/meanio\"},{\"location\":\"westus\",\"name\":\"mediazenie\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mediazenie\"},{\"location\":\"westus\",\"name\":\"memsql\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/memsql\"},{\"location\":\"westus\",\"name\":\"mendix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mendix\"},{\"location\":\"westus\",\"name\":\"mentalnotes\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mentalnotes\"},{\"location\":\"westus\",\"name\":\"mesosphere\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mesosphere\"},{\"location\":\"westus\",\"name\":\"metavistech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/metavistech\"},{\"location\":\"westus\",\"name\":\"mfiles\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mfiles\"},{\"location\":\"westus\",\"name\":\"Microsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft\"},{\"location\":\"westus\",\"name\":\"microsoft-ads\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-ads\"},{\"location\":\"westus\",\"name\":\"microsoft-r-products\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-r-products\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Applications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Applications\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Backup.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Backup.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Diagnostics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Diagnostics\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Extensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Extensions\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.RecoveryServices\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Security\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Security.Internal\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security.Internal\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.SiteRecovery.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.SiteRecovery.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.WindowsFabric.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.WindowsFabric.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.AzureCAT.AzureEnhancedMonitoring\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoring\"},{\"location\":\"westus\",\"name\":\"Microsoft.AzureCAT.AzureEnhancedMonitoringTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Compute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute\"},{\"location\":\"westus\",\"name\":\"Microsoft.EnterpriseCloud.Monitoring\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring\"},{\"location\":\"westus\",\"name\":\"Microsoft.EnterpriseCloud.Monitoring.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.HpcCompute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcCompute\"},{\"location\":\"westus\",\"name\":\"Microsoft.HpcPack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcPack\"},{\"location\":\"westus\",\"name\":\"Microsoft.OSTCExtensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions\"},{\"location\":\"westus\",\"name\":\"Microsoft.OSTCExtensions.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.CMD\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.CMD\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Install\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Install\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Internal\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Internal\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Internal.Telemetry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Internal.Telemetry\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.PaaS\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.PaaS\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Preview\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Preview\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Release.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Release.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Telemetry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Telemetry\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test.0\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test.0\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test.1\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test.1\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test2\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.UpgradeTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.UpgradeTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.UtcTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.UtcTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf4Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf4Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf5\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf5\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.WmfRTM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.WmfRTM\"},{\"location\":\"westus\",\"name\":\"Microsoft.SqlServer.Managability.IaaS.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Managability.IaaS.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.SqlServer.Management\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Management\"},{\"location\":\"westus\",\"name\":\"Microsoft.SystemCenter\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SystemCenter\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.ETWTraceListenerService\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.ETWTraceListenerService\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.RemoteDebug\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.RemoteDebug.Json\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug.Json\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.ServiceProfiler\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.ServiceProfiler.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Windows.AzureRemoteApp.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.AzureRemoteApp.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Windows.RemoteDesktop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.RemoteDesktop\"},{\"location\":\"westus\",\"name\":\"Microsoft.WindowsAzure.Compute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.WindowsAzure.Compute\"},{\"location\":\"westus\",\"name\":\"MicrosoftAzureSiteRecovery\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftAzureSiteRecovery\"},{\"location\":\"westus\",\"name\":\"MicrosoftBizTalkServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftBizTalkServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsAX\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsAX\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsGP\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsGP\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsNAV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsNAV\"},{\"location\":\"westus\",\"name\":\"MicrosoftHybridCloudStorage\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftHybridCloudStorage\"},{\"location\":\"westus\",\"name\":\"MicrosoftSharePoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSharePoint\"},{\"location\":\"westus\",\"name\":\"MicrosoftSQLServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSQLServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftVisualStudio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftVisualStudio\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerEssentials\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerEssentials\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerHPCPack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerHPCPack\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerRemoteDesktop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerRemoteDesktop\"},{\"location\":\"westus\",\"name\":\"midvision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/midvision\"},{\"location\":\"westus\",\"name\":\"miraclelinux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/miraclelinux\"},{\"location\":\"westus\",\"name\":\"miracl_linux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/miracl_linux\"},{\"location\":\"westus\",\"name\":\"mokxa-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mokxa-technologies\"},{\"location\":\"westus\",\"name\":\"moviemasher\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/moviemasher\"},{\"location\":\"westus\",\"name\":\"msopentech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/msopentech\"},{\"location\":\"westus\",\"name\":\"MSOpenTech.Extensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MSOpenTech.Extensions\"},{\"location\":\"westus\",\"name\":\"msrazuresapservices\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/msrazuresapservices\"},{\"location\":\"westus\",\"name\":\"mtnfog\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mtnfog\"},{\"location\":\"westus\",\"name\":\"mvp-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mvp-systems\"},{\"location\":\"westus\",\"name\":\"mxhero\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mxhero\"},{\"location\":\"westus\",\"name\":\"my-com\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/my-com\"},{\"location\":\"westus\",\"name\":\"namirial\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/namirial\"},{\"location\":\"westus\",\"name\":\"nasuni\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nasuni\"},{\"location\":\"westus\",\"name\":\"ncbi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ncbi\"},{\"location\":\"westus\",\"name\":\"netapp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/netapp\"},{\"location\":\"westus\",\"name\":\"netiq\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/netiq\"},{\"location\":\"westus\",\"name\":\"neusoft-neteye\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/neusoft-neteye\"},{\"location\":\"westus\",\"name\":\"new-signature\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/new-signature\"},{\"location\":\"westus\",\"name\":\"nextlimit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nextlimit\"},{\"location\":\"westus\",\"name\":\"nexus\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nexus\"},{\"location\":\"westus\",\"name\":\"nginxinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nginxinc\"},{\"location\":\"westus\",\"name\":\"nicepeopleatwork\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nicepeopleatwork\"},{\"location\":\"westus\",\"name\":\"nodejsapi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nodejsapi\"},{\"location\":\"westus\",\"name\":\"nuxeo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nuxeo\"},{\"location\":\"westus\",\"name\":\"officeclipsuite\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/officeclipsuite\"},{\"location\":\"westus\",\"name\":\"op5\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/op5\"},{\"location\":\"westus\",\"name\":\"opencell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opencell\"},{\"location\":\"westus\",\"name\":\"OpenLogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/OpenLogic\"},{\"location\":\"westus\",\"name\":\"openmeap\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/openmeap\"},{\"location\":\"westus\",\"name\":\"opennebulasystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opennebulasystems\"},{\"location\":\"westus\",\"name\":\"opentext\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opentext\"},{\"location\":\"westus\",\"name\":\"Oracle\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Oracle\"},{\"location\":\"westus\",\"name\":\"orfast-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/orfast-technologies\"},{\"location\":\"westus\",\"name\":\"orientdb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/orientdb\"},{\"location\":\"westus\",\"name\":\"osisoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/osisoft\"},{\"location\":\"westus\",\"name\":\"outsystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/outsystems\"},{\"location\":\"westus\",\"name\":\"paloaltonetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/paloaltonetworks\"},{\"location\":\"westus\",\"name\":\"panorama-necto\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/panorama-necto\"},{\"location\":\"westus\",\"name\":\"panzura-file-system\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/panzura-file-system\"},{\"location\":\"westus\",\"name\":\"pointmatter\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/pointmatter\"},{\"location\":\"westus\",\"name\":\"portalarchitects\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/portalarchitects\"},{\"location\":\"westus\",\"name\":\"predictionio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/predictionio\"},{\"location\":\"westus\",\"name\":\"predixion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/predixion\"},{\"location\":\"westus\",\"name\":\"prestashop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/prestashop\"},{\"location\":\"westus\",\"name\":\"prime-strategy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/prime-strategy\"},{\"location\":\"westus\",\"name\":\"primestream\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/primestream\"},{\"location\":\"westus\",\"name\":\"process-one\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/process-one\"},{\"location\":\"westus\",\"name\":\"profisee\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/profisee\"},{\"location\":\"westus\",\"name\":\"progelspa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/progelspa\"},{\"location\":\"westus\",\"name\":\"ptv_group\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ptv_group\"},{\"location\":\"westus\",\"name\":\"PuppetLabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs\"},{\"location\":\"westus\",\"name\":\"PuppetLabs.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs.Test\"},{\"location\":\"westus\",\"name\":\"pxlag_swiss\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/pxlag_swiss\"},{\"location\":\"westus\",\"name\":\"quales\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/quales\"},{\"location\":\"westus\",\"name\":\"qualysguard\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/qualysguard\"},{\"location\":\"westus\",\"name\":\"quasardb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/quasardb\"},{\"location\":\"westus\",\"name\":\"rancher\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rancher\"},{\"location\":\"westus\",\"name\":\"RedHat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RedHat\"},{\"location\":\"westus\",\"name\":\"redpoint-global\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/redpoint-global\"},{\"location\":\"westus\",\"name\":\"remotelearner\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/remotelearner\"},{\"location\":\"westus\",\"name\":\"revolution-analytics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/revolution-analytics\"},{\"location\":\"westus\",\"name\":\"RightScaleLinux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleLinux\"},{\"location\":\"westus\",\"name\":\"RightScaleWindowsServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleWindowsServer\"},{\"location\":\"westus\",\"name\":\"riverbed\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/riverbed\"},{\"location\":\"westus\",\"name\":\"RiverbedTechnology\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RiverbedTechnology\"},{\"location\":\"westus\",\"name\":\"rocketsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rocketsoftware\"},{\"location\":\"westus\",\"name\":\"rocket_software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rocket_software\"},{\"location\":\"westus\",\"name\":\"rp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rp\"},{\"location\":\"westus\",\"name\":\"saama\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/saama\"},{\"location\":\"westus\",\"name\":\"saltstack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/saltstack\"},{\"location\":\"westus\",\"name\":\"sap\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sap\"},{\"location\":\"westus\",\"name\":\"scalearc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/scalearc\"},{\"location\":\"westus\",\"name\":\"scalebase\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/scalebase\"},{\"location\":\"westus\",\"name\":\"seagate\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/seagate\"},{\"location\":\"westus\",\"name\":\"searchblox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/searchblox\"},{\"location\":\"westus\",\"name\":\"sensorberg\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sensorberg\"},{\"location\":\"westus\",\"name\":\"servoy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/servoy\"},{\"location\":\"westus\",\"name\":\"sharefile\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sharefile\"},{\"location\":\"westus\",\"name\":\"shavlik\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/shavlik\"},{\"location\":\"westus\",\"name\":\"sightapps\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sightapps\"},{\"location\":\"westus\",\"name\":\"sinefa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sinefa\"},{\"location\":\"westus\",\"name\":\"sios_datakeeper\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sios_datakeeper\"},{\"location\":\"westus\",\"name\":\"sisense\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sisense\"},{\"location\":\"westus\",\"name\":\"snip2code\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/snip2code\"},{\"location\":\"westus\",\"name\":\"softnas\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/softnas\"},{\"location\":\"westus\",\"name\":\"soha\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/soha\"},{\"location\":\"westus\",\"name\":\"solanolabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/solanolabs\"},{\"location\":\"westus\",\"name\":\"spacecurve\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/spacecurve\"},{\"location\":\"westus\",\"name\":\"spagobi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/spagobi\"},{\"location\":\"westus\",\"name\":\"sphere3d\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sphere3d\"},{\"location\":\"westus\",\"name\":\"stackato-platform-as-a-service\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stackato-platform-as-a-service\"},{\"location\":\"westus\",\"name\":\"stackstorm\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stackstorm\"},{\"location\":\"westus\",\"name\":\"starwind\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/starwind\"},{\"location\":\"westus\",\"name\":\"steelhive\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/steelhive\"},{\"location\":\"westus\",\"name\":\"stonefly\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stonefly\"},{\"location\":\"westus\",\"name\":\"stormshield\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stormshield\"},{\"location\":\"westus\",\"name\":\"storreduce\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/storreduce\"},{\"location\":\"westus\",\"name\":\"stratalux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stratalux\"},{\"location\":\"westus\",\"name\":\"sunview-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sunview-software\"},{\"location\":\"westus\",\"name\":\"SUSE\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/SUSE\"},{\"location\":\"westus\",\"name\":\"Symantec\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec\"},{\"location\":\"westus\",\"name\":\"Symantec.QA\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.QA\"},{\"location\":\"westus\",\"name\":\"Symantec.staging\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.staging\"},{\"location\":\"westus\",\"name\":\"Symantec.test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.test\"},{\"location\":\"westus\",\"name\":\"tactic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tactic\"},{\"location\":\"westus\",\"name\":\"talon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/talon\"},{\"location\":\"westus\",\"name\":\"targit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/targit\"},{\"location\":\"westus\",\"name\":\"tavendo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tavendo\"},{\"location\":\"westus\",\"name\":\"techdivision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/techdivision\"},{\"location\":\"westus\",\"name\":\"telepat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/telepat\"},{\"location\":\"westus\",\"name\":\"tenable\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tenable\"},{\"location\":\"westus\",\"name\":\"tentity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tentity\"},{\"location\":\"westus\",\"name\":\"Test.Barracuda.Azure.ConnectivityAgent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Barracuda.Azure.ConnectivityAgent\"},{\"location\":\"westus\",\"name\":\"Test.Gemalto.SafeNet.ProtectV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Gemalto.SafeNet.ProtectV\"},{\"location\":\"westus\",\"name\":\"Test.HP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.HP.AppDefender\"},{\"location\":\"westus\",\"name\":\"Test.NJHP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.NJHP.AppDefender\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity2\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity3\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity3\"},{\"location\":\"westus\",\"name\":\"Test1.NJHP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test1.NJHP.AppDefender\"},{\"location\":\"westus\",\"name\":\"thinkboxsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/thinkboxsoftware\"},{\"location\":\"westus\",\"name\":\"topdesk\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/topdesk\"},{\"location\":\"westus\",\"name\":\"torusware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/torusware\"},{\"location\":\"westus\",\"name\":\"transvault\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/transvault\"},{\"location\":\"westus\",\"name\":\"trendmicro\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/trendmicro\"},{\"location\":\"westus\",\"name\":\"TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"TrendMicro.DeepSecurity.Test2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity.Test2\"},{\"location\":\"westus\",\"name\":\"TrendMicro.PortalProtect\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.PortalProtect\"},{\"location\":\"westus\",\"name\":\"tsa-public-service\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tsa-public-service\"},{\"location\":\"westus\",\"name\":\"typesafe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/typesafe\"},{\"location\":\"westus\",\"name\":\"ubercloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ubercloud\"},{\"location\":\"westus\",\"name\":\"unidesk\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk\"},{\"location\":\"westus\",\"name\":\"unidesk-corp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk-corp\"},{\"location\":\"westus\",\"name\":\"usp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/usp\"},{\"location\":\"westus\",\"name\":\"vbot\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vbot\"},{\"location\":\"westus\",\"name\":\"vecompsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vecompsoftware\"},{\"location\":\"westus\",\"name\":\"veeam\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/veeam\"},{\"location\":\"westus\",\"name\":\"vidispine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vidispine\"},{\"location\":\"westus\",\"name\":\"vidizmo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vidizmo\"},{\"location\":\"westus\",\"name\":\"vircom\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vircom\"},{\"location\":\"westus\",\"name\":\"virtualworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/virtualworks\"},{\"location\":\"westus\",\"name\":\"vision_solutions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vision_solutions\"},{\"location\":\"westus\",\"name\":\"vmturbo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vmturbo\"},{\"location\":\"westus\",\"name\":\"Vormetric\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric\"},{\"location\":\"westus\",\"name\":\"Vormetric.TestExt\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric.TestExt\"},{\"location\":\"westus\",\"name\":\"Vormetric.VormetricTransparentEncryption\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric.VormetricTransparentEncryption\"},{\"location\":\"westus\",\"name\":\"vte\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vte\"},{\"location\":\"westus\",\"name\":\"WAD-VMSS.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD-VMSS.Test\"},{\"location\":\"westus\",\"name\":\"WAD2AI.Diagnostics.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2AI.Diagnostics.Test\"},{\"location\":\"westus\",\"name\":\"WAD2EventHub.Diagnostics.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2EventHub.Diagnostics.Test\"},{\"location\":\"westus\",\"name\":\"waratek\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/waratek\"},{\"location\":\"westus\",\"name\":\"warewolf-esb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/warewolf-esb\"},{\"location\":\"westus\",\"name\":\"watchfulsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/watchfulsoftware\"},{\"location\":\"westus\",\"name\":\"websense-apmailpe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/websense-apmailpe\"},{\"location\":\"westus\",\"name\":\"wmspanel\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/wmspanel\"},{\"location\":\"westus\",\"name\":\"workshare-technology\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/workshare-technology\"},{\"location\":\"westus\",\"name\":\"wowza\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/wowza\"},{\"location\":\"westus\",\"name\":\"xebialabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xebialabs\"},{\"location\":\"westus\",\"name\":\"xfinityinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xfinityinc\"},{\"location\":\"westus\",\"name\":\"xmpro\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xmpro\"},{\"location\":\"westus\",\"name\":\"xrm\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xrm\"},{\"location\":\"westus\",\"name\":\"xtremedata\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xtremedata\"},{\"location\":\"westus\",\"name\":\"yellowfin\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/yellowfin\"},{\"location\":\"westus\",\"name\":\"your-shop-online\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/your-shop-online\"},{\"location\":\"westus\",\"name\":\"zementis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zementis\"},{\"location\":\"westus\",\"name\":\"zend\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zend\"},{\"location\":\"westus\",\"name\":\"zoomdata\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zoomdata\"}]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '81011', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers?api-version=2018-06-01') .reply(200, "[{\"location\":\"westus\",\"name\":\"4psa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/4psa\"},{\"location\":\"westus\",\"name\":\"4ward365\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/4ward365\"},{\"location\":\"westus\",\"name\":\"7isolutions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/7isolutions\"},{\"location\":\"westus\",\"name\":\"a10networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/a10networks\"},{\"location\":\"westus\",\"name\":\"abiquo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/abiquo\"},{\"location\":\"westus\",\"name\":\"Acronis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis\"},{\"location\":\"westus\",\"name\":\"Acronis.Abokov.Backup\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Abokov.Backup\"},{\"location\":\"westus\",\"name\":\"Acronis.Backup\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis.Backup\"},{\"location\":\"westus\",\"name\":\"Acronis2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Acronis2\"},{\"location\":\"westus\",\"name\":\"actian_matrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/actian_matrix\"},{\"location\":\"westus\",\"name\":\"active-navigation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/active-navigation\"},{\"location\":\"westus\",\"name\":\"activeeon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/activeeon\"},{\"location\":\"westus\",\"name\":\"adam-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adam-software\"},{\"location\":\"westus\",\"name\":\"adatao\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adatao\"},{\"location\":\"westus\",\"name\":\"adobe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe\"},{\"location\":\"westus\",\"name\":\"adobe_test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adobe_test\"},{\"location\":\"westus\",\"name\":\"adra-match\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/adra-match\"},{\"location\":\"westus\",\"name\":\"advantech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech\"},{\"location\":\"westus\",\"name\":\"advantech-webaccess\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/advantech-webaccess\"},{\"location\":\"westus\",\"name\":\"aerospike\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aerospike\"},{\"location\":\"westus\",\"name\":\"aimsinnovation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aimsinnovation\"},{\"location\":\"westus\",\"name\":\"aiscaler-cache-control-ddos-and-url-rewriting-\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aiscaler-cache-control-ddos-and-url-rewriting-\"},{\"location\":\"westus\",\"name\":\"alachisoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alachisoft\"},{\"location\":\"westus\",\"name\":\"alertlogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alertlogic\"},{\"location\":\"westus\",\"name\":\"AlertLogic.Extension\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/AlertLogic.Extension\"},{\"location\":\"westus\",\"name\":\"algebraix-data\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/algebraix-data\"},{\"location\":\"westus\",\"name\":\"alldigital-brevity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alldigital-brevity\"},{\"location\":\"westus\",\"name\":\"alteryx\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/alteryx\"},{\"location\":\"westus\",\"name\":\"altiar\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/altiar\"},{\"location\":\"westus\",\"name\":\"appcelerator\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appcelerator\"},{\"location\":\"westus\",\"name\":\"appcitoinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appcitoinc\"},{\"location\":\"westus\",\"name\":\"appex-networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appex-networks\"},{\"location\":\"westus\",\"name\":\"appistry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appistry\"},{\"location\":\"westus\",\"name\":\"apprenda\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/apprenda\"},{\"location\":\"westus\",\"name\":\"appveyorci\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appveyorci\"},{\"location\":\"westus\",\"name\":\"appzero\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/appzero\"},{\"location\":\"westus\",\"name\":\"arangodb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/arangodb\"},{\"location\":\"westus\",\"name\":\"aras\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aras\"},{\"location\":\"westus\",\"name\":\"array_networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/array_networks\"},{\"location\":\"westus\",\"name\":\"aspera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aspera\"},{\"location\":\"westus\",\"name\":\"aspex-managed-cloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aspex-managed-cloud\"},{\"location\":\"westus\",\"name\":\"attunity_cloudbeam\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/attunity_cloudbeam\"},{\"location\":\"westus\",\"name\":\"auriq-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/auriq-systems\"},{\"location\":\"westus\",\"name\":\"avepoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/avepoint\"},{\"location\":\"westus\",\"name\":\"aviatrix-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/aviatrix-systems\"},{\"location\":\"westus\",\"name\":\"awingu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/awingu\"},{\"location\":\"westus\",\"name\":\"axway\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/axway\"},{\"location\":\"westus\",\"name\":\"azul\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/azul\"},{\"location\":\"westus\",\"name\":\"AzureRT.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/AzureRT.Test\"},{\"location\":\"westus\",\"name\":\"azuresyncfusion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/azuresyncfusion\"},{\"location\":\"westus\",\"name\":\"balabit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/balabit\"},{\"location\":\"westus\",\"name\":\"Barracuda.Azure.ConnectivityAgent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Barracuda.Azure.ConnectivityAgent\"},{\"location\":\"westus\",\"name\":\"barracudanetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/barracudanetworks\"},{\"location\":\"westus\",\"name\":\"basho\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/basho\"},{\"location\":\"westus\",\"name\":\"Bitnami\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Bitnami\"},{\"location\":\"westus\",\"name\":\"bizagi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bizagi\"},{\"location\":\"westus\",\"name\":\"biztalk360\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/biztalk360\"},{\"location\":\"westus\",\"name\":\"blackberry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/blackberry\"},{\"location\":\"westus\",\"name\":\"bluetalon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bluetalon\"},{\"location\":\"westus\",\"name\":\"boundlessgeo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/boundlessgeo\"},{\"location\":\"westus\",\"name\":\"boxless\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/boxless\"},{\"location\":\"westus\",\"name\":\"brocade_communications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/brocade_communications\"},{\"location\":\"westus\",\"name\":\"bryte\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bryte\"},{\"location\":\"westus\",\"name\":\"bssw\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bssw\"},{\"location\":\"westus\",\"name\":\"buddhalabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/buddhalabs\"},{\"location\":\"westus\",\"name\":\"bwappengine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/bwappengine\"},{\"location\":\"westus\",\"name\":\"Canonical\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical\"},{\"location\":\"westus\",\"name\":\"caringo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/caringo\"},{\"location\":\"westus\",\"name\":\"catechnologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/catechnologies\"},{\"location\":\"westus\",\"name\":\"cautelalabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cautelalabs\"},{\"location\":\"westus\",\"name\":\"cds\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cds\"},{\"location\":\"westus\",\"name\":\"certivox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/certivox\"},{\"location\":\"westus\",\"name\":\"checkpoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpoint\"},{\"location\":\"westus\",\"name\":\"checkpointsystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/checkpointsystems\"},{\"location\":\"westus\",\"name\":\"chef-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/chef-software\"},{\"location\":\"westus\",\"name\":\"Chef.Bootstrap.WindowsAzure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Chef.Bootstrap.WindowsAzure\"},{\"location\":\"westus\",\"name\":\"cherwell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cherwell\"},{\"location\":\"westus\",\"name\":\"circleci\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/circleci\"},{\"location\":\"westus\",\"name\":\"cires21\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cires21\"},{\"location\":\"westus\",\"name\":\"cisco\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cisco\"},{\"location\":\"westus\",\"name\":\"citrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/citrix\"},{\"location\":\"westus\",\"name\":\"clickberry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/clickberry\"},{\"location\":\"westus\",\"name\":\"cloud-cruiser\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloud-cruiser\"},{\"location\":\"westus\",\"name\":\"cloudbees\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees\"},{\"location\":\"westus\",\"name\":\"cloudbees-enterprise-jenkins\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbees-enterprise-jenkins\"},{\"location\":\"westus\",\"name\":\"cloudbolt-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudbolt-software\"},{\"location\":\"westus\",\"name\":\"cloudboost\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudboost\"},{\"location\":\"westus\",\"name\":\"cloudera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera\"},{\"location\":\"westus\",\"name\":\"cloudera1qaz2wsx\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudera1qaz2wsx\"},{\"location\":\"westus\",\"name\":\"cloudhouse\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudhouse\"},{\"location\":\"westus\",\"name\":\"cloudlink\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudlink\"},{\"location\":\"westus\",\"name\":\"CloudLink.SecureVM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLink.SecureVM\"},{\"location\":\"westus\",\"name\":\"CloudLinkEMC.SecureVM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM\"},{\"location\":\"westus\",\"name\":\"CloudLinkEMC.SecureVM.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CloudLinkEMC.SecureVM.Test\"},{\"location\":\"westus\",\"name\":\"cloudsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cloudsoft\"},{\"location\":\"westus\",\"name\":\"clustrix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/clustrix\"},{\"location\":\"westus\",\"name\":\"codelathe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/codelathe\"},{\"location\":\"westus\",\"name\":\"codenvy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/codenvy\"},{\"location\":\"westus\",\"name\":\"cohesive\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cohesive\"},{\"location\":\"westus\",\"name\":\"commvault\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/commvault\"},{\"location\":\"westus\",\"name\":\"companyname-short\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/companyname-short\"},{\"location\":\"westus\",\"name\":\"Confer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer\"},{\"location\":\"westus\",\"name\":\"Confer.TestSensor\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Confer.TestSensor\"},{\"location\":\"westus\",\"name\":\"consensys\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/consensys\"},{\"location\":\"westus\",\"name\":\"cordis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cordis\"},{\"location\":\"westus\",\"name\":\"corent-technology-pvt\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/corent-technology-pvt\"},{\"location\":\"westus\",\"name\":\"CoreOS\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/CoreOS\"},{\"location\":\"westus\",\"name\":\"cortical-io\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/cortical-io\"},{\"location\":\"westus\",\"name\":\"couchbase\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/couchbase\"},{\"location\":\"westus\",\"name\":\"credativ\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/credativ\"},{\"location\":\"westus\",\"name\":\"Dans.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans.Windows.App\"},{\"location\":\"westus\",\"name\":\"Dans2.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans2.Windows.App\"},{\"location\":\"westus\",\"name\":\"Dans3.Windows.App\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Dans3.Windows.App\"},{\"location\":\"westus\",\"name\":\"dataart\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataart\"},{\"location\":\"westus\",\"name\":\"datacastle\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datacastle\"},{\"location\":\"westus\",\"name\":\"Datadog.Agent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Datadog.Agent\"},{\"location\":\"westus\",\"name\":\"dataexpeditioninc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataexpeditioninc\"},{\"location\":\"westus\",\"name\":\"dataiku\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataiku\"},{\"location\":\"westus\",\"name\":\"datalayer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datalayer\"},{\"location\":\"westus\",\"name\":\"dataliberation\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dataliberation\"},{\"location\":\"westus\",\"name\":\"datastax\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datastax\"},{\"location\":\"westus\",\"name\":\"datasunrise\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/datasunrise\"},{\"location\":\"westus\",\"name\":\"defacto_global_\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/defacto_global_\"},{\"location\":\"westus\",\"name\":\"dell-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dell-software\"},{\"location\":\"westus\",\"name\":\"dell_software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dell_software\"},{\"location\":\"westus\",\"name\":\"denyall\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/denyall\"},{\"location\":\"westus\",\"name\":\"derdack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/derdack\"},{\"location\":\"westus\",\"name\":\"dgsecure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dgsecure\"},{\"location\":\"westus\",\"name\":\"docker\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/docker\"},{\"location\":\"westus\",\"name\":\"docscorp-us\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/docscorp-us\"},{\"location\":\"westus\",\"name\":\"dolbydeveloper\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dolbydeveloper\"},{\"location\":\"westus\",\"name\":\"dome9\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dome9\"},{\"location\":\"westus\",\"name\":\"donovapub\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/donovapub\"},{\"location\":\"westus\",\"name\":\"drone\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/drone\"},{\"location\":\"westus\",\"name\":\"dundas\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dundas\"},{\"location\":\"westus\",\"name\":\"dynatrace.ruxit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/dynatrace.ruxit\"},{\"location\":\"westus\",\"name\":\"easyterritory\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/easyterritory\"},{\"location\":\"westus\",\"name\":\"edevtech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/edevtech\"},{\"location\":\"westus\",\"name\":\"egress\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/egress\"},{\"location\":\"westus\",\"name\":\"eip\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eip\"},{\"location\":\"westus\",\"name\":\"eip-eipower\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eip-eipower\"},{\"location\":\"westus\",\"name\":\"elastacloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elastacloud\"},{\"location\":\"westus\",\"name\":\"elasticbox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elasticbox\"},{\"location\":\"westus\",\"name\":\"elfiqnetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/elfiqnetworks\"},{\"location\":\"westus\",\"name\":\"eloquera\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eloquera\"},{\"location\":\"westus\",\"name\":\"eperi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eperi\"},{\"location\":\"westus\",\"name\":\"equilibrium\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/equilibrium\"},{\"location\":\"westus\",\"name\":\"ESET\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET\"},{\"location\":\"westus\",\"name\":\"ESET.FileSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ESET.FileSecurity\"},{\"location\":\"westus\",\"name\":\"esri\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/esri\"},{\"location\":\"westus\",\"name\":\"eurotech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/eurotech\"},{\"location\":\"westus\",\"name\":\"exasol\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/exasol\"},{\"location\":\"westus\",\"name\":\"exit-games\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/exit-games\"},{\"location\":\"westus\",\"name\":\"expertime\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/expertime\"},{\"location\":\"westus\",\"name\":\"f5-networks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/f5-networks\"},{\"location\":\"westus\",\"name\":\"filebridge\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/filebridge\"},{\"location\":\"westus\",\"name\":\"firehost\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/firehost\"},{\"location\":\"westus\",\"name\":\"flexerasoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/flexerasoftware\"},{\"location\":\"westus\",\"name\":\"foghorn-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/foghorn-systems\"},{\"location\":\"westus\",\"name\":\"forscene\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/forscene\"},{\"location\":\"westus\",\"name\":\"fortinet\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fortinet\"},{\"location\":\"westus\",\"name\":\"fortycloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fortycloud\"},{\"location\":\"westus\",\"name\":\"fw\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/fw\"},{\"location\":\"westus\",\"name\":\"g-data-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/g-data-software\"},{\"location\":\"westus\",\"name\":\"gemalto-safenet\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/gemalto-safenet\"},{\"location\":\"westus\",\"name\":\"Gemalto.SafeNet.ProtectV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV\"},{\"location\":\"westus\",\"name\":\"Gemalto.SafeNet.ProtectV.Azure\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Gemalto.SafeNet.ProtectV.Azure\"},{\"location\":\"westus\",\"name\":\"GitHub\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/GitHub\"},{\"location\":\"westus\",\"name\":\"greathorn\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/greathorn\"},{\"location\":\"westus\",\"name\":\"greensql\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/greensql\"},{\"location\":\"westus\",\"name\":\"haivision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/haivision\"},{\"location\":\"westus\",\"name\":\"halobicloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/halobicloud\"},{\"location\":\"westus\",\"name\":\"hanu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hanu\"},{\"location\":\"westus\",\"name\":\"hewlett-packard\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hewlett-packard\"},{\"location\":\"westus\",\"name\":\"hortonworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/hortonworks\"},{\"location\":\"westus\",\"name\":\"humanlogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/humanlogic\"},{\"location\":\"westus\",\"name\":\"iaansys\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iaansys\"},{\"location\":\"westus\",\"name\":\"iamcloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iamcloud\"},{\"location\":\"westus\",\"name\":\"ibabs-eu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ibabs-eu\"},{\"location\":\"westus\",\"name\":\"imaginecommunications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imaginecommunications\"},{\"location\":\"westus\",\"name\":\"imc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imc\"},{\"location\":\"westus\",\"name\":\"imperva\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/imperva\"},{\"location\":\"westus\",\"name\":\"incredibuild\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/incredibuild\"},{\"location\":\"westus\",\"name\":\"infolibrarian\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/infolibrarian\"},{\"location\":\"westus\",\"name\":\"informatica\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica\"},{\"location\":\"westus\",\"name\":\"informatica-cloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/informatica-cloud\"},{\"location\":\"westus\",\"name\":\"infostrat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/infostrat\"},{\"location\":\"westus\",\"name\":\"intel\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/intel\"},{\"location\":\"westus\",\"name\":\"intelligent-plant-ltd\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/intelligent-plant-ltd\"},{\"location\":\"westus\",\"name\":\"iquest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/iquest\"},{\"location\":\"westus\",\"name\":\"ishlangu-load-balancer-adc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ishlangu-load-balancer-adc\"},{\"location\":\"westus\",\"name\":\"itelios\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/itelios\"},{\"location\":\"westus\",\"name\":\"jedox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jedox\"},{\"location\":\"westus\",\"name\":\"jelastic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jelastic\"},{\"location\":\"westus\",\"name\":\"jetnexus\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jetnexus\"},{\"location\":\"westus\",\"name\":\"jfrog\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jfrog\"},{\"location\":\"westus\",\"name\":\"jitterbit_integration\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/jitterbit_integration\"},{\"location\":\"westus\",\"name\":\"kaazing\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kaazing\"},{\"location\":\"westus\",\"name\":\"kaspersky_lab\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kaspersky_lab\"},{\"location\":\"westus\",\"name\":\"kemptech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kemptech\"},{\"location\":\"westus\",\"name\":\"kepion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kepion\"},{\"location\":\"westus\",\"name\":\"kollective\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/kollective\"},{\"location\":\"westus\",\"name\":\"le\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/le\"},{\"location\":\"westus\",\"name\":\"lieberlieber\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/lieberlieber\"},{\"location\":\"westus\",\"name\":\"liebsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/liebsoft\"},{\"location\":\"westus\",\"name\":\"literatu\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/literatu\"},{\"location\":\"westus\",\"name\":\"loadbalancer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/loadbalancer\"},{\"location\":\"westus\",\"name\":\"LocalTest.TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/LocalTest.TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"logi-analytics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/logi-analytics\"},{\"location\":\"westus\",\"name\":\"loginpeople\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/loginpeople\"},{\"location\":\"westus\",\"name\":\"logtrust\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/logtrust\"},{\"location\":\"westus\",\"name\":\"looker\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/looker\"},{\"location\":\"westus\",\"name\":\"luxoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/luxoft\"},{\"location\":\"westus\",\"name\":\"magelia\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/magelia\"},{\"location\":\"westus\",\"name\":\"manageengine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/manageengine\"},{\"location\":\"westus\",\"name\":\"mapr-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mapr-technologies\"},{\"location\":\"westus\",\"name\":\"mariadb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mariadb\"},{\"location\":\"westus\",\"name\":\"massiveanalytic-\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/massiveanalytic-\"},{\"location\":\"westus\",\"name\":\"McAfee.EndpointSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity\"},{\"location\":\"westus\",\"name\":\"McAfee.EndpointSecurity.test3\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/McAfee.EndpointSecurity.test3\"},{\"location\":\"westus\",\"name\":\"meanio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/meanio\"},{\"location\":\"westus\",\"name\":\"mediazenie\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mediazenie\"},{\"location\":\"westus\",\"name\":\"memsql\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/memsql\"},{\"location\":\"westus\",\"name\":\"mendix\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mendix\"},{\"location\":\"westus\",\"name\":\"mentalnotes\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mentalnotes\"},{\"location\":\"westus\",\"name\":\"mesosphere\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mesosphere\"},{\"location\":\"westus\",\"name\":\"metavistech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/metavistech\"},{\"location\":\"westus\",\"name\":\"mfiles\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mfiles\"},{\"location\":\"westus\",\"name\":\"Microsoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft\"},{\"location\":\"westus\",\"name\":\"microsoft-ads\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-ads\"},{\"location\":\"westus\",\"name\":\"microsoft-r-products\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/microsoft-r-products\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Applications\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Applications\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Backup.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Backup.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Diagnostics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Diagnostics\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Extensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Extensions\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.RecoveryServices\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.RecoveryServices\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Security\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.Security.Internal\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.Security.Internal\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.SiteRecovery.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.SiteRecovery.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Azure.WindowsFabric.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Azure.WindowsFabric.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.AzureCAT.AzureEnhancedMonitoring\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoring\"},{\"location\":\"westus\",\"name\":\"Microsoft.AzureCAT.AzureEnhancedMonitoringTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.AzureCAT.AzureEnhancedMonitoringTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Compute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Compute\"},{\"location\":\"westus\",\"name\":\"Microsoft.EnterpriseCloud.Monitoring\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring\"},{\"location\":\"westus\",\"name\":\"Microsoft.EnterpriseCloud.Monitoring.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.EnterpriseCloud.Monitoring.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.HpcCompute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcCompute\"},{\"location\":\"westus\",\"name\":\"Microsoft.HpcPack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.HpcPack\"},{\"location\":\"westus\",\"name\":\"Microsoft.OSTCExtensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions\"},{\"location\":\"westus\",\"name\":\"Microsoft.OSTCExtensions.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.OSTCExtensions.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.CMD\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.CMD\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Install\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Install\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Internal\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Internal\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Internal.Telemetry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Internal.Telemetry\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.PaaS\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.PaaS\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Preview\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Preview\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Release.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Release.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Telemetry\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Telemetry\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test.0\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test.0\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test.1\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test.1\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Test2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Test2\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.UpgradeTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.UpgradeTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.UtcTest\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.UtcTest\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf4Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf4Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.Wmf5\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.Wmf5\"},{\"location\":\"westus\",\"name\":\"Microsoft.Powershell.WmfRTM\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Powershell.WmfRTM\"},{\"location\":\"westus\",\"name\":\"Microsoft.SqlServer.Managability.IaaS.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Managability.IaaS.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.SqlServer.Management\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SqlServer.Management\"},{\"location\":\"westus\",\"name\":\"Microsoft.SystemCenter\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.SystemCenter\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.ETWTraceListenerService\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.ETWTraceListenerService\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.RemoteDebug\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Azure.RemoteDebug.Json\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Azure.RemoteDebug.Json\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.ServiceProfiler\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.ServiceProfiler.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.ServiceProfiler.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.VisualStudio.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.VisualStudio.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Windows.AzureRemoteApp.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.AzureRemoteApp.Test\"},{\"location\":\"westus\",\"name\":\"Microsoft.Windows.RemoteDesktop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.Windows.RemoteDesktop\"},{\"location\":\"westus\",\"name\":\"Microsoft.WindowsAzure.Compute\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Microsoft.WindowsAzure.Compute\"},{\"location\":\"westus\",\"name\":\"MicrosoftAzureSiteRecovery\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftAzureSiteRecovery\"},{\"location\":\"westus\",\"name\":\"MicrosoftBizTalkServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftBizTalkServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsAX\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsAX\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsGP\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsGP\"},{\"location\":\"westus\",\"name\":\"MicrosoftDynamicsNAV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftDynamicsNAV\"},{\"location\":\"westus\",\"name\":\"MicrosoftHybridCloudStorage\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftHybridCloudStorage\"},{\"location\":\"westus\",\"name\":\"MicrosoftSharePoint\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSharePoint\"},{\"location\":\"westus\",\"name\":\"MicrosoftSQLServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftSQLServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftVisualStudio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftVisualStudio\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerEssentials\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerEssentials\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerHPCPack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerHPCPack\"},{\"location\":\"westus\",\"name\":\"MicrosoftWindowsServerRemoteDesktop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServerRemoteDesktop\"},{\"location\":\"westus\",\"name\":\"midvision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/midvision\"},{\"location\":\"westus\",\"name\":\"miraclelinux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/miraclelinux\"},{\"location\":\"westus\",\"name\":\"miracl_linux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/miracl_linux\"},{\"location\":\"westus\",\"name\":\"mokxa-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mokxa-technologies\"},{\"location\":\"westus\",\"name\":\"moviemasher\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/moviemasher\"},{\"location\":\"westus\",\"name\":\"msopentech\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/msopentech\"},{\"location\":\"westus\",\"name\":\"MSOpenTech.Extensions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MSOpenTech.Extensions\"},{\"location\":\"westus\",\"name\":\"msrazuresapservices\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/msrazuresapservices\"},{\"location\":\"westus\",\"name\":\"mtnfog\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mtnfog\"},{\"location\":\"westus\",\"name\":\"mvp-systems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mvp-systems\"},{\"location\":\"westus\",\"name\":\"mxhero\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/mxhero\"},{\"location\":\"westus\",\"name\":\"my-com\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/my-com\"},{\"location\":\"westus\",\"name\":\"namirial\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/namirial\"},{\"location\":\"westus\",\"name\":\"nasuni\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nasuni\"},{\"location\":\"westus\",\"name\":\"ncbi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ncbi\"},{\"location\":\"westus\",\"name\":\"netapp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/netapp\"},{\"location\":\"westus\",\"name\":\"netiq\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/netiq\"},{\"location\":\"westus\",\"name\":\"neusoft-neteye\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/neusoft-neteye\"},{\"location\":\"westus\",\"name\":\"new-signature\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/new-signature\"},{\"location\":\"westus\",\"name\":\"nextlimit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nextlimit\"},{\"location\":\"westus\",\"name\":\"nexus\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nexus\"},{\"location\":\"westus\",\"name\":\"nginxinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nginxinc\"},{\"location\":\"westus\",\"name\":\"nicepeopleatwork\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nicepeopleatwork\"},{\"location\":\"westus\",\"name\":\"nodejsapi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nodejsapi\"},{\"location\":\"westus\",\"name\":\"nuxeo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/nuxeo\"},{\"location\":\"westus\",\"name\":\"officeclipsuite\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/officeclipsuite\"},{\"location\":\"westus\",\"name\":\"op5\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/op5\"},{\"location\":\"westus\",\"name\":\"opencell\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opencell\"},{\"location\":\"westus\",\"name\":\"OpenLogic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/OpenLogic\"},{\"location\":\"westus\",\"name\":\"openmeap\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/openmeap\"},{\"location\":\"westus\",\"name\":\"opennebulasystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opennebulasystems\"},{\"location\":\"westus\",\"name\":\"opentext\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/opentext\"},{\"location\":\"westus\",\"name\":\"Oracle\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Oracle\"},{\"location\":\"westus\",\"name\":\"orfast-technologies\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/orfast-technologies\"},{\"location\":\"westus\",\"name\":\"orientdb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/orientdb\"},{\"location\":\"westus\",\"name\":\"osisoft\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/osisoft\"},{\"location\":\"westus\",\"name\":\"outsystems\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/outsystems\"},{\"location\":\"westus\",\"name\":\"paloaltonetworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/paloaltonetworks\"},{\"location\":\"westus\",\"name\":\"panorama-necto\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/panorama-necto\"},{\"location\":\"westus\",\"name\":\"panzura-file-system\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/panzura-file-system\"},{\"location\":\"westus\",\"name\":\"pointmatter\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/pointmatter\"},{\"location\":\"westus\",\"name\":\"portalarchitects\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/portalarchitects\"},{\"location\":\"westus\",\"name\":\"predictionio\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/predictionio\"},{\"location\":\"westus\",\"name\":\"predixion\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/predixion\"},{\"location\":\"westus\",\"name\":\"prestashop\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/prestashop\"},{\"location\":\"westus\",\"name\":\"prime-strategy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/prime-strategy\"},{\"location\":\"westus\",\"name\":\"primestream\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/primestream\"},{\"location\":\"westus\",\"name\":\"process-one\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/process-one\"},{\"location\":\"westus\",\"name\":\"profisee\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/profisee\"},{\"location\":\"westus\",\"name\":\"progelspa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/progelspa\"},{\"location\":\"westus\",\"name\":\"ptv_group\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ptv_group\"},{\"location\":\"westus\",\"name\":\"PuppetLabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs\"},{\"location\":\"westus\",\"name\":\"PuppetLabs.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/PuppetLabs.Test\"},{\"location\":\"westus\",\"name\":\"pxlag_swiss\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/pxlag_swiss\"},{\"location\":\"westus\",\"name\":\"quales\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/quales\"},{\"location\":\"westus\",\"name\":\"qualysguard\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/qualysguard\"},{\"location\":\"westus\",\"name\":\"quasardb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/quasardb\"},{\"location\":\"westus\",\"name\":\"rancher\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rancher\"},{\"location\":\"westus\",\"name\":\"RedHat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RedHat\"},{\"location\":\"westus\",\"name\":\"redpoint-global\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/redpoint-global\"},{\"location\":\"westus\",\"name\":\"remotelearner\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/remotelearner\"},{\"location\":\"westus\",\"name\":\"revolution-analytics\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/revolution-analytics\"},{\"location\":\"westus\",\"name\":\"RightScaleLinux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleLinux\"},{\"location\":\"westus\",\"name\":\"RightScaleWindowsServer\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RightScaleWindowsServer\"},{\"location\":\"westus\",\"name\":\"riverbed\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/riverbed\"},{\"location\":\"westus\",\"name\":\"RiverbedTechnology\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/RiverbedTechnology\"},{\"location\":\"westus\",\"name\":\"rocketsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rocketsoftware\"},{\"location\":\"westus\",\"name\":\"rocket_software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rocket_software\"},{\"location\":\"westus\",\"name\":\"rp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/rp\"},{\"location\":\"westus\",\"name\":\"saama\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/saama\"},{\"location\":\"westus\",\"name\":\"saltstack\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/saltstack\"},{\"location\":\"westus\",\"name\":\"sap\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sap\"},{\"location\":\"westus\",\"name\":\"scalearc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/scalearc\"},{\"location\":\"westus\",\"name\":\"scalebase\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/scalebase\"},{\"location\":\"westus\",\"name\":\"seagate\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/seagate\"},{\"location\":\"westus\",\"name\":\"searchblox\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/searchblox\"},{\"location\":\"westus\",\"name\":\"sensorberg\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sensorberg\"},{\"location\":\"westus\",\"name\":\"servoy\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/servoy\"},{\"location\":\"westus\",\"name\":\"sharefile\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sharefile\"},{\"location\":\"westus\",\"name\":\"shavlik\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/shavlik\"},{\"location\":\"westus\",\"name\":\"sightapps\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sightapps\"},{\"location\":\"westus\",\"name\":\"sinefa\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sinefa\"},{\"location\":\"westus\",\"name\":\"sios_datakeeper\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sios_datakeeper\"},{\"location\":\"westus\",\"name\":\"sisense\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sisense\"},{\"location\":\"westus\",\"name\":\"snip2code\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/snip2code\"},{\"location\":\"westus\",\"name\":\"softnas\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/softnas\"},{\"location\":\"westus\",\"name\":\"soha\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/soha\"},{\"location\":\"westus\",\"name\":\"solanolabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/solanolabs\"},{\"location\":\"westus\",\"name\":\"spacecurve\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/spacecurve\"},{\"location\":\"westus\",\"name\":\"spagobi\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/spagobi\"},{\"location\":\"westus\",\"name\":\"sphere3d\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sphere3d\"},{\"location\":\"westus\",\"name\":\"stackato-platform-as-a-service\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stackato-platform-as-a-service\"},{\"location\":\"westus\",\"name\":\"stackstorm\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stackstorm\"},{\"location\":\"westus\",\"name\":\"starwind\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/starwind\"},{\"location\":\"westus\",\"name\":\"steelhive\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/steelhive\"},{\"location\":\"westus\",\"name\":\"stonefly\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stonefly\"},{\"location\":\"westus\",\"name\":\"stormshield\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stormshield\"},{\"location\":\"westus\",\"name\":\"storreduce\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/storreduce\"},{\"location\":\"westus\",\"name\":\"stratalux\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/stratalux\"},{\"location\":\"westus\",\"name\":\"sunview-software\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/sunview-software\"},{\"location\":\"westus\",\"name\":\"SUSE\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/SUSE\"},{\"location\":\"westus\",\"name\":\"Symantec\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec\"},{\"location\":\"westus\",\"name\":\"Symantec.QA\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.QA\"},{\"location\":\"westus\",\"name\":\"Symantec.staging\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.staging\"},{\"location\":\"westus\",\"name\":\"Symantec.test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Symantec.test\"},{\"location\":\"westus\",\"name\":\"tactic\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tactic\"},{\"location\":\"westus\",\"name\":\"talon\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/talon\"},{\"location\":\"westus\",\"name\":\"targit\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/targit\"},{\"location\":\"westus\",\"name\":\"tavendo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tavendo\"},{\"location\":\"westus\",\"name\":\"techdivision\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/techdivision\"},{\"location\":\"westus\",\"name\":\"telepat\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/telepat\"},{\"location\":\"westus\",\"name\":\"tenable\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tenable\"},{\"location\":\"westus\",\"name\":\"tentity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tentity\"},{\"location\":\"westus\",\"name\":\"Test.Barracuda.Azure.ConnectivityAgent\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Barracuda.Azure.ConnectivityAgent\"},{\"location\":\"westus\",\"name\":\"Test.Gemalto.SafeNet.ProtectV\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.Gemalto.SafeNet.ProtectV\"},{\"location\":\"westus\",\"name\":\"Test.HP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.HP.AppDefender\"},{\"location\":\"westus\",\"name\":\"Test.NJHP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.NJHP.AppDefender\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity2\"},{\"location\":\"westus\",\"name\":\"Test.TrendMicro.DeepSecurity3\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test.TrendMicro.DeepSecurity3\"},{\"location\":\"westus\",\"name\":\"Test1.NJHP.AppDefender\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Test1.NJHP.AppDefender\"},{\"location\":\"westus\",\"name\":\"thinkboxsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/thinkboxsoftware\"},{\"location\":\"westus\",\"name\":\"topdesk\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/topdesk\"},{\"location\":\"westus\",\"name\":\"torusware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/torusware\"},{\"location\":\"westus\",\"name\":\"transvault\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/transvault\"},{\"location\":\"westus\",\"name\":\"trendmicro\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/trendmicro\"},{\"location\":\"westus\",\"name\":\"TrendMicro.DeepSecurity\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity\"},{\"location\":\"westus\",\"name\":\"TrendMicro.DeepSecurity.Test2\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.DeepSecurity.Test2\"},{\"location\":\"westus\",\"name\":\"TrendMicro.PortalProtect\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/TrendMicro.PortalProtect\"},{\"location\":\"westus\",\"name\":\"tsa-public-service\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/tsa-public-service\"},{\"location\":\"westus\",\"name\":\"typesafe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/typesafe\"},{\"location\":\"westus\",\"name\":\"ubercloud\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/ubercloud\"},{\"location\":\"westus\",\"name\":\"unidesk\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk\"},{\"location\":\"westus\",\"name\":\"unidesk-corp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/unidesk-corp\"},{\"location\":\"westus\",\"name\":\"usp\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/usp\"},{\"location\":\"westus\",\"name\":\"vbot\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vbot\"},{\"location\":\"westus\",\"name\":\"vecompsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vecompsoftware\"},{\"location\":\"westus\",\"name\":\"veeam\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/veeam\"},{\"location\":\"westus\",\"name\":\"vidispine\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vidispine\"},{\"location\":\"westus\",\"name\":\"vidizmo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vidizmo\"},{\"location\":\"westus\",\"name\":\"vircom\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vircom\"},{\"location\":\"westus\",\"name\":\"virtualworks\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/virtualworks\"},{\"location\":\"westus\",\"name\":\"vision_solutions\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vision_solutions\"},{\"location\":\"westus\",\"name\":\"vmturbo\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vmturbo\"},{\"location\":\"westus\",\"name\":\"Vormetric\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric\"},{\"location\":\"westus\",\"name\":\"Vormetric.TestExt\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric.TestExt\"},{\"location\":\"westus\",\"name\":\"Vormetric.VormetricTransparentEncryption\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/Vormetric.VormetricTransparentEncryption\"},{\"location\":\"westus\",\"name\":\"vte\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/vte\"},{\"location\":\"westus\",\"name\":\"WAD-VMSS.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD-VMSS.Test\"},{\"location\":\"westus\",\"name\":\"WAD2AI.Diagnostics.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2AI.Diagnostics.Test\"},{\"location\":\"westus\",\"name\":\"WAD2EventHub.Diagnostics.Test\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/WAD2EventHub.Diagnostics.Test\"},{\"location\":\"westus\",\"name\":\"waratek\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/waratek\"},{\"location\":\"westus\",\"name\":\"warewolf-esb\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/warewolf-esb\"},{\"location\":\"westus\",\"name\":\"watchfulsoftware\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/watchfulsoftware\"},{\"location\":\"westus\",\"name\":\"websense-apmailpe\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/websense-apmailpe\"},{\"location\":\"westus\",\"name\":\"wmspanel\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/wmspanel\"},{\"location\":\"westus\",\"name\":\"workshare-technology\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/workshare-technology\"},{\"location\":\"westus\",\"name\":\"wowza\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/wowza\"},{\"location\":\"westus\",\"name\":\"xebialabs\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xebialabs\"},{\"location\":\"westus\",\"name\":\"xfinityinc\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xfinityinc\"},{\"location\":\"westus\",\"name\":\"xmpro\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xmpro\"},{\"location\":\"westus\",\"name\":\"xrm\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xrm\"},{\"location\":\"westus\",\"name\":\"xtremedata\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/xtremedata\"},{\"location\":\"westus\",\"name\":\"yellowfin\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/yellowfin\"},{\"location\":\"westus\",\"name\":\"your-shop-online\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/your-shop-online\"},{\"location\":\"westus\",\"name\":\"zementis\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zementis\"},{\"location\":\"westus\",\"name\":\"zend\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zend\"},{\"location\":\"westus\",\"name\":\"zoomdata\",\"id\":\"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/zoomdata\"}]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '81011', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_skus_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_skus_successfully.nock.js index 4f6a42ca58..2cb49ec5e0 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_skus_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_skus_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2008-R2-SP1\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2012-Datacenter\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-Datacenter\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2012-R2-Datacenter\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Nano-Docker-Test\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Nano-Docker-Test\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Nano-Server-Technical-Preview\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Nano-Server-Technical-Preview\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Technical-Preview-with-Containers\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Technical-Preview-with-Containers\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Windows-Server-Technical-Preview\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/Windows-Server-Technical-Preview\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '2077', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2008-R2-SP1\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2008-R2-SP1\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2012-Datacenter\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-Datacenter\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2012-R2-Datacenter\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Nano-Docker-Test\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Nano-Docker-Test\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Nano-Server-Technical-Preview\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Nano-Server-Technical-Preview\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"2016-Technical-Preview-with-Containers\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2016-Technical-Preview-with-Containers\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"Windows-Server-Technical-Preview\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/Windows-Server-Technical-Preview\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '2077', diff --git a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_successfully.nock.js b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_successfully.nock.js index 4774422f65..da54845ebb 100644 --- a/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_successfully.nock.js +++ b/test/recordings/computemanagementservice-tests/Compute_Management_Vm_Images_should_list_successfully.nock.js @@ -8,7 +8,7 @@ exports.setEnvironment = function() { exports.scopes = [[function (nock) { var result = nock('http://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203', @@ -26,7 +26,7 @@ nock('http://management.azure.com:443') function (nock) { var result = nock('https://management.azure.com:443') - .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?api-version=2017-12-01') + .get('/subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/providers/Microsoft.Compute/locations/westus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2012-R2-Datacenter/versions?api-version=2018-06-01') .reply(200, "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151120\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151120\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20151214\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20151214\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160126\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160126\"\r\n },\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"4.0.20160229\",\r\n \"id\": \"/Subscriptions/3ca49042-782a-4cc9-89b5-ee1b487fe115/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2012-R2-Datacenter/Versions/4.0.20160229\"\r\n }\r\n]", { 'cache-control': 'no-cache', pragma: 'no-cache', 'content-length': '1203',