{ "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": "ManagedServerDnsAliases" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases": { "get": { "operationId": "ManagedServerDnsAliases_ListByManagedInstance", "tags": [ "ManagedServerDnsAliases" ], "description": "Gets a list of managed server DNS aliases for a managed server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedServerDnsAliasListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List managed server DNS aliases": { "$ref": "./examples/ManagedServerDnsAliasList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}": { "get": { "operationId": "ManagedServerDnsAliases_Get", "tags": [ "ManagedServerDnsAliases" ], "description": "Gets a server DNS alias.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedServerDnsAlias" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get managed server DNS alias": { "$ref": "./examples/ManagedServerDnsAliasGet.json" } } }, "put": { "operationId": "ManagedServerDnsAliases_CreateOrUpdate", "tags": [ "ManagedServerDnsAliases" ], "description": "Creates a managed server DNS alias.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/ManagedServerDnsAliasCreation" } } ], "responses": { "200": { "description": "Resource 'ManagedServerDnsAlias' update operation succeeded", "schema": { "$ref": "#/definitions/ManagedServerDnsAlias" } }, "201": { "description": "Resource 'ManagedServerDnsAlias' create operation succeeded", "schema": { "$ref": "#/definitions/ManagedServerDnsAlias" }, "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "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." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create managed server DNS alias": { "$ref": "./examples/ManagedServerDnsAliasCreateOrUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ManagedServerDnsAlias" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "ManagedServerDnsAliases_Delete", "tags": [ "ManagedServerDnsAliases" ], "description": "Deletes the managed server DNS alias with the given name.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "202": { "description": "Resource deletion accepted.", "headers": { "Location": { "type": "string", "description": "The Location header contains the URL where the status of the long running operation can be checked." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete managed server DNS alias": { "$ref": "./examples/ManagedServerDnsAliasDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire": { "post": { "operationId": "ManagedServerDnsAliases_Acquire", "tags": [ "ManagedServerDnsAliases" ], "description": "Acquires managed server DNS alias from another managed server.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "dnsAliasName", "in": "path", "description": "", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "", "required": true, "schema": { "$ref": "#/definitions/ManagedServerDnsAliasAcquisition" } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedServerDnsAlias" } }, "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." }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Acquire managed server DNS alias.": { "$ref": "./examples/ManagedServerDnsAliasAcquire.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ManagedServerDnsAlias" }, "x-ms-long-running-operation": true } } }, "definitions": { "ManagedServerDnsAlias": { "type": "object", "description": "A managed server DNS alias.", "properties": { "properties": { "$ref": "#/definitions/ManagedServerDnsAliasProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ManagedServerDnsAliasAcquisition": { "type": "object", "description": "A managed server DNS alias acquisition request.", "properties": { "oldManagedServerDnsAliasResourceId": { "type": "string", "description": "The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead." } }, "required": [ "oldManagedServerDnsAliasResourceId" ] }, "ManagedServerDnsAliasCreation": { "type": "object", "description": "A managed server dns alias creation request.", "properties": { "createDnsRecord": { "type": "boolean", "description": "Whether or not DNS record should be created for this alias.", "default": true } } }, "ManagedServerDnsAliasListResult": { "type": "object", "description": "The response of a ManagedServerDnsAlias list operation.", "properties": { "value": { "type": "array", "description": "The ManagedServerDnsAlias items on this page", "items": { "$ref": "#/definitions/ManagedServerDnsAlias" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ManagedServerDnsAliasProperties": { "type": "object", "description": "Properties of a managed server DNS alias.", "properties": { "azureDnsRecord": { "type": "string", "description": "The fully qualified DNS record for managed server alias", "readOnly": true }, "publicAzureDnsRecord": { "type": "string", "description": "The fully qualified public DNS record for managed server alias", "readOnly": true } } } }, "parameters": {} }