Sync Groups - Create Or Update
Creates or updates a sync group.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}?api-version=2023-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
The name of the database on which the sync group is hosted. |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
|
server
|
path | True |
string |
The name of the server. |
|
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
|
sync
|
path | True |
string |
The name of the sync group. |
|
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.conflictLoggingRetentionInDays |
integer (int32) |
Conflict logging retention period. |
| properties.conflictResolutionPolicy |
Conflict resolution policy of the sync group. |
|
| properties.enableConflictLogging |
boolean |
If conflict logging is enabled. |
| properties.hubDatabasePassword |
string |
Password for the sync group hub database credential. |
| properties.hubDatabaseUserName |
string |
User name for the sync group hub database credential. |
| properties.interval |
integer (int32) |
Sync interval of the sync group. |
| properties.schema |
Sync schema of the sync group. |
|
| properties.syncDatabaseId |
string |
ARM resource id of the sync database in the sync group. |
| properties.usePrivateLinkConnection |
boolean |
If use private link connection is enabled. |
| sku |
The name and capacity of the SKU. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully updated the sync group. |
|
| 201 Created |
Successfully created the sync group. |
|
| 202 Accepted |
Creating or updating the sync group is in progress. Headers Location: string |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
| Create a sync group |
| Update a sync group |
Create a sync group
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187?api-version=2023-08-01
{
"properties": {
"interval": -1,
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"usePrivateLinkConnection": true
}
}
Sample response
{
"properties": {
"interval": -1,
"lastSyncTime": "0001-01-01T08:00:00Z",
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"syncState": "NotReady",
"usePrivateLinkConnection": true,
"privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187",
"name": "syncgroupcrud-3187",
"type": "Microsoft.Sql/servers/databases/syncGroups"
}
{
"properties": {
"interval": -1,
"lastSyncTime": "0001-01-01T08:00:00Z",
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"syncState": "NotReady",
"usePrivateLinkConnection": true,
"privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187",
"name": "syncgroupcrud-3187",
"type": "Microsoft.Sql/servers/databases/syncGroups"
}
Update a sync group
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187?api-version=2023-08-01
{
"properties": {
"interval": -1,
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"usePrivateLinkConnection": true
}
}
Sample response
{
"properties": {
"interval": -1,
"lastSyncTime": "0001-01-01T08:00:00Z",
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"syncState": "NotReady",
"usePrivateLinkConnection": true,
"privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187",
"name": "syncgroupcrud-3187",
"type": "Microsoft.Sql/servers/databases/syncGroups"
}
{
"properties": {
"interval": -1,
"lastSyncTime": "0001-01-01T08:00:00Z",
"conflictResolutionPolicy": "HubWin",
"syncDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328",
"hubDatabaseUserName": "hubUser",
"syncState": "NotReady",
"usePrivateLinkConnection": true,
"privateEndpointName": "PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"
},
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187",
"name": "syncgroupcrud-3187",
"type": "Microsoft.Sql/servers/databases/syncGroups"
}
Definitions
| Name | Description |
|---|---|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
| Sku |
An ARM Resource SKU. |
|
Sync |
Conflict resolution policy of the sync group. |
|
Sync |
An Azure SQL Database sync group. |
|
Sync |
Properties of sync group schema. |
|
Sync |
Properties of table in sync group schema. |
|
Sync |
Properties of column in sync group table. |
|
Sync |
Sync state of the sync group. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Sku
An ARM Resource SKU.
| Name | Type | Description |
|---|---|---|
| capacity |
integer (int32) |
Capacity of the particular SKU. |
| family |
string |
If the service has different generations of hardware, for the same SKU, then that can be captured here. |
| name |
string |
The name of the SKU, typically, a letter + Number code, e.g. P3. |
| size |
string |
Size of the particular SKU |
| tier |
string |
The tier or edition of the particular SKU, e.g. Basic, Premium. |
SyncConflictResolutionPolicy
Conflict resolution policy of the sync group.
| Value | Description |
|---|---|
| HubWin | |
| MemberWin |
SyncGroup
An Azure SQL Database sync group.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |
| name |
string |
Resource name. |
| properties.conflictLoggingRetentionInDays |
integer (int32) |
Conflict logging retention period. |
| properties.conflictResolutionPolicy |
Conflict resolution policy of the sync group. |
|
| properties.enableConflictLogging |
boolean |
If conflict logging is enabled. |
| properties.hubDatabasePassword |
string |
Password for the sync group hub database credential. |
| properties.hubDatabaseUserName |
string |
User name for the sync group hub database credential. |
| properties.interval |
integer (int32) |
Sync interval of the sync group. |
| properties.lastSyncTime |
string (date-time) |
Last sync time of the sync group. |
| properties.privateEndpointName |
string |
Private endpoint name of the sync group if use private link connection is enabled. |
| properties.schema |
Sync schema of the sync group. |
|
| properties.syncDatabaseId |
string |
ARM resource id of the sync database in the sync group. |
| properties.syncState |
Sync state of the sync group. |
|
| properties.usePrivateLinkConnection |
boolean |
If use private link connection is enabled. |
| sku |
The name and capacity of the SKU. |
|
| type |
string |
Resource type. |
SyncGroupSchema
Properties of sync group schema.
| Name | Type | Description |
|---|---|---|
| masterSyncMemberName |
string |
Name of master sync member where the schema is from. |
| tables |
List of tables in sync group schema. |
SyncGroupSchemaTable
Properties of table in sync group schema.
| Name | Type | Description |
|---|---|---|
| columns |
List of columns in sync group schema. |
|
| quotedName |
string |
Quoted name of sync group schema table. |
SyncGroupSchemaTableColumn
Properties of column in sync group table.
| Name | Type | Description |
|---|---|---|
| dataSize |
string |
Data size of the column. |
| dataType |
string |
Data type of the column. |
| quotedName |
string |
Quoted name of sync group table column. |
SyncGroupState
Sync state of the sync group.
| Value | Description |
|---|---|
| NotReady | |
| Error | |
| Warning | |
| Progressing | |
| Good |