Skip to main content

availability_sets

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

Overview

Nameavailability_sets
TypeResource
Idazure.compute.availability_sets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource Id
namestringResource name
locationstringResource location
propertiesobjectThe instance view of a resource.
skuobjectSku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
tagsobjectResource tags
typestringResource type

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, availabilitySetName, subscriptionIdRetrieves information about an availability set.
listselectresourceGroupName, subscriptionIdLists all availability sets in a resource group.
list_by_subscriptionselectsubscriptionId$expandLists all availability sets in a subscription.
create_or_updateinsertresourceGroupName, availabilitySetName, subscriptionIdCreate or update an availability set.
updateupdateresourceGroupName, availabilitySetName, subscriptionIdUpdate an availability set.
deletedeleteresourceGroupName, availabilitySetName, subscriptionIdDelete an availability 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.

NameDatatypeDescription
availabilitySetNamestringThe name of the availability set.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringSubscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
$expandstringThe expand expression to apply to the operation. Allowed values are 'instanceView'.

SELECT examples

Retrieves information about an availability set.

SELECT
id,
name,
location,
properties,
sku,
tags,
type
FROM azure.compute.availability_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND availabilitySetName = '{{ availabilitySetName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or update an availability set.

INSERT INTO azure.compute.availability_sets (
data__properties,
data__sku,
data__location,
data__tags,
resourceGroupName,
availabilitySetName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ sku }}',
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ availabilitySetName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
sku,
tags,
type
;

UPDATE examples

Update an availability set.

UPDATE azure.compute.availability_sets
SET
data__properties = '{{ properties }}',
data__sku = '{{ sku }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND availabilitySetName = '{{ availabilitySetName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
sku,
tags,
type;

DELETE examples

Delete an availability set.

DELETE FROM azure.compute.availability_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND availabilitySetName = '{{ availabilitySetName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;