Server Dns Aliases - Acquire

Acquires server DNS alias from another server.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire?api-version=2021-11-01

URI Parameters

Name In Required Type Description
dnsAliasName
path True

string

The name of the server dns alias.

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 that the alias is pointing to.

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
oldServerDnsAliasId True

string

The id of the server alias that will be acquired to point to this server instead.

Responses

Name Type Description
200 OK

ServerDnsAlias

Successfully acquired server DNS alias.

202 Accepted

Accepted

Other Status Codes

*** Error Responses: ***

  • 400 InvalidServerDnsAliasAcquireRequest - The acquire server DNS alias request body is empty or invalid (it should contain the old server alias id, for example: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).

  • 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - The old server DNS alias id in request body is empty or invalid (it should have the form: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1).

  • 400 ServerDnsAliasDoesNotExist - Server DNS Alias does not exist on a server.

  • 400 UnableToTurnOnTableAuditingForDbOnServerWithServerDnsAlias - Server Dns Aliases are not working correctly for database that has Table Auditing turned on

  • 400 UnableToCreateServerDnsAliasDueToTableAuditing - The Server DNS Alias cannot be created for server that has table auditing turned on.

  • 400 UnableToCreateServerDnsAliasDueToTableAuditingForDb - Server DNS Alias cannot be created for server '{0}' because database '{1}' has Table Auditing or Security Enabled Access feature enabled.

  • 400 LimitOfServerDnsAliasesPerServerExceeded - Creating new Server Dns Alias will exceed the allowed number of Server DNS Aliases per server.

  • 400 UnableToTurnOnTableAuditingForServerWithServerDnsAlias - Server Dns Aliases are not working correctly for server that has Table Auditing turned on

  • 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.

  • 400 TokenTooLong - The provided token is too long.

  • 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

  • 400 InvalidServerName - Invalid server name specified.

  • 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.

  • 400 InvalidServerDnsAliasName - Invalid Server DNS Alias name was supplied.

  • 400 ServerNotFound - The requested server was not found.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 ResourceNotFound - The requested resource was not found.

  • 404 OperationIdNotFound - The operation with Id does not exist.

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

  • 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 409 ServerDnsAliasBusy - Server DNS Alias is busy with another operation.

  • 409 SubscriptionDisabled - Subscription is disabled.

  • 409 ServerDnsAliasDnsRecordInUse - A duplicate DNS record exists for the requested endpoint.

  • 409 ServerDnsAliasAlreadyExists - Server DNS Alias already exists on a given server.

  • 409 ConflictingServerOperation - An operation is currently in progress for the server.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

Examples

Acquire server DNS alias

Sample request

POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-new-server/dnsAliases/dns-alias-name-1/acquire?api-version=2021-11-01

{
  "oldServerDnsAliasId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"
}

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-new-server/dnsAliases/dns-alias-name-1",
  "name": "server-dns-alias-name-1",
  "type": "Microsoft.Sql/servers/dnsAliases",
  "properties": {
    "azureDnsRecord": "dns-alias-name-1.database.windows.net"
  }
}

Definitions

Name Description
ServerDnsAlias

A server DNS alias.

ServerDnsAliasAcquisition

A server dns alias acquisition request.

ServerDnsAlias

A server DNS alias.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.azureDnsRecord

string

The fully qualified DNS record for alias

type

string

Resource type.

ServerDnsAliasAcquisition

A server dns alias acquisition request.

Name Type Description
oldServerDnsAliasId

string

The id of the server alias that will be acquired to point to this server instead.