Skip to main content

sync_groups

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

Overview

Namesync_groups
TypeResource
Idazure.sql.sync_groups

Fields

NameDatatypeDescription
conflict_logging_retention_in_daystextfield from the properties object
conflict_resolution_policytextfield from the properties object
databaseNametextfield from the properties object
enable_conflict_loggingtextfield from the properties object
hub_database_passwordtextfield from the properties object
hub_database_user_nametextfield from the properties object
intervaltextfield from the properties object
last_sync_timetextfield from the properties object
private_endpoint_nametextfield from the properties object
resourceGroupNametextfield from the properties object
schematextfield from the properties object
serverNametextfield from the properties object
skutextAn ARM Resource SKU.
subscriptionIdtextfield from the properties object
syncGroupNametextfield from the properties object
sync_database_idtextfield from the properties object
sync_statetextfield from the properties object
use_private_link_connectiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameGets a sync group.
list_by_databaseSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdLists sync groups under a hub database.
create_or_updateINSERTdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameCreates or updates a sync group.
deleteDELETEdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameDeletes a sync group.
updateUPDATEdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameUpdates a sync group.
cancel_syncEXECdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameCancels a sync group synchronization.
refresh_hub_schemaEXECdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameRefreshes a hub database schema.
trigger_syncEXECdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameTriggers a sync group synchronization.

SELECT examples

Lists sync groups under a hub database.

SELECT
conflict_logging_retention_in_days,
conflict_resolution_policy,
databaseName,
enable_conflict_logging,
hub_database_password,
hub_database_user_name,
interval,
last_sync_time,
private_endpoint_name,
resourceGroupName,
schema,
serverName,
sku,
subscriptionId,
syncGroupName,
sync_database_id,
sync_state,
use_private_link_connection
FROM azure.sql.vw_sync_groups
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.sync_groups (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
syncGroupName,
sku,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ syncGroupName }}',
'{{ sku }}',
'{{ properties }}'
;

UPDATE example

Updates a sync_groups resource.

/*+ update */
UPDATE azure.sql.sync_groups
SET
sku = '{{ sku }}',
properties = '{{ properties }}'
WHERE
databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}';

DELETE example

Deletes the specified sync_groups resource.

/*+ delete */
DELETE FROM azure.sql.sync_groups
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}';