virtual_machine_scale_sets
Creates, updates, deletes, gets or lists a virtual_machine_scale_sets resource.
Overview
| Name | virtual_machine_scale_sets |
| Type | Resource |
| Id | azure.compute.virtual_machine_scale_sets |
Fields
The following fields are returned by SELECT queries:
- get
- list
- list_by_location
- list_all
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalCapabilities | object | Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. |
automaticRepairsPolicy | object | Policy for automatic repairs. |
constrainedMaximumCapacity | boolean | Optional property which must either be set to True or omitted. |
doNotRunExtensionsOnOverprovisionedVMs | boolean | When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. |
etag | string | Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates. |
extendedLocation | object | The extended location of the Virtual Machine Scale Set. |
externalHealthPolicy | object | Specifies the external health policy for the virtual machine scale set. |
highSpeedInterconnectPlacement | string | Specifies the high speed interconnect placement for the virtual machine scale set. Known values are: "None" and "Trunk". (None, Trunk) |
hostGroup | object | SubResource. |
identity | object | The identity of the virtual machine scale set, if configured. |
lifecycleHooksProfile | object | Specifies the lifecycle hooks profile for the virtual machine scale set. |
location | string | The geo-location where the resource lives. Required. |
orchestrationMode | string | Specifies the orchestration mode for the virtual machine scale set. Known values are: "Uniform" and "Flexible". (Uniform, Flexible) |
overprovision | boolean | Specifies whether the Virtual Machine Scale Set should be overprovisioned. |
placement | object | Placement section specifies the user-defined constraints for virtual machine scale set hardware placement. Minimum api-version: 2025-04-01. |
plan | object | 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. |
platformFaultDomainCount | integer | Fault Domain count for each placement group. |
priorityMixPolicy | object | Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. |
provisioningState | string | The provisioning state, which only appears in the response. |
proximityPlacementGroup | object | SubResource. |
resiliencyPolicy | object | Policy for Resiliency. |
scaleInPolicy | object | Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. |
scheduledEventsPolicy | object | The ScheduledEventsPolicy. |
singlePlacementGroup | boolean | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
sku | object | The virtual machine scale set sku. |
skuProfile | object | Specifies the sku profile for the virtual machine scale set. |
spotRestorePolicy | object | Specifies the Spot Restore properties for the virtual machine scale set. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Specifies the ID which uniquely identifies a Virtual Machine Scale Set. |
upgradePolicy | object | The upgrade policy. |
virtualMachineProfile | object | The virtual machine profile. |
zonalPlatformFaultDomainAlignMode | string | Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and "BestEffortAligned". (Aligned, Unaligned, BestEffortAligned) |
zoneBalance | boolean | Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. |
zones | array | The availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalCapabilities | object | Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. |
automaticRepairsPolicy | object | Policy for automatic repairs. |
constrainedMaximumCapacity | boolean | Optional property which must either be set to True or omitted. |
doNotRunExtensionsOnOverprovisionedVMs | boolean | When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. |
etag | string | Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates. |
extendedLocation | object | The extended location of the Virtual Machine Scale Set. |
externalHealthPolicy | object | Specifies the external health policy for the virtual machine scale set. |
highSpeedInterconnectPlacement | string | Specifies the high speed interconnect placement for the virtual machine scale set. Known values are: "None" and "Trunk". (None, Trunk) |
hostGroup | object | SubResource. |
identity | object | The identity of the virtual machine scale set, if configured. |
lifecycleHooksProfile | object | Specifies the lifecycle hooks profile for the virtual machine scale set. |
location | string | The geo-location where the resource lives. Required. |
orchestrationMode | string | Specifies the orchestration mode for the virtual machine scale set. Known values are: "Uniform" and "Flexible". (Uniform, Flexible) |
overprovision | boolean | Specifies whether the Virtual Machine Scale Set should be overprovisioned. |
placement | object | Placement section specifies the user-defined constraints for virtual machine scale set hardware placement. Minimum api-version: 2025-04-01. |
plan | object | 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. |
platformFaultDomainCount | integer | Fault Domain count for each placement group. |
priorityMixPolicy | object | Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. |
provisioningState | string | The provisioning state, which only appears in the response. |
proximityPlacementGroup | object | SubResource. |
resiliencyPolicy | object | Policy for Resiliency. |
scaleInPolicy | object | Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. |
scheduledEventsPolicy | object | The ScheduledEventsPolicy. |
singlePlacementGroup | boolean | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
sku | object | The virtual machine scale set sku. |
skuProfile | object | Specifies the sku profile for the virtual machine scale set. |
spotRestorePolicy | object | Specifies the Spot Restore properties for the virtual machine scale set. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Specifies the ID which uniquely identifies a Virtual Machine Scale Set. |
upgradePolicy | object | The upgrade policy. |
virtualMachineProfile | object | The virtual machine profile. |
zonalPlatformFaultDomainAlignMode | string | Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and "BestEffortAligned". (Aligned, Unaligned, BestEffortAligned) |
zoneBalance | boolean | Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. |
zones | array | The availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalCapabilities | object | Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. |
automaticRepairsPolicy | object | Policy for automatic repairs. |
constrainedMaximumCapacity | boolean | Optional property which must either be set to True or omitted. |
doNotRunExtensionsOnOverprovisionedVMs | boolean | When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. |
etag | string | Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates. |
extendedLocation | object | The extended location of the Virtual Machine Scale Set. |
externalHealthPolicy | object | Specifies the external health policy for the virtual machine scale set. |
highSpeedInterconnectPlacement | string | Specifies the high speed interconnect placement for the virtual machine scale set. Known values are: "None" and "Trunk". (None, Trunk) |
hostGroup | object | SubResource. |
identity | object | The identity of the virtual machine scale set, if configured. |
lifecycleHooksProfile | object | Specifies the lifecycle hooks profile for the virtual machine scale set. |
location | string | The geo-location where the resource lives. Required. |
orchestrationMode | string | Specifies the orchestration mode for the virtual machine scale set. Known values are: "Uniform" and "Flexible". (Uniform, Flexible) |
overprovision | boolean | Specifies whether the Virtual Machine Scale Set should be overprovisioned. |
placement | object | Placement section specifies the user-defined constraints for virtual machine scale set hardware placement. Minimum api-version: 2025-04-01. |
plan | object | 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. |
platformFaultDomainCount | integer | Fault Domain count for each placement group. |
priorityMixPolicy | object | Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. |
provisioningState | string | The provisioning state, which only appears in the response. |
proximityPlacementGroup | object | SubResource. |
resiliencyPolicy | object | Policy for Resiliency. |
scaleInPolicy | object | Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. |
scheduledEventsPolicy | object | The ScheduledEventsPolicy. |
singlePlacementGroup | boolean | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
sku | object | The virtual machine scale set sku. |
skuProfile | object | Specifies the sku profile for the virtual machine scale set. |
spotRestorePolicy | object | Specifies the Spot Restore properties for the virtual machine scale set. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Specifies the ID which uniquely identifies a Virtual Machine Scale Set. |
upgradePolicy | object | The upgrade policy. |
virtualMachineProfile | object | The virtual machine profile. |
zonalPlatformFaultDomainAlignMode | string | Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and "BestEffortAligned". (Aligned, Unaligned, BestEffortAligned) |
zoneBalance | boolean | Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. |
zones | array | The availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalCapabilities | object | Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. |
automaticRepairsPolicy | object | Policy for automatic repairs. |
constrainedMaximumCapacity | boolean | Optional property which must either be set to True or omitted. |
doNotRunExtensionsOnOverprovisionedVMs | boolean | When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. |
etag | string | Etag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates. |
extendedLocation | object | The extended location of the Virtual Machine Scale Set. |
externalHealthPolicy | object | Specifies the external health policy for the virtual machine scale set. |
highSpeedInterconnectPlacement | string | Specifies the high speed interconnect placement for the virtual machine scale set. Known values are: "None" and "Trunk". (None, Trunk) |
hostGroup | object | SubResource. |
identity | object | The identity of the virtual machine scale set, if configured. |
lifecycleHooksProfile | object | Specifies the lifecycle hooks profile for the virtual machine scale set. |
location | string | The geo-location where the resource lives. Required. |
orchestrationMode | string | Specifies the orchestration mode for the virtual machine scale set. Known values are: "Uniform" and "Flexible". (Uniform, Flexible) |
overprovision | boolean | Specifies whether the Virtual Machine Scale Set should be overprovisioned. |
placement | object | Placement section specifies the user-defined constraints for virtual machine scale set hardware placement. Minimum api-version: 2025-04-01. |
plan | object | 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. |
platformFaultDomainCount | integer | Fault Domain count for each placement group. |
priorityMixPolicy | object | Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. |
provisioningState | string | The provisioning state, which only appears in the response. |
proximityPlacementGroup | object | SubResource. |
resiliencyPolicy | object | Policy for Resiliency. |
scaleInPolicy | object | Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. |
scheduledEventsPolicy | object | The ScheduledEventsPolicy. |
singlePlacementGroup | boolean | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
sku | object | The virtual machine scale set sku. |
skuProfile | object | Specifies the sku profile for the virtual machine scale set. |
spotRestorePolicy | object | Specifies the Spot Restore properties for the virtual machine scale set. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeCreated | string (date-time) | Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uniqueId | string | Specifies the ID which uniquely identifies a Virtual Machine Scale Set. |
upgradePolicy | object | The upgrade policy. |
virtualMachineProfile | object | The virtual machine profile. |
zonalPlatformFaultDomainAlignMode | string | Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count. Known values are: "Aligned", "Unaligned", and "BestEffortAligned". (Aligned, Unaligned, BestEffortAligned) |
zoneBalance | boolean | Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. |
zones | array | The availability zones. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, vm_scale_set_name, subscription_id | $expand | Display information about a virtual machine scale set. |
list | select | resource_group_name, subscription_id | Gets a list of all VM scale sets under a resource group. | |
list_by_location | select | location, subscription_id | Gets all the VM scale sets under the specified subscription for the specified location. | |
list_all | select | subscription_id | Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. | |
create_or_update | insert | resource_group_name, vm_scale_set_name, subscription_id, location | Create or update a VM scale set. | |
update | update | resource_group_name, vm_scale_set_name, subscription_id | Update a VM scale set. | |
create_or_update | replace | resource_group_name, vm_scale_set_name, subscription_id, location | Create or update a VM scale set. | |
delete | delete | resource_group_name, vm_scale_set_name, subscription_id | forceDeletion | Deletes a VM scale set. |
list_skus | exec | resource_group_name, vm_scale_set_name, subscription_id | Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. | |
get_instance_view | exec | resource_group_name, vm_scale_set_name, subscription_id | Gets the status of a VM scale set instance. | |
get_os_upgrade_history | exec | resource_group_name, vm_scale_set_name, subscription_id | Gets list of OS upgrades on a VM scale set instance. | |
approve_rolling_upgrade | exec | resource_group_name, vm_scale_set_name, subscription_id | Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set. | |
convert_to_single_placement_group | exec | resource_group_name, vm_scale_set_name, subscription_id | Converts SinglePlacementGroup property to false for a existing virtual machine scale set. | |
deallocate | exec | resource_group_name, vm_scale_set_name, subscription_id | hibernate | Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. |
delete_instances | exec | resource_group_name, vm_scale_set_name, subscription_id, instanceIds | forceDeletion | Deletes virtual machines in a VM scale set. |
force_recovery_service_fabric_platform_update_domain_walk | exec | resource_group_name, vm_scale_set_name, subscription_id, platformUpdateDomain | zone, placementGroupId | Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. |
update_instances | exec | resource_group_name, vm_scale_set_name, subscription_id, instanceIds | Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. | |
perform_maintenance | exec | resource_group_name, vm_scale_set_name, subscription_id | 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/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications _. | |
power_off | exec | resource_group_name, vm_scale_set_name, subscription_id | skipShutdown | 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. Instead, use deallocate to release resources and avoid charges. |
reapply | exec | resource_group_name, vm_scale_set_name, subscription_id | Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances. | |
redeploy | exec | resource_group_name, vm_scale_set_name, subscription_id | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. | |
reimage | exec | resource_group_name, vm_scale_set_name, subscription_id | Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. | |
reimage_all | exec | resource_group_name, vm_scale_set_name, subscription_id | Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. | |
restart | exec | resource_group_name, vm_scale_set_name, subscription_id | Restarts one or more virtual machines in a VM scale set. | |
set_orchestration_service_state | exec | resource_group_name, vm_scale_set_name, subscription_id, serviceName, action | Changes ServiceState property for a given service. | |
start | exec | resource_group_name, vm_scale_set_name, subscription_id | Starts one or more virtual machines in a VM scale set. | |
scale_out | exec | resource_group_name, vm_scale_set_name, subscription_id, capacity | Scales out one or more virtual machines in a VM scale set. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
location | string | The location name. Required. |
platformUpdateDomain | integer | The platform update domain for which a manual recovery walk is requested. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vm_scale_set_name | string | The name of the VM scale set. Required. |
$expand | string | The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation. "userData" Default value is None. |
forceDeletion | boolean | Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview). Default value is None. |
hibernate | boolean | Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only). Default value is None. |
placementGroupId | string | The placement group id for which the manual recovery walk is requested. Default value is None. |
skipShutdown | boolean | The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified. Default value is None. |
zone | string | The zone in which the manual recovery walk is requested for cross zone virtual machine scale set. Default value is None. |
SELECT examples
- get
- list
- list_by_location
- list_all
Display information about a virtual machine scale set.
SELECT
id,
name,
additionalCapabilities,
automaticRepairsPolicy,
constrainedMaximumCapacity,
doNotRunExtensionsOnOverprovisionedVMs,
etag,
extendedLocation,
externalHealthPolicy,
highSpeedInterconnectPlacement,
hostGroup,
identity,
lifecycleHooksProfile,
location,
orchestrationMode,
overprovision,
placement,
plan,
platformFaultDomainCount,
priorityMixPolicy,
provisioningState,
proximityPlacementGroup,
resiliencyPolicy,
scaleInPolicy,
scheduledEventsPolicy,
singlePlacementGroup,
sku,
skuProfile,
spotRestorePolicy,
systemData,
tags,
timeCreated,
type,
uniqueId,
upgradePolicy,
virtualMachineProfile,
zonalPlatformFaultDomainAlignMode,
zoneBalance,
zones
FROM azure.compute.virtual_machine_scale_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;
Gets a list of all VM scale sets under a resource group.
SELECT
id,
name,
additionalCapabilities,
automaticRepairsPolicy,
constrainedMaximumCapacity,
doNotRunExtensionsOnOverprovisionedVMs,
etag,
extendedLocation,
externalHealthPolicy,
highSpeedInterconnectPlacement,
hostGroup,
identity,
lifecycleHooksProfile,
location,
orchestrationMode,
overprovision,
placement,
plan,
platformFaultDomainCount,
priorityMixPolicy,
provisioningState,
proximityPlacementGroup,
resiliencyPolicy,
scaleInPolicy,
scheduledEventsPolicy,
singlePlacementGroup,
sku,
skuProfile,
spotRestorePolicy,
systemData,
tags,
timeCreated,
type,
uniqueId,
upgradePolicy,
virtualMachineProfile,
zonalPlatformFaultDomainAlignMode,
zoneBalance,
zones
FROM azure.compute.virtual_machine_scale_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all the VM scale sets under the specified subscription for the specified location.
SELECT
id,
name,
additionalCapabilities,
automaticRepairsPolicy,
constrainedMaximumCapacity,
doNotRunExtensionsOnOverprovisionedVMs,
etag,
extendedLocation,
externalHealthPolicy,
highSpeedInterconnectPlacement,
hostGroup,
identity,
lifecycleHooksProfile,
location,
orchestrationMode,
overprovision,
placement,
plan,
platformFaultDomainCount,
priorityMixPolicy,
provisioningState,
proximityPlacementGroup,
resiliencyPolicy,
scaleInPolicy,
scheduledEventsPolicy,
singlePlacementGroup,
sku,
skuProfile,
spotRestorePolicy,
systemData,
tags,
timeCreated,
type,
uniqueId,
upgradePolicy,
virtualMachineProfile,
zonalPlatformFaultDomainAlignMode,
zoneBalance,
zones
FROM azure.compute.virtual_machine_scale_sets
WHERE location = '{{ location }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
SELECT
id,
name,
additionalCapabilities,
automaticRepairsPolicy,
constrainedMaximumCapacity,
doNotRunExtensionsOnOverprovisionedVMs,
etag,
extendedLocation,
externalHealthPolicy,
highSpeedInterconnectPlacement,
hostGroup,
identity,
lifecycleHooksProfile,
location,
orchestrationMode,
overprovision,
placement,
plan,
platformFaultDomainCount,
priorityMixPolicy,
provisioningState,
proximityPlacementGroup,
resiliencyPolicy,
scaleInPolicy,
scheduledEventsPolicy,
singlePlacementGroup,
sku,
skuProfile,
spotRestorePolicy,
systemData,
tags,
timeCreated,
type,
uniqueId,
upgradePolicy,
virtualMachineProfile,
zonalPlatformFaultDomainAlignMode,
zoneBalance,
zones
FROM azure.compute.virtual_machine_scale_sets
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update a VM scale set.
INSERT INTO azure.compute.virtual_machine_scale_sets (
tags,
location,
sku,
plan,
properties,
identity,
zones,
extendedLocation,
placement,
resource_group_name,
vm_scale_set_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ sku }}',
'{{ plan }}',
'{{ properties }}',
'{{ identity }}',
'{{ zones }}',
'{{ extendedLocation }}',
'{{ placement }}',
'{{ resource_group_name }}',
'{{ vm_scale_set_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
extendedLocation,
identity,
location,
placement,
plan,
properties,
sku,
systemData,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: virtual_machine_scale_sets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the virtual_machine_scale_sets resource.
- name: vm_scale_set_name
value: "{{ vm_scale_set_name }}"
description: Required parameter for the virtual_machine_scale_sets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the virtual_machine_scale_sets resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: sku
description: |
The virtual machine scale set sku.
value:
name: "{{ name }}"
tier: "{{ tier }}"
capacity: {{ capacity }}
- name: plan
description: |
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**.
value:
name: "{{ name }}"
publisher: "{{ publisher }}"
product: "{{ product }}"
promotionCode: "{{ promotionCode }}"
- name: properties
description: |
Describes the properties of a Virtual Machine Scale Set.
value:
upgradePolicy:
mode: "{{ mode }}"
rollingUpgradePolicy:
maxBatchInstancePercent: {{ maxBatchInstancePercent }}
maxUnhealthyInstancePercent: {{ maxUnhealthyInstancePercent }}
maxUnhealthyUpgradedInstancePercent: {{ maxUnhealthyUpgradedInstancePercent }}
pauseTimeBetweenBatches: "{{ pauseTimeBetweenBatches }}"
enableCrossZoneUpgrade: {{ enableCrossZoneUpgrade }}
prioritizeUnhealthyInstances: {{ prioritizeUnhealthyInstances }}
rollbackFailedInstancesOnPolicyBreach: {{ rollbackFailedInstancesOnPolicyBreach }}
maxSurge: {{ maxSurge }}
automaticOSUpgradePolicy:
enableAutomaticOSUpgrade: {{ enableAutomaticOSUpgrade }}
disableAutomaticRollback: {{ disableAutomaticRollback }}
useRollingUpgradePolicy: {{ useRollingUpgradePolicy }}
osRollingUpgradeDeferral: {{ osRollingUpgradeDeferral }}
scheduledEventsPolicy:
userInitiatedRedeploy:
automaticallyApprove: {{ automaticallyApprove }}
userInitiatedReboot:
automaticallyApprove: {{ automaticallyApprove }}
scheduledEventsAdditionalPublishingTargets:
eventGridAndResourceGraph:
enable: {{ enable }}
scheduledEventsApiVersion: "{{ scheduledEventsApiVersion }}"
allInstancesDown:
automaticallyApprove: {{ automaticallyApprove }}
automaticRepairsPolicy:
enabled: {{ enabled }}
gracePeriod: "{{ gracePeriod }}"
repairAction: "{{ repairAction }}"
virtualMachineProfile:
osProfile:
computerNamePrefix: "{{ computerNamePrefix }}"
adminUsername: "{{ adminUsername }}"
adminPassword: "{{ adminPassword }}"
customData: "{{ customData }}"
windowsConfiguration:
provisionVMAgent: {{ provisionVMAgent }}
enableAutomaticUpdates: {{ enableAutomaticUpdates }}
timeZone: "{{ timeZone }}"
additionalUnattendContent:
- passName: "{{ passName }}"
componentName: "{{ componentName }}"
settingName: "{{ settingName }}"
content: "{{ content }}"
patchSettings:
patchMode: "{{ patchMode }}"
enableHotpatching: {{ enableHotpatching }}
assessmentMode: "{{ assessmentMode }}"
automaticByPlatformSettings: "{{ automaticByPlatformSettings }}"
winRM:
listeners: "{{ listeners }}"
enableVMAgentPlatformUpdates: {{ enableVMAgentPlatformUpdates }}
linuxConfiguration:
disablePasswordAuthentication: {{ disablePasswordAuthentication }}
ssh:
publicKeys: "{{ publicKeys }}"
provisionVMAgent: {{ provisionVMAgent }}
patchSettings:
patchMode: "{{ patchMode }}"
assessmentMode: "{{ assessmentMode }}"
automaticByPlatformSettings: "{{ automaticByPlatformSettings }}"
enableVMAgentPlatformUpdates: {{ enableVMAgentPlatformUpdates }}
secrets:
- sourceVault:
id: "{{ id }}"
vaultCertificates: "{{ vaultCertificates }}"
allowExtensionOperations: {{ allowExtensionOperations }}
requireGuestProvisionSignal: {{ requireGuestProvisionSignal }}
storageProfile:
imageReference:
id: "{{ id }}"
publisher: "{{ publisher }}"
offer: "{{ offer }}"
sku: "{{ sku }}"
version: "{{ version }}"
exactVersion: "{{ exactVersion }}"
sharedGalleryImageId: "{{ sharedGalleryImageId }}"
communityGalleryImageId: "{{ communityGalleryImageId }}"
osDisk:
name: "{{ name }}"
caching: "{{ caching }}"
writeAcceleratorEnabled: {{ writeAcceleratorEnabled }}
createOption: "{{ createOption }}"
diffDiskSettings:
option: "{{ option }}"
placement: "{{ placement }}"
enableFullCaching: {{ enableFullCaching }}
diskSizeGB: {{ diskSizeGB }}
storageFaultDomainAlignment: "{{ storageFaultDomainAlignment }}"
osType: "{{ osType }}"
image:
uri: "{{ uri }}"
vhdContainers:
- "{{ vhdContainers }}"
managedDisk:
storageAccountType: "{{ storageAccountType }}"
diskEncryptionSet: "{{ diskEncryptionSet }}"
securityProfile: "{{ securityProfile }}"
deleteOption: "{{ deleteOption }}"
dataDisks:
- name: "{{ name }}"
lun: {{ lun }}
caching: "{{ caching }}"
writeAcceleratorEnabled: {{ writeAcceleratorEnabled }}
createOption: "{{ createOption }}"
diskSizeGB: {{ diskSizeGB }}
storageFaultDomainAlignment: "{{ storageFaultDomainAlignment }}"
managedDisk:
storageAccountType: "{{ storageAccountType }}"
diskEncryptionSet: "{{ diskEncryptionSet }}"
securityProfile: "{{ securityProfile }}"
diskIOPSReadWrite: {{ diskIOPSReadWrite }}
diskMBpsReadWrite: {{ diskMBpsReadWrite }}
deleteOption: "{{ deleteOption }}"
diskControllerType: "{{ diskControllerType }}"
networkProfile:
healthProbe:
id: "{{ id }}"
networkInterfaceConfigurations:
- name: "{{ name }}"
properties:
primary: {{ primary }}
enableAcceleratedNetworking: {{ enableAcceleratedNetworking }}
disableTcpStateTracking: {{ disableTcpStateTracking }}
enableFpga: {{ enableFpga }}
networkSecurityGroup: "{{ networkSecurityGroup }}"
dnsSettings: "{{ dnsSettings }}"
ipConfigurations: "{{ ipConfigurations }}"
enableIPForwarding: {{ enableIPForwarding }}
deleteOption: "{{ deleteOption }}"
auxiliaryMode: "{{ auxiliaryMode }}"
auxiliarySku: "{{ auxiliarySku }}"
tags: "{{ tags }}"
networkApiVersion: "{{ networkApiVersion }}"
interconnectGroupProfile:
interconnectGroup:
id: "{{ id }}"
subgroups:
- id: "{{ id }}"
securityProfile:
uefiSettings:
secureBootEnabled: {{ secureBootEnabled }}
vTpmEnabled: {{ vTpmEnabled }}
encryptionAtHost: {{ encryptionAtHost }}
securityType: "{{ securityType }}"
encryptionIdentity:
userAssignedIdentityResourceId: "{{ userAssignedIdentityResourceId }}"
proxyAgentSettings:
enabled: {{ enabled }}
mode: "{{ mode }}"
keyIncarnationId: {{ keyIncarnationId }}
wireServer:
mode: "{{ mode }}"
inVMAccessControlProfileReferenceId: "{{ inVMAccessControlProfileReferenceId }}"
imds:
mode: "{{ mode }}"
inVMAccessControlProfileReferenceId: "{{ inVMAccessControlProfileReferenceId }}"
addProxyAgentExtension: {{ addProxyAgentExtension }}
diagnosticsProfile:
bootDiagnostics:
enabled: {{ enabled }}
storageUri: "{{ storageUri }}"
extensionProfile:
extensions:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
properties:
forceUpdateTag: "{{ forceUpdateTag }}"
publisher: "{{ publisher }}"
type: "{{ type }}"
typeHandlerVersion: "{{ typeHandlerVersion }}"
autoUpgradeMinorVersion: {{ autoUpgradeMinorVersion }}
enableAutomaticUpgrade: {{ enableAutomaticUpgrade }}
settings: "{{ settings }}"
protectedSettings: "{{ protectedSettings }}"
provisioningState: "{{ provisioningState }}"
provisionAfterExtensions: "{{ provisionAfterExtensions }}"
suppressFailures: {{ suppressFailures }}
protectedSettingsFromKeyVault: "{{ protectedSettingsFromKeyVault }}"
extensionsTimeBudget: "{{ extensionsTimeBudget }}"
licenseType: "{{ licenseType }}"
priority: "{{ priority }}"
evictionPolicy: "{{ evictionPolicy }}"
billingProfile:
maxPrice: {{ maxPrice }}
scheduledEventsProfile:
terminateNotificationProfile:
notBeforeTimeout: "{{ notBeforeTimeout }}"
enable: {{ enable }}
osImageNotificationProfile:
notBeforeTimeout: "{{ notBeforeTimeout }}"
enable: {{ enable }}
userData: "{{ userData }}"
capacityReservation:
capacityReservationGroup:
id: "{{ id }}"
interconnectBlockProfile:
interconnectBlock:
id: "{{ id }}"
applicationProfile:
galleryApplications:
- tags: "{{ tags }}"
order: {{ order }}
packageReferenceId: "{{ packageReferenceId }}"
configurationReference: "{{ configurationReference }}"
treatFailureAsDeploymentFailure: {{ treatFailureAsDeploymentFailure }}
enableAutomaticUpgrade: {{ enableAutomaticUpgrade }}
hardwareProfile:
vmSizeProperties:
vCPUsAvailable: {{ vCPUsAvailable }}
vCPUsPerCore: {{ vCPUsPerCore }}
serviceArtifactReference:
id: "{{ id }}"
securityPostureReference:
id: "{{ id }}"
excludeExtensions:
- "{{ excludeExtensions }}"
isOverridable: {{ isOverridable }}
timeCreated: "{{ timeCreated }}"
provisioningState: "{{ provisioningState }}"
overprovision: {{ overprovision }}
doNotRunExtensionsOnOverprovisionedVMs: {{ doNotRunExtensionsOnOverprovisionedVMs }}
uniqueId: "{{ uniqueId }}"
singlePlacementGroup: {{ singlePlacementGroup }}
zoneBalance: {{ zoneBalance }}
platformFaultDomainCount: {{ platformFaultDomainCount }}
proximityPlacementGroup:
id: "{{ id }}"
hostGroup:
id: "{{ id }}"
additionalCapabilities:
ultraSSDEnabled: {{ ultraSSDEnabled }}
hibernationEnabled: {{ hibernationEnabled }}
enableFips1403Encryption: {{ enableFips1403Encryption }}
scaleInPolicy:
rules:
- "{{ rules }}"
forceDeletion: {{ forceDeletion }}
prioritizeUnhealthyVMs: {{ prioritizeUnhealthyVMs }}
orchestrationMode: "{{ orchestrationMode }}"
spotRestorePolicy:
enabled: {{ enabled }}
restoreTimeout: "{{ restoreTimeout }}"
priorityMixPolicy:
baseRegularPriorityCount: {{ baseRegularPriorityCount }}
regularPriorityPercentageAboveBase: {{ regularPriorityPercentageAboveBase }}
timeCreated: "{{ timeCreated }}"
constrainedMaximumCapacity: {{ constrainedMaximumCapacity }}
resiliencyPolicy:
resilientVMCreationPolicy:
enabled: {{ enabled }}
resilientVMDeletionPolicy:
enabled: {{ enabled }}
automaticZoneRebalancingPolicy:
enabled: {{ enabled }}
rebalanceStrategy: "{{ rebalanceStrategy }}"
rebalanceBehavior: "{{ rebalanceBehavior }}"
zoneAllocationPolicy:
maxZoneCount: {{ maxZoneCount }}
maxInstancePercentPerZonePolicy:
enabled: {{ enabled }}
value: {{ value }}
operationRecoverySettings:
restartRecoveryPolicy:
enabled: {{ enabled }}
startRecoveryPolicy:
enabled: {{ enabled }}
reimageRecoveryPolicy:
enabled: {{ enabled }}
zonalPlatformFaultDomainAlignMode: "{{ zonalPlatformFaultDomainAlignMode }}"
skuProfile:
vmSizes:
- name: "{{ name }}"
rank: {{ rank }}
allocationStrategy: "{{ allocationStrategy }}"
automaticSkuMigrationPolicy:
enabled: {{ enabled }}
highSpeedInterconnectPlacement: "{{ highSpeedInterconnectPlacement }}"
lifecycleHooksProfile:
lifecycleHooks:
- type: "{{ type }}"
waitDuration: "{{ waitDuration }}"
defaultAction: "{{ defaultAction }}"
externalHealthPolicy:
enabled: {{ enabled }}
expiryDuration: "{{ expiryDuration }}"
gracePeriod: "{{ gracePeriod }}"
- name: identity
description: |
The identity of the virtual machine scale set, if configured.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: zones
value:
- "{{ zones }}"
description: |
The availability zones.
- name: extendedLocation
description: |
The extended location of the Virtual Machine Scale Set.
value:
name: "{{ name }}"
type: "{{ type }}"
- name: placement
description: |
Placement section specifies the user-defined constraints for virtual machine scale set hardware placement. Minimum api-version: 2025-04-01.
value:
zonePlacementPolicy: "{{ zonePlacementPolicy }}"
includeZones:
- "{{ includeZones }}"
excludeZones:
- "{{ excludeZones }}"
UPDATE examples
- update
Update a VM scale set.
UPDATE azure.compute.virtual_machine_scale_sets
SET
tags = '{{ tags }}',
sku = '{{ sku }}',
plan = '{{ plan }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
zones = '{{ zones }}',
placement = '{{ placement }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
identity,
location,
placement,
plan,
properties,
sku,
systemData,
tags,
type,
zones;
REPLACE examples
- create_or_update
Create or update a VM scale set.
REPLACE azure.compute.virtual_machine_scale_sets
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
plan = '{{ plan }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
zones = '{{ zones }}',
extendedLocation = '{{ extendedLocation }}',
placement = '{{ placement }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
identity,
location,
placement,
plan,
properties,
sku,
systemData,
tags,
type,
zones;
DELETE examples
- delete
Deletes a VM scale set.
DELETE FROM azure.compute.virtual_machine_scale_sets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND forceDeletion = '{{ forceDeletion }}'
;
Lifecycle Methods
- list_skus
- get_instance_view
- get_os_upgrade_history
- approve_rolling_upgrade
- convert_to_single_placement_group
- deallocate
- delete_instances
- force_recovery_service_fabric_platform_update_domain_walk
- update_instances
- perform_maintenance
- power_off
- reapply
- redeploy
- reimage
- reimage_all
- restart
- set_orchestration_service_state
- start
- scale_out
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
EXEC azure.compute.virtual_machine_scale_sets.list_skus
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the status of a VM scale set instance.
EXEC azure.compute.virtual_machine_scale_sets.get_instance_view
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets list of OS upgrades on a VM scale set instance.
EXEC azure.compute.virtual_machine_scale_sets.get_os_upgrade_history
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Approve upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set.
EXEC azure.compute.virtual_machine_scale_sets.approve_rolling_upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
EXEC azure.compute.virtual_machine_scale_sets.convert_to_single_placement_group
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"activePlacementGroupId": "{{ activePlacementGroupId }}"
}'
;
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
EXEC azure.compute.virtual_machine_scale_sets.deallocate
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@hibernate={{ hibernate }}
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Deletes virtual machines in a VM scale set.
EXEC azure.compute.virtual_machine_scale_sets.delete_instances
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@forceDeletion={{ forceDeletion }}
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
EXEC azure.compute.virtual_machine_scale_sets.force_recovery_service_fabric_platform_update_domain_walk
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@platformUpdateDomain='{{ platformUpdateDomain }}' --required,
@zone='{{ zone }}',
@placementGroupId='{{ placementGroupId }}'
;
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
EXEC azure.compute.virtual_machine_scale_sets.update_instances
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
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/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications _.
EXEC azure.compute.virtual_machine_scale_sets.perform_maintenance
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
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. Instead, use deallocate to release resources and avoid charges.
EXEC azure.compute.virtual_machine_scale_sets.power_off
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@skipShutdown={{ skipShutdown }}
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances.
EXEC azure.compute.virtual_machine_scale_sets.reapply
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
EXEC azure.compute.virtual_machine_scale_sets.redeploy
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
EXEC azure.compute.virtual_machine_scale_sets.reimage
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"tempDisk": {{ tempDisk }},
"exactVersion": "{{ exactVersion }}",
"osProfile": "{{ osProfile }}",
"forceUpdateOSDiskForEphemeral": {{ forceUpdateOSDiskForEphemeral }},
"instanceIds": "{{ instanceIds }}"
}'
;
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
EXEC azure.compute.virtual_machine_scale_sets.reimage_all
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Restarts one or more virtual machines in a VM scale set.
EXEC azure.compute.virtual_machine_scale_sets.restart
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Changes ServiceState property for a given service.
EXEC azure.compute.virtual_machine_scale_sets.set_orchestration_service_state
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"serviceName": "{{ serviceName }}",
"action": "{{ action }}"
}'
;
Starts one or more virtual machines in a VM scale set.
EXEC azure.compute.virtual_machine_scale_sets.start
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"instanceIds": "{{ instanceIds }}"
}'
;
Scales out one or more virtual machines in a VM scale set.
EXEC azure.compute.virtual_machine_scale_sets.scale_out
@resource_group_name='{{ resource_group_name }}' --required,
@vm_scale_set_name='{{ vm_scale_set_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"capacity": {{ capacity }},
"properties": "{{ properties }}"
}'
;