Skip to main content

availability_sets

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

Overview

Nameavailability_sets
TypeResource
Idazure.compute.availability_sets

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
availabilitySetNametextfield from the properties object
locationtextResource location
platform_fault_domain_counttextfield from the properties object
platform_update_domain_counttextfield from the properties object
proximity_placement_grouptextfield from the properties object
resourceGroupNametextfield from the properties object
scheduled_events_policytextfield 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.
statusestextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
typetextResource type
virtual_machinestextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTavailabilitySetName, resourceGroupName, subscriptionIdRetrieves information about an availability set.
listSELECTresourceGroupName, subscriptionIdLists all availability sets in a resource group.
list_by_subscriptionSELECTsubscriptionIdLists all availability sets in a subscription.
create_or_updateINSERTavailabilitySetName, resourceGroupName, subscriptionIdCreate or update an availability set.
deleteDELETEavailabilitySetName, resourceGroupName, subscriptionIdDelete an availability set.
updateUPDATEavailabilitySetName, resourceGroupName, subscriptionIdUpdate an availability set.

SELECT examples

Lists all availability sets in a subscription.

SELECT
id,
name,
availabilitySetName,
location,
platform_fault_domain_count,
platform_update_domain_count,
proximity_placement_group,
resourceGroupName,
scheduled_events_policy,
sku,
statuses,
subscriptionId,
tags,
type,
virtual_machines
FROM azure.compute.vw_availability_sets
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.compute.availability_sets (
availabilitySetName,
resourceGroupName,
subscriptionId,
properties,
sku,
location,
tags
)
SELECT
'{{ availabilitySetName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ sku }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a availability_sets resource.

/*+ update */
UPDATE azure.compute.availability_sets
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
tags = '{{ tags }}'
WHERE
availabilitySetName = '{{ availabilitySetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified availability_sets resource.

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