Failover Groups - Create Or Update
Creates or updates a failover group.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}?api-version=2023-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
failover
|
path | True |
string |
The name of the failover group. |
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 containing the failover group. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.partnerServers | True |
List of partner server information for the failover group. |
|
properties.readWriteEndpoint | True |
Read-write endpoint of the failover group instance. |
|
properties.databases |
string[] (arm-id) |
List of databases in the failover group. |
|
properties.readOnlyEndpoint |
Read-only endpoint of the failover group instance. |
||
properties.secondaryType |
Databases secondary type on partner server. |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully updated the failover group. |
|
201 Created |
Successfully created the failover group. |
|
202 Accepted |
Accepted Headers Location: string |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Create failover group |
Create failover group with standby secondary database on partner server. |
Create failover group
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3?api-version=2023-08-01
{
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled"
},
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
]
}
}
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/servers/failoverGroups",
"location": "Japan East",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled",
"targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
"location": "Japan West",
"replicationRole": "Secondary"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
]
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/servers/failoverGroups",
"location": "Japan East",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled",
"targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
"location": "Japan West",
"replicationRole": "Secondary"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
]
}
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111
Create failover group with standby secondary database on partner server.
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3?api-version=2023-08-01
{
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled"
},
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
],
"secondaryType": "Standby"
}
}
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/servers/failoverGroups",
"location": "Japan East",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled",
"targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
"location": "Japan West",
"replicationRole": "Secondary"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
]
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/servers/failoverGroups",
"location": "Japan East",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled",
"targetServer": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerServers": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server",
"location": "Japan West",
"replicationRole": "Secondary"
}
],
"databases": [
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1",
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2"
]
}
}
Location: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/japaneast/failoverGroupOperationResults/11111111-1111-1111-1111-111111111111
Definitions
Name | Description |
---|---|
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Failover |
A failover group. |
Failover |
Databases secondary type on partner server. |
Failover |
Read-only endpoint of the failover group instance. |
Failover |
Read-write endpoint of the failover group instance. |
Failover |
Local replication role of the failover group instance. |
Partner |
Partner server information for the failover group. |
Read |
Failover policy of the read-only endpoint for the failover group. |
Read |
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
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. |
FailoverGroup
A failover group.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
location |
string |
Resource location. |
name |
string |
Resource name. |
properties.databases |
string[] (arm-id) |
List of databases in the failover group. |
properties.partnerServers |
List of partner server information for the failover group. |
|
properties.readOnlyEndpoint |
Read-only endpoint of the failover group instance. |
|
properties.readWriteEndpoint |
Read-write endpoint of the failover group instance. |
|
properties.replicationRole |
Local replication role of the failover group instance. |
|
properties.replicationState |
string |
Replication state of the failover group instance. |
properties.secondaryType |
Databases secondary type on partner server. |
|
tags |
object |
Resource tags. |
type |
string |
Resource type. |
FailoverGroupDatabasesSecondaryType
Databases secondary type on partner server.
Value | Description |
---|---|
Geo | |
Standby |
FailoverGroupReadOnlyEndpoint
Read-only endpoint of the failover group instance.
Name | Type | Description |
---|---|---|
failoverPolicy |
Failover policy of the read-only endpoint for the failover group. |
|
targetServer |
string (arm-id) |
The target partner server where the read-only endpoint points to. |
FailoverGroupReadWriteEndpoint
Read-write endpoint of the failover group instance.
Name | Type | Description |
---|---|---|
failoverPolicy |
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
|
failoverWithDataLossGracePeriodMinutes |
integer (int32) |
Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
FailoverGroupReplicationRole
Local replication role of the failover group instance.
Value | Description |
---|---|
Primary | |
Secondary |
PartnerInfo
Partner server information for the failover group.
Name | Type | Description |
---|---|---|
id |
string (arm-id) |
Resource identifier of the partner server. |
location |
string |
Geo location of the partner server. |
replicationRole |
Replication role of the partner server. |
ReadOnlyEndpointFailoverPolicy
Failover policy of the read-only endpoint for the failover group.
Value | Description |
---|---|
Disabled | |
Enabled |
ReadWriteEndpointFailoverPolicy
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
Value | Description |
---|---|
Automatic | |
Manual |