{ "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": "ServerConnectionPolicies" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies": { "get": { "operationId": "ServerConnectionPolicies_ListByServer", "tags": [ "ServerConnectionPolicies" ], "description": "Lists connection policy", "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": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServerConnectionPolicyListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Lists a servers connection policies": { "$ref": "./examples/ServerConnectionPoliciesList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}": { "get": { "operationId": "ServerConnectionPolicies_Get", "tags": [ "ServerConnectionPolicies" ], "description": "Gets a server connection policy", "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": "connectionPolicyName", "in": "path", "description": "The name of the connection policy.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ConnectionPolicyName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ServerConnectionPolicy" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a server connection policy": { "$ref": "./examples/ServerConnectionPoliciesGet.json" } } }, "put": { "operationId": "ServerConnectionPolicies_CreateOrUpdate", "tags": [ "ServerConnectionPolicies" ], "description": "Updates a server connection policy", "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": "connectionPolicyName", "in": "path", "description": "The name of the connection policy.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ConnectionPolicyName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "parameters", "in": "body", "description": "The required parameters for updating a server connection policy.", "required": true, "schema": { "$ref": "#/definitions/ServerConnectionPolicy" } } ], "responses": { "200": { "description": "Resource 'ServerConnectionPolicy' update operation succeeded", "schema": { "$ref": "#/definitions/ServerConnectionPolicy" } }, "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": { "Updates a server connection policy": { "$ref": "./examples/ServerConnectionPoliciesUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ServerConnectionPolicy" }, "x-ms-long-running-operation": true } } }, "definitions": { "ServerConnectionPolicy": { "type": "object", "description": "A server connection policy", "properties": { "properties": { "$ref": "#/definitions/ServerConnectionPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true }, "location": { "type": "string", "description": "Resource location.", "readOnly": true }, "kind": { "type": "string", "description": "Metadata used for the Azure portal experience.", "readOnly": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ServerConnectionPolicyListResult": { "type": "object", "description": "The response of a ServerConnectionPolicy list operation.", "properties": { "value": { "type": "array", "description": "The ServerConnectionPolicy items on this page", "items": { "$ref": "#/definitions/ServerConnectionPolicy" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ServerConnectionPolicyProperties": { "type": "object", "description": "The properties of a server connection policy.", "properties": { "connectionType": { "$ref": "./common.json#/definitions/ServerConnectionType", "description": "The server connection type." } }, "required": [ "connectionType" ] } }, "parameters": {} }