{ "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": "VirtualNetworkRules" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules": { "get": { "operationId": "VirtualNetworkRules_ListByServer", "tags": [ "VirtualNetworkRules" ], "description": "Gets a list of virtual network rules 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": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/VirtualNetworkRuleListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List virtual network rules": { "$ref": "./examples/VirtualNetworkRulesList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}": { "get": { "operationId": "VirtualNetworkRules_Get", "tags": [ "VirtualNetworkRules" ], "description": "Gets a virtual network rule.", "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": "virtualNetworkRuleName", "in": "path", "description": "The name of the virtual network rule.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/VirtualNetworkRule" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets a virtual network rule": { "$ref": "./examples/VirtualNetworkRulesGet.json" } } }, "put": { "operationId": "VirtualNetworkRules_CreateOrUpdate", "tags": [ "VirtualNetworkRules" ], "description": "Creates or updates an existing virtual network rule.", "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": "virtualNetworkRuleName", "in": "path", "description": "The name of the virtual network rule.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested virtual Network Rule Resource state.", "required": true, "schema": { "$ref": "#/definitions/VirtualNetworkRule" } } ], "responses": { "200": { "description": "Resource 'VirtualNetworkRule' update operation succeeded", "schema": { "$ref": "#/definitions/VirtualNetworkRule" } }, "201": { "description": "Resource 'VirtualNetworkRule' create operation succeeded", "schema": { "$ref": "#/definitions/VirtualNetworkRule" }, "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 or update a virtual network rule": { "$ref": "./examples/VirtualNetworkRulesCreateOrUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/VirtualNetworkRule" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "VirtualNetworkRules_Delete", "tags": [ "VirtualNetworkRules" ], "description": "Deletes the virtual network rule 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": "virtualNetworkRuleName", "in": "path", "description": "The name of the virtual network rule.", "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 a virtual network rule": { "$ref": "./examples/VirtualNetworkRulesDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } } }, "definitions": { "VirtualNetworkRule": { "type": "object", "description": "A virtual network rule.", "properties": { "properties": { "$ref": "#/definitions/VirtualNetworkRuleProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "VirtualNetworkRuleListResult": { "type": "object", "description": "The response of a VirtualNetworkRule list operation.", "properties": { "value": { "type": "array", "description": "The VirtualNetworkRule items on this page", "items": { "$ref": "#/definitions/VirtualNetworkRule" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "VirtualNetworkRuleProperties": { "type": "object", "description": "Properties of a virtual network rule.", "properties": { "virtualNetworkSubnetId": { "type": "string", "description": "The ARM resource id of the virtual network subnet." }, "ignoreMissingVnetServiceEndpoint": { "type": "boolean", "description": "Create firewall rule before the virtual network has vnet service endpoint enabled." }, "state": { "$ref": "./common.json#/definitions/VirtualNetworkRuleState", "description": "Virtual Network Rule State", "readOnly": true } }, "required": [ "virtualNetworkSubnetId" ] } }, "parameters": {} }