Skip to main content

virtual_machine_scale_sets

Creates, updates, deletes, gets or lists a virtual_machine_scale_sets resource.

Overview

Namevirtual_machine_scale_sets
TypeResource
Idazure.compute.virtual_machine_scale_sets

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
additional_capabilitiestextfield from the properties object
automatic_repairs_policytextfield from the properties object
constrained_maximum_capacitytextfield from the properties object
do_not_run_extensions_on_overprovisioned_vmstextfield from the properties object
etagtextEtag is property returned in Create/Update/Get response of the VMSS, so that customer can supply it in the header to ensure optimistic updates
extended_locationtextfield from the properties object
host_grouptextfield from the properties object
identitytextIdentity for the virtual machine scale set.
locationtextResource location
orchestration_modetextfield from the properties object
overprovisiontextfield from the properties object
plantextSpecifies 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.
platform_fault_domain_counttextfield from the properties object
priority_mix_policytextfield from the properties object
provisioning_statetextfield from the properties object
proximity_placement_grouptextfield from the properties object
resiliency_policytextfield from the properties object
resourceGroupNametextfield from the properties object
scale_in_policytextfield from the properties object
scheduled_events_policytextfield from the properties object
single_placement_grouptextfield from the properties object
skutextDescribes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.
sku_profiletextfield from the properties object
spot_restore_policytextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
time_createdtextfield from the properties object
typetextResource type
unique_idtextfield from the properties object
upgrade_policytextfield from the properties object
virtual_machine_profiletextfield from the properties object
vmScaleSetNametextfield from the properties object
zonal_platform_fault_domain_align_modetextfield from the properties object
zone_balancetextfield from the properties object
zonestextThe virtual machine scale set zones.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, vmScaleSetNameDisplay information about a virtual machine scale set.
get_instance_viewSELECTresourceGroupName, subscriptionId, vmScaleSetNameGets the status of a VM scale set instance.
listSELECTresourceGroupName, subscriptionIdGets a list of all VM scale sets under a resource group.
list_allSELECTsubscriptionIdGets 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.
list_by_locationSELECTlocation, subscriptionIdGets all the VM scale sets under the specified subscription for the specified location.
create_or_updateINSERTresourceGroupName, subscriptionId, vmScaleSetNameCreate or update a VM scale set.
deleteDELETEresourceGroupName, subscriptionId, vmScaleSetNameDeletes a VM scale set.
updateUPDATEresourceGroupName, subscriptionId, vmScaleSetNameUpdate a VM scale set.
approve_rolling_upgradeEXECresourceGroupName, subscriptionId, vmScaleSetNameApprove upgrade on deferred rolling upgrades for OS disks in the virtual machines in a VM scale set.
convert_to_single_placement_groupEXECresourceGroupName, subscriptionId, vmScaleSetNameConverts SinglePlacementGroup property to false for a existing virtual machine scale set.
deallocateEXECresourceGroupName, subscriptionId, vmScaleSetNameDeallocates 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_instancesEXECresourceGroupName, subscriptionId, vmScaleSetName, data__instanceIdsDeletes virtual machines in a VM scale set.
force_recovery_service_fabric_platform_update_domain_walkEXECplatformUpdateDomain, resourceGroupName, subscriptionId, vmScaleSetNameManual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
perform_maintenanceEXECresourceGroupName, subscriptionId, vmScaleSetNamePerform 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_offEXECresourceGroupName, subscriptionId, vmScaleSetNamePower 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.
reapplyEXECresourceGroupName, subscriptionId, vmScaleSetNameReapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances
redeployEXECresourceGroupName, subscriptionId, vmScaleSetNameShuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
reimageEXECresourceGroupName, subscriptionId, vmScaleSetNameReimages (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_allEXECresourceGroupName, subscriptionId, vmScaleSetNameReimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
restartEXECresourceGroupName, subscriptionId, vmScaleSetNameRestarts one or more virtual machines in a VM scale set.
set_orchestration_service_stateEXECresourceGroupName, subscriptionId, vmScaleSetName, data__action, data__serviceNameChanges ServiceState property for a given service
startEXECresourceGroupName, subscriptionId, vmScaleSetNameStarts one or more virtual machines in a VM scale set.

SELECT examples

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,
additional_capabilities,
automatic_repairs_policy,
constrained_maximum_capacity,
do_not_run_extensions_on_overprovisioned_vms,
etag,
extended_location,
host_group,
identity,
location,
orchestration_mode,
overprovision,
plan,
platform_fault_domain_count,
priority_mix_policy,
provisioning_state,
proximity_placement_group,
resiliency_policy,
resourceGroupName,
scale_in_policy,
scheduled_events_policy,
single_placement_group,
sku,
sku_profile,
spot_restore_policy,
subscriptionId,
tags,
time_created,
type,
unique_id,
upgrade_policy,
virtual_machine_profile,
vmScaleSetName,
zonal_platform_fault_domain_align_mode,
zone_balance,
zones
FROM azure.compute.vw_virtual_machine_scale_sets
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new virtual_machine_scale_sets resource.

/*+ create */
INSERT INTO azure.compute.virtual_machine_scale_sets (
resourceGroupName,
subscriptionId,
vmScaleSetName,
sku,
plan,
properties,
identity,
zones,
extendedLocation,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vmScaleSetName }}',
'{{ sku }}',
'{{ plan }}',
'{{ properties }}',
'{{ identity }}',
'{{ zones }}',
'{{ extendedLocation }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a virtual_machine_scale_sets resource.

/*+ update */
UPDATE azure.compute.virtual_machine_scale_sets
SET
sku = '{{ sku }}',
plan = '{{ plan }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
zones = '{{ zones }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmScaleSetName = '{{ vmScaleSetName }}';

DELETE example

Deletes the specified virtual_machine_scale_sets resource.

/*+ delete */
DELETE FROM azure.compute.virtual_machine_scale_sets
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmScaleSetName = '{{ vmScaleSetName }}';