{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "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" } } }, "tags": [ { "name": "DeletedServers" } ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/deletedServers": { "get": { "operationId": "DeletedServers_List", "tags": [ "DeletedServers" ], "description": "Gets a list of all deleted servers in a subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/DeletedServerListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deleted servers in a subscription": { "$ref": "./examples/DeletedServerListBySubscription.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers": { "get": { "operationId": "DeletedServers_ListByLocation", "tags": [ "DeletedServers" ], "description": "Gets a list of deleted servers for a location.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "locationName", "in": "path", "description": "The name of the region where the resource is located.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DeletedServerListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List deleted servers": { "$ref": "./examples/DeletedServerList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}": { "get": { "operationId": "DeletedServers_Get", "tags": [ "DeletedServers" ], "description": "Gets a deleted server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "locationName", "in": "path", "description": "The name of the region where the resource is located.", "required": true, "type": "string" }, { "name": "deletedServerName", "in": "path", "description": "The name of the deleted server.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DeletedServer" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get deleted server": { "$ref": "./examples/DeletedServerGet.json" } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}/recover": { "post": { "operationId": "DeletedServers_Recover", "tags": [ "DeletedServers" ], "description": "Recovers a deleted server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "locationName", "in": "path", "description": "The name of the region where the resource is located.", "required": true, "type": "string" }, { "name": "deletedServerName", "in": "path", "description": "The name of the deleted server.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DeletedServer" } }, "202": { "description": "Resource operation accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Recover deleted server.": { "$ref": "./examples/DeletedServerRecover.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/DeletedServer" }, "x-ms-long-running-operation": true } } }, "definitions": { "DeletedServer": { "type": "object", "description": "A deleted server.", "properties": { "properties": { "$ref": "#/definitions/DeletedServerProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "DeletedServerListResult": { "type": "object", "description": "The response of a DeletedServer list operation.", "properties": { "value": { "type": "array", "description": "The DeletedServer items on this page", "items": { "$ref": "#/definitions/DeletedServer" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "DeletedServerProperties": { "type": "object", "description": "The properties of a deleted server.", "properties": { "version": { "type": "string", "description": "The version of the deleted server.", "readOnly": true }, "deletionTime": { "type": "string", "format": "date-time", "description": "The deletion time of the deleted server.", "readOnly": true }, "originalId": { "type": "string", "description": "The original ID of the server before deletion.", "readOnly": true }, "fullyQualifiedDomainName": { "type": "string", "description": "The fully qualified domain name of the server.", "readOnly": true } } } }, "parameters": {} }