availability_sets
Creates, updates, deletes, gets or lists a availability_sets
resource.
Overview
Name | availability_sets |
Type | Resource |
Id | azure.compute.availability_sets |
Fields
- vw_availability_sets
- availability_sets
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
availabilitySetName | text | field from the properties object |
location | text | Resource location |
platform_fault_domain_count | text | field from the properties object |
platform_update_domain_count | text | field from the properties object |
proximity_placement_group | text | field from the properties object |
resourceGroupName | text | field from the properties object |
scheduled_events_policy | text | field from the properties object |
sku | text | Describes 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. |
statuses | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
type | text | Resource type |
virtual_machines | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | The instance view of a resource. |
sku | object | Describes 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. |
tags | object | Resource tags |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | availabilitySetName, resourceGroupName, subscriptionId | Retrieves information about an availability set. |
list | SELECT | resourceGroupName, subscriptionId | Lists all availability sets in a resource group. |
list_by_subscription | SELECT | subscriptionId | Lists all availability sets in a subscription. |
create_or_update | INSERT | availabilitySetName, resourceGroupName, subscriptionId | Create or update an availability set. |
delete | DELETE | availabilitySetName, resourceGroupName, subscriptionId | Delete an availability set. |
update | UPDATE | availabilitySetName, resourceGroupName, subscriptionId | Update an availability set. |
SELECT
examples
Lists all availability sets in a subscription.
- vw_availability_sets
- availability_sets
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 }}';
SELECT
id,
name,
location,
properties,
sku,
tags,
type
FROM azure.compute.availability_sets
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new availability_sets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.availability_sets (
availabilitySetName,
resourceGroupName,
subscriptionId,
properties,
sku,
location,
tags
)
SELECT
'{{ availabilitySetName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ sku }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: platformUpdateDomainCount
value: integer
- name: platformFaultDomainCount
value: integer
- name: virtualMachines
value:
- - name: id
value: string
- name: proximityPlacementGroup
value:
- name: id
value: string
- name: statuses
value:
- - name: code
value: string
- name: level
value: string
- name: displayStatus
value: string
- name: message
value: string
- name: time
value: string
- name: scheduledEventsPolicy
value:
- name: userInitiatedRedeploy
value:
- name: automaticallyApprove
value: boolean
- name: userInitiatedReboot
value:
- name: automaticallyApprove
value: boolean
- name: scheduledEventsAdditionalPublishingTargets
value:
- name: eventGridAndResourceGraph
value:
- name: enable
value: boolean
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: capacity
value: integer
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
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 }}';