UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

461 lines (455 loc) 23.2 kB
/* * 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 a Virtual Machine Scale Set. * * @extends models['Resource'] */ class VirtualMachineScaleSet extends models['Resource'] { /** * Create a VirtualMachineScaleSet. * @member {object} [sku] The virtual machine scale set sku. * @member {string} [sku.name] The sku name. * @member {string} [sku.tier] Specifies the tier of virtual machines in a * scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br * /> **Basic** * @member {number} [sku.capacity] Specifies the number of virtual machines * in the scale set. * @member {object} [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**. * @member {string} [plan.name] The plan ID. * @member {string} [plan.publisher] The publisher ID. * @member {string} [plan.product] Specifies the product of the image from * the marketplace. This is the same value as Offer under the imageReference * element. * @member {string} [plan.promotionCode] The promotion code. * @member {object} [upgradePolicy] The upgrade policy. * @member {string} [upgradePolicy.mode] Specifies the mode of an upgrade to * virtual machines in the scale set.<br /><br /> Possible values are:<br * /><br /> **Manual** - You control the application of updates to virtual * machines in the scale set. You do this by using the manualUpgrade * action.<br /><br /> **Automatic** - All virtual machines in the scale set * are automatically updated at the same time. Possible values include: * 'Automatic', 'Manual', 'Rolling' * @member {object} [upgradePolicy.rollingUpgradePolicy] The configuration * parameters used while performing a rolling upgrade. * @member {number} * [upgradePolicy.rollingUpgradePolicy.maxBatchInstancePercent] The maximum * percent of total virtual machine instances that will be upgraded * simultaneously by the rolling upgrade in one batch. As this is a maximum, * unhealthy instances in previous or future batches can cause the percentage * of instances in a batch to decrease to ensure higher reliability. The * default value for this parameter is 20%. * @member {number} * [upgradePolicy.rollingUpgradePolicy.maxUnhealthyInstancePercent] The * maximum percentage of the total virtual machine instances in the scale set * that can be simultaneously unhealthy, either as a result of being * upgraded, or by being found in an unhealthy state by the virtual machine * health checks before the rolling upgrade aborts. This constraint will be * checked prior to starting any batch. The default value for this parameter * is 20%. * @member {number} * [upgradePolicy.rollingUpgradePolicy.maxUnhealthyUpgradedInstancePercent] * The maximum percentage of upgraded virtual machine instances that can be * found to be in an unhealthy state. This check will happen after each batch * is upgraded. If this percentage is ever exceeded, the rolling update * aborts. The default value for this parameter is 20%. * @member {string} * [upgradePolicy.rollingUpgradePolicy.pauseTimeBetweenBatches] The wait time * between completing the update for all virtual machines in one batch and * starting the next batch. The time duration should be specified in ISO 8601 * format. The default value is 0 seconds (PT0S). * @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} [virtualMachineProfile] The virtual machine profile. * @member {object} [virtualMachineProfile.osProfile] Specifies the operating * system settings for the virtual machines in the scale set. * @member {string} [virtualMachineProfile.osProfile.computerNamePrefix] * Specifies the computer name prefix for all of the virtual machines in the * scale set. Computer name prefixes must be 1 to 15 characters long. * @member {string} [virtualMachineProfile.osProfile.adminUsername] Specifies * the name of the administrator account. <br><br> **Windows-only * restriction:** Cannot end in "." <br><br> **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". <br><br> **Minimum-length (Linux):** 1 character <br><br> * **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** * 20 characters <br><br><li> 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)<br><li> * 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) * @member {string} [virtualMachineProfile.osProfile.adminPassword] Specifies * the password of the administrator account. <br><br> **Minimum-length * (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 * characters <br><br> **Max-length (Windows):** 123 characters <br><br> * **Max-length (Linux):** 72 characters <br><br> **Complexity * requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has * lower characters <br>Has upper characters <br> Has a digit <br> Has a * special character (Regex match [\W_]) <br><br> **Disallowed values:** * "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", * "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> * 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) * <br><br> 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) * @member {string} [virtualMachineProfile.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. <br><br> 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) * @member {object} [virtualMachineProfile.osProfile.windowsConfiguration] * Specifies Windows operating system settings on the virtual machine. * @member {boolean} * [virtualMachineProfile.osProfile.windowsConfiguration.provisionVMAgent] * Indicates whether virtual machine agent should be provisioned on the * virtual machine. <br><br> 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 {boolean} * [virtualMachineProfile.osProfile.windowsConfiguration.enableAutomaticUpdates] * Indicates whether virtual machine is enabled for automatic updates. * @member {string} * [virtualMachineProfile.osProfile.windowsConfiguration.timeZone] Specifies * the time zone of the virtual machine. e.g. "Pacific Standard Time" * @member {array} * [virtualMachineProfile.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. * @member {object} * [virtualMachineProfile.osProfile.windowsConfiguration.winRM] Specifies the * Windows Remote Management listeners. This enables remote Windows * PowerShell. * @member {array} * [virtualMachineProfile.osProfile.windowsConfiguration.winRM.listeners] The * list of Windows Remote Management listeners * @member {object} [virtualMachineProfile.osProfile.linuxConfiguration] * Specifies the Linux operating system settings on the virtual machine. * <br><br>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) * <br><br> 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). * @member {boolean} * [virtualMachineProfile.osProfile.linuxConfiguration.disablePasswordAuthentication] * Specifies whether password authentication should be disabled. * @member {object} [virtualMachineProfile.osProfile.linuxConfiguration.ssh] * Specifies the ssh key configuration for a Linux OS. * @member {array} * [virtualMachineProfile.osProfile.linuxConfiguration.ssh.publicKeys] The * list of SSH public keys used to authenticate with linux based VMs. * @member {array} [virtualMachineProfile.osProfile.secrets] Specifies set of * certificates that should be installed onto the virtual machines in the * scale set. * @member {object} [virtualMachineProfile.storageProfile] Specifies the * storage settings for the virtual machine disks. * @member {object} [virtualMachineProfile.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. * @member {string} * [virtualMachineProfile.storageProfile.imageReference.publisher] The image * publisher. * @member {string} * [virtualMachineProfile.storageProfile.imageReference.offer] Specifies the * offer of the platform image or marketplace image used to create the * virtual machine. * @member {string} [virtualMachineProfile.storageProfile.imageReference.sku] * The image SKU. * @member {string} * [virtualMachineProfile.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. * @member {object} [virtualMachineProfile.storageProfile.osDisk] Specifies * information about the operating system disk used by the virtual machines * in the scale set. <br><br> For more information about disks, see [About * disks and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * @member {string} [virtualMachineProfile.storageProfile.osDisk.name] The * disk name. * @member {string} [virtualMachineProfile.storageProfile.osDisk.caching] * Specifies the caching requirements. <br><br> Possible values are: <br><br> * **None** <br><br> **ReadOnly** <br><br> **ReadWrite** <br><br> Default: * **None for Standard storage. ReadOnly for Premium storage**. Possible * values include: 'None', 'ReadOnly', 'ReadWrite' * @member {string} * [virtualMachineProfile.storageProfile.osDisk.createOption] Specifies how * the virtual machines in the scale set should be created.<br><br> The only * allowed value is: **FromImage** \u2013 This value is used when you are * using an image to create the virtual machine. If you are using a platform * image, you also use the imageReference element described above. If you are * using a marketplace image, you also use the plan element previously * described. Possible values include: 'fromImage', 'empty', 'attach' * @member {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. <br><br> * Possible values are: <br><br> **Windows** <br><br> **Linux**. Possible * values include: 'Windows', 'Linux' * @member {object} [virtualMachineProfile.storageProfile.osDisk.image] * Specifies information about the unmanaged user image to base the scale set * on. * @member {string} [virtualMachineProfile.storageProfile.osDisk.image.uri] * Specifies the virtual hard disk's uri. * @member {array} * [virtualMachineProfile.storageProfile.osDisk.vhdContainers] Specifies the * container urls that are used to store operating system disks for the scale * set. * @member {object} [virtualMachineProfile.storageProfile.osDisk.managedDisk] * The managed disk parameters. * @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' * @member {array} [virtualMachineProfile.storageProfile.dataDisks] Specifies * the parameters that are used to add data disks to the virtual machines in * the scale set. <br><br> For more information about disks, see [About disks * and VHDs for Azure virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * @member {object} [virtualMachineProfile.networkProfile] Specifies * properties of the network interfaces of the virtual machines in the scale * set. * @member {object} [virtualMachineProfile.networkProfile.healthProbe] A * reference to a load balancer probe used to determine the health of an * instance in the virtual machine scale set. The reference will be in the * form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. * @member {string} [virtualMachineProfile.networkProfile.healthProbe.id] The * ARM resource id in the form of * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... * @member {array} * [virtualMachineProfile.networkProfile.networkInterfaceConfigurations] The * list of network configurations. * @member {object} [virtualMachineProfile.diagnosticsProfile] Specifies the * boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15. * @member {object} * [virtualMachineProfile.diagnosticsProfile.bootDiagnostics] Boot * Diagnostics is a debugging feature which allows you to view Console Output * and Screenshot to diagnose VM status. <br><br> For Linux Virtual Machines, * you can easily view the output of your console log. <br><br> For both * Windows and Linux virtual machines, Azure also enables you to see a * screenshot of the VM from the hypervisor. * @member {boolean} * [virtualMachineProfile.diagnosticsProfile.bootDiagnostics.enabled] Whether * boot diagnostics should be enabled on the Virtual Machine. * @member {string} * [virtualMachineProfile.diagnosticsProfile.bootDiagnostics.storageUri] Uri * of the storage account to use for placing the console output and * screenshot. * @member {object} [virtualMachineProfile.extensionProfile] Specifies a * collection of settings for extensions installed on virtual machines in the * scale set. * @member {array} [virtualMachineProfile.extensionProfile.extensions] The * virtual machine scale set child extension resources. * @member {string} [virtualMachineProfile.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. * <br><br> Possible values are: <br><br> Windows_Client <br><br> * Windows_Server <br><br> If this element is included in a request for an * update, the value must match the initial value. This value cannot be * updated. <br><br> 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) * <br><br> Minimum api-version: 2015-06-15 * @member {string} [provisioningState] The provisioning state, which only * appears in the response. * @member {boolean} [overprovision] Specifies whether the Virtual Machine * Scale Set should be overprovisioned. * @member {string} [uniqueId] Specifies the ID which uniquely identifies a * Virtual Machine Scale Set. * @member {boolean} [singlePlacementGroup] When true this limits the scale * set to a single placement group, of max size 100 virtual machines. * @member {object} [identity] The identity of the virtual machine scale set, * if configured. * @member {string} [identity.principalId] The principal id of virtual * machine scale set identity. * @member {string} [identity.tenantId] The tenant id associated with the * virtual machine scale set. * @member {string} [identity.type] The type of identity used for the virtual * machine scale set. Currently, the only supported type is 'SystemAssigned', * which implicitly creates an identity. Possible values include: * 'SystemAssigned' * @member {array} [zones] The virtual machine scale set zones. */ constructor() { super(); } /** * Defines the metadata of VirtualMachineScaleSet * * @returns {object} metadata of VirtualMachineScaleSet * */ mapper() { return { required: false, serializedName: 'VirtualMachineScaleSet', type: { name: 'Composite', className: 'VirtualMachineScaleSet', 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' } } } }, sku: { required: false, serializedName: 'sku', type: { name: 'Composite', className: 'Sku' } }, plan: { required: false, serializedName: 'plan', type: { name: 'Composite', className: 'Plan' } }, upgradePolicy: { required: false, serializedName: 'properties.upgradePolicy', type: { name: 'Composite', className: 'UpgradePolicy' } }, virtualMachineProfile: { required: false, serializedName: 'properties.virtualMachineProfile', type: { name: 'Composite', className: 'VirtualMachineScaleSetVMProfile' } }, provisioningState: { required: false, readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' } }, overprovision: { required: false, serializedName: 'properties.overprovision', type: { name: 'Boolean' } }, uniqueId: { required: false, readOnly: true, serializedName: 'properties.uniqueId', type: { name: 'String' } }, singlePlacementGroup: { required: false, serializedName: 'properties.singlePlacementGroup', type: { name: 'Boolean' } }, identity: { required: false, serializedName: 'identity', type: { name: 'Composite', className: 'VirtualMachineScaleSetIdentity' } }, zones: { required: false, serializedName: 'zones', type: { name: 'Sequence', element: { required: false, serializedName: 'StringElementType', type: { name: 'String' } } } } } } }; } } module.exports = VirtualMachineScaleSet;