{ "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": "ServerAzureADAdministrators" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators": { "get": { "operationId": "ServerAzureADAdministrators_ListByServer", "tags": [ "ServerAzureADAdministrators" ], "description": "Gets a list of Azure Active Directory administrators in a 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": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AdministratorListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a list of Azure Active Directory administrator.": { "$ref": "./examples/AdministratorList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}": { "get": { "operationId": "ServerAzureADAdministrators_Get", "tags": [ "ServerAzureADAdministrators" ], "description": "Gets a Azure Active Directory administrator.", "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": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "administratorName", "in": "path", "description": "The name of server active directory administrator.", "required": true, "type": "string", "enum": [ "ActiveDirectory" ], "x-ms-enum": { "name": "AdministratorName", "modelAsString": true, "values": [ { "name": "ActiveDirectory", "value": "ActiveDirectory", "description": "ActiveDirectory" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServerAzureADAdministrator" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a Azure Active Directory administrator.": { "$ref": "./examples/AdministratorGet.json" } } }, "put": { "operationId": "ServerAzureADAdministrators_CreateOrUpdate", "tags": [ "ServerAzureADAdministrators" ], "description": "Creates or updates an existing Azure Active Directory administrator.", "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": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "administratorName", "in": "path", "description": "The name of server active directory administrator.", "required": true, "type": "string", "enum": [ "ActiveDirectory" ], "x-ms-enum": { "name": "AdministratorName", "modelAsString": true, "values": [ { "name": "ActiveDirectory", "value": "ActiveDirectory", "description": "ActiveDirectory" } ] } }, { "name": "parameters", "in": "body", "description": "The requested Azure Active Directory administrator Resource state.", "required": true, "schema": { "$ref": "#/definitions/ServerAzureADAdministrator" } } ], "responses": { "200": { "description": "Resource 'ServerAzureADAdministrator' update operation succeeded", "schema": { "$ref": "#/definitions/ServerAzureADAdministrator" } }, "201": { "description": "Resource 'ServerAzureADAdministrator' create operation succeeded", "schema": { "$ref": "#/definitions/ServerAzureADAdministrator" }, "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": { "Creates or updates an existing Azure Active Directory administrator.": { "$ref": "./examples/AdministratorCreateOrUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ServerAzureADAdministrator" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "ServerAzureADAdministrators_Delete", "tags": [ "ServerAzureADAdministrators" ], "description": "Deletes the Azure Active Directory administrator 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": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "administratorName", "in": "path", "description": "The name of server active directory administrator.", "required": true, "type": "string", "enum": [ "ActiveDirectory" ], "x-ms-enum": { "name": "AdministratorName", "modelAsString": true, "values": [ { "name": "ActiveDirectory", "value": "ActiveDirectory", "description": "ActiveDirectory" } ] } } ], "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 Azure Active Directory administrator.": { "$ref": "./examples/AdministratorDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } } }, "definitions": { "AdministratorListResult": { "type": "object", "description": "A list of active directory administrators.", "properties": { "value": { "type": "array", "description": "Array of results.", "items": { "$ref": "#/definitions/ServerAzureADAdministrator" }, "readOnly": true }, "nextLink": { "type": "string", "description": "Link to retrieve next page of results.", "readOnly": true } } }, "AdministratorProperties": { "type": "object", "description": "Properties of a active directory administrator.", "properties": { "administratorType": { "$ref": "./common.json#/definitions/AdministratorType", "description": "Type of the sever administrator." }, "login": { "type": "string", "description": "Login name of the server administrator." }, "sid": { "$ref": "./common.json#/definitions/Azure.Core.uuid", "description": "SID (object ID) of the server administrator." }, "tenantId": { "$ref": "./common.json#/definitions/Azure.Core.uuid", "description": "Tenant ID of the administrator." }, "azureADOnlyAuthentication": { "type": "boolean", "description": "Azure Active Directory only Authentication enabled.", "readOnly": true } }, "required": [ "login", "sid" ] }, "ServerAzureADAdministrator": { "type": "object", "description": "Azure Active Directory administrator.", "properties": { "properties": { "$ref": "#/definitions/AdministratorProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] } }, "parameters": {} }