Skip to main content

instance_failover_groups

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

Overview

Nameinstance_failover_groups
TypeResource
Idazure.sql.instance_failover_groups

Fields

NameDatatypeDescription
failoverGroupNametextfield from the properties object
locationNametextfield from the properties object
managed_instance_pairstextfield from the properties object
partner_regionstextfield from the properties object
read_only_endpointtextfield from the properties object
read_write_endpointtextfield from the properties object
replication_roletextfield from the properties object
replication_statetextfield from the properties object
resourceGroupNametextfield from the properties object
secondary_typetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTfailoverGroupName, locationName, resourceGroupName, subscriptionIdGets a failover group.
list_by_locationSELECTlocationName, resourceGroupName, subscriptionIdLists the failover groups in a location.
create_or_updateINSERTfailoverGroupName, locationName, resourceGroupName, subscriptionIdCreates or updates a failover group.
deleteDELETEfailoverGroupName, locationName, resourceGroupName, subscriptionIdDeletes a failover group.
failoverEXECfailoverGroupName, locationName, resourceGroupName, subscriptionIdFails over from the current primary managed instance to this managed instance.
force_failover_allow_data_lossEXECfailoverGroupName, locationName, resourceGroupName, subscriptionIdFails over from the current primary managed instance to this managed instance. This operation might result in data loss.

SELECT examples

Lists the failover groups in a location.

SELECT
failoverGroupName,
locationName,
managed_instance_pairs,
partner_regions,
read_only_endpoint,
read_write_endpoint,
replication_role,
replication_state,
resourceGroupName,
secondary_type,
subscriptionId
FROM azure.sql.vw_instance_failover_groups
WHERE locationName = '{{ locationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.instance_failover_groups (
failoverGroupName,
locationName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ failoverGroupName }}',
'{{ locationName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified instance_failover_groups resource.

/*+ delete */
DELETE FROM azure.sql.instance_failover_groups
WHERE failoverGroupName = '{{ failoverGroupName }}'
AND locationName = '{{ locationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';