{ "swagger": "2.0", "info": { "version": "2017-03-01-preview", "title": "SqlManagementClient", "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}": { "get": { "tags": [ "ServerDnsAliases" ], "description": "Gets a server DNS alias.", "operationId": "ServerDnsAliases_Get", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server that the alias is pointing to.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "The name of the server DNS alias.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the specified server DNS alias.", "schema": { "$ref": "#/definitions/ServerDnsAlias" } }, "default": { "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." } }, "x-ms-examples": { "Get server DNS alias": { "$ref": "./examples/ServerDnsAliasGet.json" } } }, "put": { "tags": [ "ServerDnsAliases" ], "description": "Creates a server dns alias.", "operationId": "ServerDnsAliases_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server that the alias is pointing to.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "The name of the server DNS alias.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "The server DNS alias already exists.", "schema": { "$ref": "#/definitions/ServerDnsAlias" } }, "default": { "description": "*** Error Responses: ***\n\n * 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).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - \n\n * 400 UnableToResolveRemoteServer - \n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 ServerDnsAliasAlreadyExists - \n\n * 409 ServerDnsAliasAlreadyExists - \n\n * 409 ServerDnsAliasBusy - \n\n * 409 ServerDnsAliasDnsRecordInUse - \n\n * 409 InvalidServerDnsAliasName - \n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Accepted" }, "201": { "description": "Successfully created a server DNS alias.", "schema": { "$ref": "#/definitions/ServerDnsAlias" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Create server DNS alias": { "$ref": "./examples/ServerDnsAliasCreateOrUpdate.json" } } }, "delete": { "tags": [ "ServerDnsAliases" ], "description": "Deletes the server DNS alias with the given name.", "operationId": "ServerDnsAliases_Delete", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server that the alias is pointing to.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "The name of the server DNS alias.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully deleted the server DNS alias." }, "default": { "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." }, "202": { "description": "Accepted" }, "204": { "description": "The specified server DNS alias does not exist." } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Delete server DNS alias": { "$ref": "./examples/ServerDnsAliasDelete.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases": { "get": { "tags": [ "ServerDnsAliases" ], "description": "Gets a list of server DNS aliases for a server.", "operationId": "ServerDnsAliases_ListByServer", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server that the alias is pointing to.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the list of server DNS aliases.", "schema": { "$ref": "#/definitions/ServerDnsAliasListResult" } }, "default": { "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "List server DNS aliases": { "$ref": "./examples/ServerDnsAliasList.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}/acquire": { "post": { "tags": [ "ServerDnsAliases" ], "description": "Acquires server DNS alias from another server.", "operationId": "ServerDnsAliases_Acquire", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server that the alias is pointing to.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "The name of the server dns alias.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ServerDnsAliasAcquisition" } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully acquired server DNS alias." }, "default": { "description": "*** Error Responses: ***\n\n * 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).\n\n * 400 ServerDnsAliasAcquireRequestInvalidOldServerDnsAliasId - \n\n * 400 UnableToResolveRemoteServer - \n\n * 400 ServerNotFound - The requested server was not found.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 InvalidServerName - Invalid server name specified.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 409 ServerDnsAliasAlreadyExists - \n\n * 409 ServerDnsAliasAlreadyExists - \n\n * 409 ServerDnsAliasBusy - \n\n * 409 ServerDnsAliasDnsRecordInUse - \n\n * 409 InvalidServerDnsAliasName - \n\n * 409 SubscriptionDisabled - Subscription is disabled.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 ConflictingServerOperation - An operation is currently in progress for the server.\n\n * 429 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout." }, "202": { "description": "Accepted" } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Acquire server DNS alias": { "$ref": "./examples/ServerDnsAliasAcquire.json" } } } } }, "definitions": { "ServerDnsAliasProperties": { "description": "Properties of a server DNS alias.", "type": "object", "properties": { "azureDnsRecord": { "description": "The fully qualified DNS record for alias", "type": "string", "readOnly": true } } }, "ServerDnsAlias": { "description": "A server DNS alias.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "properties": { "$ref": "#/definitions/ServerDnsAliasProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "ServerDnsAliasListResult": { "description": "A list of server DNS aliases.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { "$ref": "#/definitions/ServerDnsAlias" }, "readOnly": true }, "nextLink": { "description": "Link to retrieve next page of results.", "type": "string", "readOnly": true } } }, "ServerDnsAliasAcquisition": { "description": "A server DNS alias acquisition request.", "type": "object", "properties": { "oldServerDnsAliasId": { "description": "The id of the server alias that will be acquired to point to this server instead.", "type": "string" } } } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "description": "The subscription ID that identifies an Azure subscription.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for the request.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ResourceGroupParameter": { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ServerNameParameter": { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "DatabaseNameParameter": { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" } }, "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } } }