{ "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": "ManagedInstanceKeys" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys": { "get": { "operationId": "ManagedInstanceKeys_ListByInstance", "tags": [ "ManagedInstanceKeys" ], "description": "Gets a list of managed instance keys.", "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": "$filter", "in": "query", "description": "An OData filter expression that filters elements in the collection.", "required": false, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedInstanceKeyListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List the keys for a managed instance.": { "$ref": "./examples/ManagedInstanceKeyList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}": { "get": { "operationId": "ManagedInstanceKeys_Get", "tags": [ "ManagedInstanceKeys" ], "description": "Gets a managed instance key.", "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": "keyName", "in": "path", "description": "The name of the managed instance key to be retrieved.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedInstanceKey" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get the managed instance key": { "$ref": "./examples/ManagedInstanceKeyGet.json" } } }, "put": { "operationId": "ManagedInstanceKeys_CreateOrUpdate", "tags": [ "ManagedInstanceKeys" ], "description": "Creates or updates a managed instance key.", "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": "keyName", "in": "path", "description": "The name of the managed instance key to be retrieved.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested managed instance key resource state.", "required": true, "schema": { "$ref": "#/definitions/ManagedInstanceKey" } } ], "responses": { "200": { "description": "Resource 'ManagedInstanceKey' update operation succeeded", "schema": { "$ref": "#/definitions/ManagedInstanceKey" } }, "201": { "description": "Resource 'ManagedInstanceKey' create operation succeeded", "schema": { "$ref": "#/definitions/ManagedInstanceKey" }, "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 a managed instance key": { "$ref": "./examples/ManagedInstanceKeyCreateOrUpdate.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location", "final-state-schema": "#/definitions/ManagedInstanceKey" }, "x-ms-long-running-operation": true }, "delete": { "operationId": "ManagedInstanceKeys_Delete", "tags": [ "ManagedInstanceKeys" ], "description": "Deletes the managed instance key 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": "keyName", "in": "path", "description": "The name of the managed instance key to be retrieved.", "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 the managed instance key": { "$ref": "./examples/ManagedInstanceKeyDelete.json" } }, "x-ms-long-running-operation-options": { "final-state-via": "location" }, "x-ms-long-running-operation": true } } }, "definitions": { "ManagedInstanceKey": { "type": "object", "description": "A managed instance key.", "properties": { "properties": { "$ref": "#/definitions/ManagedInstanceKeyProperties", "description": "Resource properties.", "x-ms-client-flatten": true }, "kind": { "type": "string", "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.", "readOnly": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ManagedInstanceKeyListResult": { "type": "object", "description": "The response of a ManagedInstanceKey list operation.", "properties": { "value": { "type": "array", "description": "The ManagedInstanceKey items on this page", "items": { "$ref": "#/definitions/ManagedInstanceKey" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ManagedInstanceKeyProperties": { "type": "object", "description": "Properties for a key execution.", "properties": { "serverKeyType": { "$ref": "./common.json#/definitions/ServerKeyType", "description": "The key type like 'ServiceManaged', 'AzureKeyVault'.", "x-ms-mutability": [ "create" ] }, "uri": { "type": "string", "description": "The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required.", "x-ms-mutability": [ "create" ] }, "thumbprint": { "type": "string", "description": "Thumbprint of the key.", "readOnly": true }, "creationDate": { "type": "string", "format": "date-time", "description": "The key creation date.", "readOnly": true }, "autoRotationEnabled": { "type": "boolean", "description": "Key auto rotation opt-in flag. Either true or false.", "readOnly": true } }, "required": [ "serverKeyType" ] } }, "parameters": {} }