Failover Groups - Create

Creates or replaces a failover group resource.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlManagedInstances/{sqlManagedInstanceName}/failoverGroups/{failoverGroupName}?api-version=2026-01-01

URI Parameters

Name In Required Type Description
failoverGroupName
path True

string

The name of the Failover Group

resourceGroupName
path True

string

The name of the Azure resource group

sqlManagedInstanceName
path True

string

Name of SQL Managed Instance

subscriptionId
path True

string

The ID of the Azure subscription

api-version
query True

string

The API version to use for the request

Request Body

Name Required Type Description
properties True

FailoverGroupProperties

null

Responses

Name Type Description
200 OK

FailoverGroupResource

OK

201 Created

FailoverGroupResource

Created

Other Status Codes

ErrorResponse

*** Error Responses: ***

Examples

Create or update a failover group instance.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testSqlManagedInstance/failoverGroups/testFailoverGroupName?api-version=2026-01-01

{
  "properties": {
    "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/partnerMI",
    "spec": {
      "partnerSyncMode": "async",
      "role": "primary"
    }
  }
}

Sample response

{
  "properties": {
    "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/partnerMI",
    "spec": {
      "sharedName": "testSharedName",
      "sourceMI": "sourceSQLMI",
      "partnerMI": "partnerMI",
      "partnerMirroringURL": "11.11.111.111:1111",
      "partnerMirroringCert": "testCert",
      "partnerSyncMode": "async",
      "role": "primary"
    }
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testSqlManagedInstance/failoverGroups/testFailoverGroupName",
  "name": "testFailoverGroupName",
  "type": "Microsoft.AzureArcData/sqlManagedInstances/failoverGroups"
}
{
  "properties": {
    "partnerManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/partnerMI",
    "spec": {
      "sharedName": "testSharedName",
      "sourceMI": "sourceSQLMI",
      "partnerMI": "partnerMI",
      "partnerMirroringURL": "11.11.111.111:1111",
      "partnerMirroringCert": "testCert",
      "partnerSyncMode": "async",
      "role": "primary"
    }
  },
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testSqlManagedInstance/failoverGroups/testFailoverGroupName",
  "name": "testFailoverGroupName",
  "type": "Microsoft.AzureArcData/sqlManagedInstances/failoverGroups"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

failoverGroupPartnerSyncMode

The partner sync mode of the SQL managed instance.

FailoverGroupProperties

The properties of a failover group resource.

FailoverGroupResource

A failover group resource.

FailoverGroupSpec

The specifications of the failover group resource.

instanceFailoverGroupRole

The role of the SQL managed instance in this failover group.

provisioningState

The provisioning state of the failover group resource.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

failoverGroupPartnerSyncMode

The partner sync mode of the SQL managed instance.

Value Description
async
sync

FailoverGroupProperties

The properties of a failover group resource.

Name Type Description
partnerManagedInstanceId

string

The resource ID of the partner SQL managed instance.

provisioningState

provisioningState

The provisioning state of the failover group resource.

spec

FailoverGroupSpec

The specifications of the failover group resource.

status

object

The status of the failover group custom resource.

FailoverGroupResource

A failover group resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties

FailoverGroupProperties

null

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

FailoverGroupSpec

The specifications of the failover group resource.

Name Type Default value Description
partnerMI

string

The name of the partner SQL managed instance.

partnerMirroringCert

string

The mirroring endpoint public certificate for the partner SQL managed instance. Only PEM format is supported.

partnerMirroringURL

string

The mirroring endpoint URL of the partner SQL managed instance.

partnerSyncMode

failoverGroupPartnerSyncMode

async

The partner sync mode of the SQL managed instance.

role

instanceFailoverGroupRole

primary

The role of the SQL managed instance in this failover group.

sharedName

string

The shared name of the failover group for this SQL managed instance. Both SQL managed instance and its partner have to use the same shared name.

sourceMI

string

The name of the SQL managed instance with this failover group role.

instanceFailoverGroupRole

The role of the SQL managed instance in this failover group.

Value Description
primary
secondary
force-primary-allow-data-loss
force-secondary

provisioningState

The provisioning state of the failover group resource.

Value Description
Succeeded
Failed
Canceled
Accepted

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.