Disaster Recovery Configurations - Create Or Update

Creates or updates a disaster recovery configuration.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName}?api-version=2014-04-01

URI Parameters

Name In Required Type Description
disasterRecoveryConfigurationName
path True

string

The name of the disaster recovery configuration to be created/updated.

resourceGroupName
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.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

DisasterRecoveryConfiguration

OK

201 Created

DisasterRecoveryConfiguration

Created

202 Accepted

DisasterRecoveryConfiguration

Accepted

Examples

Update a disaster recovery configuration

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/disasterRecoveryConfiguration/Default?api-version=2014-04-01

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default",
  "name": "Default",
  "location": "West US",
  "type": "Microsoft.Sql/servers/disasterRecoveryConfigurations",
  "properties": {
    "status": "Ready",
    "autoFailover": "On",
    "failoverPolicy": "Automatic",
    "partnerServerId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5962",
    "logicalServerName": "sqlcrudtest-5961",
    "partnerLogicalServerName": "sqlcrudtest-5962",
    "role": "Primary"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default",
  "name": "Default",
  "location": "West US",
  "type": "Microsoft.Sql/servers/disasterRecoveryConfigurations",
  "properties": {
    "status": "Ready",
    "autoFailover": "On",
    "failoverPolicy": "Automatic",
    "partnerServerId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5962",
    "logicalServerName": "sqlcrudtest-5961",
    "partnerLogicalServerName": "sqlcrudtest-5962",
    "role": "Primary"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default",
  "name": "Default",
  "location": "West US",
  "type": "Microsoft.Sql/servers/disasterRecoveryConfigurations",
  "properties": {
    "status": "Ready",
    "autoFailover": "On",
    "failoverPolicy": "Automatic",
    "partnerServerId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5962",
    "logicalServerName": "sqlcrudtest-5961",
    "partnerLogicalServerName": "sqlcrudtest-5962",
    "role": "Primary"
  }
}

Definitions

Name Description
DisasterRecoveryConfiguration

Represents a disaster recovery configuration.

DisasterRecoveryConfigurationAutoFailover

Whether or not failover can be done automatically.

DisasterRecoveryConfigurationFailoverPolicy

How aggressive the automatic failover should be.

DisasterRecoveryConfigurationRole

The role of the current server in the disaster recovery configuration.

DisasterRecoveryConfigurationStatus

The status of the disaster recovery configuration.

DisasterRecoveryConfiguration

Represents a disaster recovery configuration.

Name Type Description
id

string

Resource ID.

location

string

Location of the server that contains this disaster recovery configuration.

name

string

Resource name.

properties.autoFailover

DisasterRecoveryConfigurationAutoFailover

Whether or not failover can be done automatically.

properties.failoverPolicy

DisasterRecoveryConfigurationFailoverPolicy

How aggressive the automatic failover should be.

properties.logicalServerName

string

Logical name of the server.

properties.partnerLogicalServerName

string

Logical name of the partner server.

properties.partnerServerId

string

Id of the partner server.

properties.role

DisasterRecoveryConfigurationRole

The role of the current server in the disaster recovery configuration.

properties.status

DisasterRecoveryConfigurationStatus

The status of the disaster recovery configuration.

type

string

Type of resource this is.

DisasterRecoveryConfigurationAutoFailover

Whether or not failover can be done automatically.

Name Type Description
Off

string

On

string

DisasterRecoveryConfigurationFailoverPolicy

How aggressive the automatic failover should be.

Name Type Description
Automatic

string

Manual

string

DisasterRecoveryConfigurationRole

The role of the current server in the disaster recovery configuration.

Name Type Description
None

string

Primary

string

Secondary

string

DisasterRecoveryConfigurationStatus

The status of the disaster recovery configuration.

Name Type Description
Creating

string

Dropping

string

FailingOver

string

Ready

string