sync_groups
Creates, updates, deletes, gets or lists a sync_groups
resource.
Overview
Name | sync_groups |
Type | Resource |
Id | azure.sql.sync_groups |
Fields
- vw_sync_groups
- sync_groups
Name | Datatype | Description |
---|---|---|
conflict_logging_retention_in_days | text | field from the properties object |
conflict_resolution_policy | text | field from the properties object |
databaseName | text | field from the properties object |
enable_conflict_logging | text | field from the properties object |
hub_database_password | text | field from the properties object |
hub_database_user_name | text | field from the properties object |
interval | text | field from the properties object |
last_sync_time | text | field from the properties object |
private_endpoint_name | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schema | text | field from the properties object |
serverName | text | field from the properties object |
sku | text | An ARM Resource SKU. |
subscriptionId | text | field from the properties object |
syncGroupName | text | field from the properties object |
sync_database_id | text | field from the properties object |
sync_state | text | field from the properties object |
use_private_link_connection | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a sync group. |
sku | object | An ARM Resource SKU. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Gets a sync group. |
list_by_database | SELECT | databaseName, resourceGroupName, serverName, subscriptionId | Lists sync groups under a hub database. |
create_or_update | INSERT | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Creates or updates a sync group. |
delete | DELETE | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Deletes a sync group. |
update | UPDATE | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Updates a sync group. |
cancel_sync | EXEC | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Cancels a sync group synchronization. |
refresh_hub_schema | EXEC | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Refreshes a hub database schema. |
trigger_sync | EXEC | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Triggers a sync group synchronization. |
SELECT
examples
Lists sync groups under a hub database.
- vw_sync_groups
- sync_groups
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 }}';
SELECT
properties,
sku
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.sync_groups (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
syncGroupName,
sku,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ syncGroupName }}',
'{{ sku }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: size
value: string
- name: family
value: string
- name: capacity
value: integer
- name: properties
value:
- name: interval
value: integer
- name: lastSyncTime
value: string
- name: conflictResolutionPolicy
value: string
- name: syncDatabaseId
value: string
- name: hubDatabaseUserName
value: string
- name: hubDatabasePassword
value: string
- name: syncState
value: string
- name: schema
value:
- name: tables
value:
- - name: columns
value:
- - name: quotedName
value: string
- name: dataSize
value: string
- name: dataType
value: string
- name: quotedName
value: string
- name: masterSyncMemberName
value: string
- name: enableConflictLogging
value: boolean
- name: conflictLoggingRetentionInDays
value: integer
- name: usePrivateLinkConnection
value: boolean
- name: privateEndpointName
value: string
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 }}';