Geo Backup Policies - Create Or Update

Updates a database geo backup policy.

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

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

geoBackupPolicyName
path True

GeoBackupPolicyName

The name of the geo backup policy.

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.

Request Body

Name Required Type Description
properties.state True

GeoBackupPolicyState

The state of the geo backup policy.

Responses

Name Type Description
200 OK

GeoBackupPolicy

OK

201 Created

GeoBackupPolicy

Created

Examples

Update geo backup policy

Sample request

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

{
  "properties": {
    "state": "Enabled"
  }
}

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default",
  "name": "Default",
  "type": "Microsoft.Sql/servers/databases/geoBackupPolicies",
  "location": null,
  "kind": null,
  "properties": {
    "state": "Enabled",
    "storageType": null
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default",
  "name": "Default",
  "type": "Microsoft.Sql/servers/databases/geoBackupPolicies",
  "location": null,
  "kind": null,
  "properties": {
    "state": "Enabled",
    "storageType": null
  }
}

Definitions

Name Description
GeoBackupPolicy

A database geo backup policy.

GeoBackupPolicyName

The name of the geo backup policy.

GeoBackupPolicyState

The state of the geo backup policy.

GeoBackupPolicy

A database geo backup policy.

Name Type Description
id

string

Resource ID.

kind

string

Kind of geo backup policy. This is metadata used for the Azure portal experience.

location

string

Backup policy location.

name

string

Resource name.

properties.state

GeoBackupPolicyState

The state of the geo backup policy.

properties.storageType

string

The storage type of the geo backup policy.

type

string

Resource type.

GeoBackupPolicyName

The name of the geo backup policy.

Name Type Description
Default

string

GeoBackupPolicyState

The state of the geo backup policy.

Name Type Description
Disabled

string

Enabled

string