Instance Failover Groups - Failover
Fails over from the current primary managed instance to this managed instance.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover?api-version=2021-02-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
failover
|
path | True |
|
The name of the failover group. |
|
location
|
path | True |
|
The name of the region where the resource is located. |
|
resource
|
path | True |
|
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
|
subscription
|
path | True |
|
The subscription ID that identifies an Azure subscription. |
|
api-version
|
query | True |
|
The API version to use for the request. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully failed over. |
|
| 202 Accepted |
Accepted |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
Planned failover of a failover group
Sample Request
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan West/instanceFailoverGroups/failover-group-test-3/failover?api-version=2021-02-01-preview
Sample Response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3",
"name": "failover-group-test-3",
"type": "Microsoft.Sql/locations/failoverGroups",
"properties": {
"readWriteEndpoint": {
"failoverPolicy": "Automatic",
"failoverWithDataLossGracePeriodMinutes": 480
},
"readOnlyEndpoint": {
"failoverPolicy": "Disabled"
},
"replicationRole": "Primary",
"replicationState": "CATCH_UP",
"partnerRegions": [
{
"location": "Japan East",
"replicationRole": "Secondary"
}
],
"managedInstancePairs": [
{
"primaryManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance",
"partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"
}
]
}
}
Definitions
|
Instance |
An instance failover group. |
|
Instance |
Read-only endpoint of the failover group instance. |
|
Instance |
Read-write endpoint of the failover group instance. |
|
Instance |
Local replication role of the failover group instance. |
|
Managed |
Pairs of Managed Instances in the failover group. |
|
Partner |
Partner region 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. |
InstanceFailoverGroup
An instance failover group.
| Name | Type | Description |
|---|---|---|
| id |
|
Resource ID. |
| name |
|
Resource name. |
| properties.managedInstancePairs |
List of managed instance pairs in the failover group. |
|
| properties.partnerRegions |
Partner region 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 |
|
Replication state of the failover group instance. |
| type |
|
Resource type. |
InstanceFailoverGroupReadOnlyEndpoint
Read-only endpoint of the failover group instance.
| Name | Type | Description |
|---|---|---|
| failoverPolicy |
Failover policy of the read-only endpoint for the failover group. |
InstanceFailoverGroupReadWriteEndpoint
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 |
|
Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. |
InstanceFailoverGroupReplicationRole
Local replication role of the failover group instance.
| Name | Type | Description |
|---|---|---|
| Primary |
|
|
| Secondary |
|
ManagedInstancePairInfo
Pairs of Managed Instances in the failover group.
| Name | Type | Description |
|---|---|---|
| partnerManagedInstanceId |
|
Id of Partner Managed Instance in pair. |
| primaryManagedInstanceId |
|
Id of Primary Managed Instance in pair. |
PartnerRegionInfo
Partner region information for the failover group.
| Name | Type | Description |
|---|---|---|
| location |
|
Geo location of the partner managed instances. |
| replicationRole |
Replication role of the partner managed instances. |
ReadOnlyEndpointFailoverPolicy
Failover policy of the read-only endpoint for the failover group.
| Name | Type | Description |
|---|---|---|
| Disabled |
|
|
| Enabled |
|
ReadWriteEndpointFailoverPolicy
Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
| Name | Type | Description |
|---|---|---|
| Automatic |
|
|
| Manual |
|