Replication Links - Get

Gets a replication link.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}?api-version=2023-08-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

linkId
path True

string

The name of the replication link.

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

ReplicationLink

Successfully retrieved the specified replication link.

Other Status Codes

ErrorResponse

*** Error Responses: ***

  • 400 ReplicationLinksReplicationLinkNameIsInvalid - Replication link name should be a valid guid.

  • 400 GeoReplicationDatabaseNotSecondary - The operation expects the database to be a replication target.

  • 400 ReplicationLinksReplicationLinkTypeIsInvalid - The LinkType is invalid. Valid values are STANDBY and GEO.

  • 400 ReplicationLinksCreateIsNotSupported - Creation of Replication Link is not supported.

  • 400 LedgerNoDropLink - Geo-replication cannot be stopped because the database has Ledger Digest Uploads enabled. Disable Ledger Digest Uploads and retry the operation.

  • 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state

  • 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state

  • 404 ResourceNotFound - The requested resource was not found.

  • 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

Examples

Gets the replication link.

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb?api-version=2023-08-01

Sample response

{
  "properties": {
    "partnerServer": "testsvr",
    "partnerDatabase": "gamma-db",
    "partnerDatabaseId": "/subscriptions/00000000-1111-2222-3333-555555555555/resourceGroups/Second-Default/providers/Microsoft.Sql/servers/testsvr/databases/gamma-db",
    "partnerLocation": "Japan East",
    "role": "Primary",
    "partnerRole": "Secondary",
    "replicationMode": "ASYNC",
    "startTime": "2018-06-21T08:12:43.783Z",
    "percentComplete": 100,
    "replicationState": "CATCH_UP",
    "isTerminationAllowed": true,
    "linkType": "GEO"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb",
  "name": "4891ca10-ebd0-47d7-9182-c722651780fb"
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ReplicationLink

A replication link.

ReplicationLinkType

Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED.

ReplicationRole

Local replication role.

ReplicationState

Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).

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.

A replication link.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.isTerminationAllowed

boolean

Whether the user is currently allowed to terminate the link.

properties.linkType

ReplicationLinkType

Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED.

properties.partnerDatabase

string

Resource partner database.

properties.partnerDatabaseId

string

Resource partner database Id.

properties.partnerLocation

string

Resource partner location.

properties.partnerRole

ReplicationRole

Partner replication role.

properties.partnerServer

string

Resource partner server.

properties.percentComplete

integer (int32)

Seeding completion percentage for the link.

properties.replicationMode

string

Replication mode.

properties.replicationState

ReplicationState

Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).

properties.role

ReplicationRole

Local replication role.

properties.startTime

string (date-time)

Time at which the link was created.

type

string

Resource type.

ReplicationLinkType

Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED.

Value Description
GEO
NAMED
STANDBY

ReplicationRole

Local replication role.

Value Description
Copy
NonReadableSecondary
Primary
Secondary
Source

ReplicationState

Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).

Value Description
CATCH_UP
PENDING
SEEDING
SUSPENDED