sync_members
Creates, updates, deletes, gets or lists a sync_members
resource.
Overview
Name | sync_members |
Type | Resource |
Id | azure.sql.sync_members |
Fields
- vw_sync_members
- sync_members
Name | Datatype | Description |
---|---|---|
databaseName | text | field from the properties object |
database_name | text | field from the properties object |
database_type | text | field from the properties object |
password | text | field from the properties object |
private_endpoint_name | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
server_name | text | field from the properties object |
sql_server_database_id | text | field from the properties object |
subscriptionId | text | field from the properties object |
syncGroupName | text | field from the properties object |
syncMemberName | text | field from the properties object |
sync_agent_id | text | field from the properties object |
sync_direction | text | field from the properties object |
sync_member_azure_database_resource_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 |
user_name | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a sync member. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberName | Gets a sync member. |
list_by_sync_group | SELECT | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName | Lists sync members in the given sync group. |
create_or_update | INSERT | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberName | Creates or updates a sync member. |
delete | DELETE | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberName | Deletes a sync member. |
update | UPDATE | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberName | Updates an existing sync member. |
refresh_member_schema | EXEC | databaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberName | Refreshes a sync member database schema. |
SELECT
examples
Lists sync members in the given sync group.
- vw_sync_members
- sync_members
SELECT
databaseName,
database_name,
database_type,
password,
private_endpoint_name,
resourceGroupName,
serverName,
server_name,
sql_server_database_id,
subscriptionId,
syncGroupName,
syncMemberName,
sync_agent_id,
sync_direction,
sync_member_azure_database_resource_id,
sync_state,
use_private_link_connection,
user_name
FROM azure.sql.vw_sync_members
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}';
SELECT
properties
FROM azure.sql.sync_members
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new sync_members
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.sync_members (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
syncGroupName,
syncMemberName,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ syncGroupName }}',
'{{ syncMemberName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: databaseType
value: string
- name: syncAgentId
value: string
- name: sqlServerDatabaseId
value: string
- name: syncMemberAzureDatabaseResourceId
value: string
- name: usePrivateLinkConnection
value: boolean
- name: privateEndpointName
value: string
- name: serverName
value: string
- name: databaseName
value: string
- name: userName
value: string
- name: password
value: string
- name: syncDirection
value: string
- name: syncState
value: string
UPDATE
example
Updates a sync_members
resource.
/*+ update */
UPDATE azure.sql.sync_members
SET
properties = '{{ properties }}'
WHERE
databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}'
AND syncMemberName = '{{ syncMemberName }}';
DELETE
example
Deletes the specified sync_members
resource.
/*+ delete */
DELETE FROM azure.sql.sync_members
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}'
AND syncMemberName = '{{ syncMemberName }}';