Skip to main content

sql_virtual_machine_groups

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

Overview

Namesql_virtual_machine_groups
TypeResource
Idazure.sql_vm.sql_virtual_machine_groups

Fields

NameDatatypeDescription
cluster_configurationtextfield from the properties object
cluster_manager_typetextfield from the properties object
locationtextResource location.
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
scale_typetextfield from the properties object
sqlVirtualMachineGroupNametextfield from the properties object
sql_image_offertextfield from the properties object
sql_image_skutextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
wsfc_domain_profiletextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, sqlVirtualMachineGroupName, subscriptionIdGets a SQL virtual machine group.
listSELECTsubscriptionIdGets all SQL virtual machine groups in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets all SQL virtual machine groups in a resource group.
create_or_updateINSERTresourceGroupName, sqlVirtualMachineGroupName, subscriptionId, data__locationCreates or updates a SQL virtual machine group.
deleteDELETEresourceGroupName, sqlVirtualMachineGroupName, subscriptionIdDeletes a SQL virtual machine group.
updateUPDATEresourceGroupName, sqlVirtualMachineGroupName, subscriptionIdUpdates SQL virtual machine group tags.

SELECT examples

Gets all SQL virtual machine groups in a subscription.

SELECT
cluster_configuration,
cluster_manager_type,
location,
provisioning_state,
resourceGroupName,
scale_type,
sqlVirtualMachineGroupName,
sql_image_offer,
sql_image_sku,
subscriptionId,
system_data,
tags,
wsfc_domain_profile
FROM azure.sql_vm.vw_sql_virtual_machine_groups
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql_vm.sql_virtual_machine_groups (
resourceGroupName,
sqlVirtualMachineGroupName,
subscriptionId,
data__location,
location,
tags,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ sqlVirtualMachineGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;

UPDATE example

Updates a sql_virtual_machine_groups resource.

/*+ update */
UPDATE azure.sql_vm.sql_virtual_machine_groups
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineGroupName = '{{ sqlVirtualMachineGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified sql_virtual_machine_groups resource.

/*+ delete */
DELETE FROM azure.sql_vm.sql_virtual_machine_groups
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sqlVirtualMachineGroupName = '{{ sqlVirtualMachineGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';