{ "swagger": "2.0", "info": { "version": "2020-01-01", "title": "MySQLManagementClient", "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files, encryption keys, active directory administrator and configurations." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys": { "get": { "tags": [ "ServerKeys" ], "description": "Gets a list of Server keys.", "operationId": "ServerKeys_List", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "Successfully retrieved the list of MySQL Server keys.", "schema": { "$ref": "#/definitions/ServerKeyListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "List the keys for a MySQL Server.": { "$ref": "./examples/ServerKeyList.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}": { "get": { "tags": [ "ServerKeys" ], "description": "Gets a MySQL Server key.", "operationId": "ServerKeys_Get", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the MySQL Server key to be retrieved.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Successfully retrieved the specified MySQL Server key.", "schema": { "$ref": "#/definitions/ServerKey" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-examples": { "Get the MySQL Server key": { "$ref": "./examples/ServerKeyGet.json" } } }, "put": { "tags": [ "ServerKeys" ], "description": "Creates or updates a MySQL Server key.", "operationId": "ServerKeys_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the MySQL Server key to be operated on (updated or created).", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested MySQL Server key resource state.", "required": true, "schema": { "$ref": "#/definitions/ServerKey" } }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "Successfully updated the MySQL Server key.", "schema": { "$ref": "#/definitions/ServerKey" } }, "202": { "description": "Operation in progress", "schema": { "$ref": "#/definitions/ServerKey" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Creates or updates a MySQL Server key": { "$ref": "./examples/ServerKeyCreateOrUpdate.json" } } }, "delete": { "tags": [ "ServerKeys" ], "description": "Deletes the MySQL Server key with the given name.", "operationId": "ServerKeys_Delete", "parameters": [ { "$ref": "#/parameters/ServerNameParameter" }, { "name": "keyName", "in": "path", "description": "The name of the MySQL Server key to be deleted.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { "200": { "description": "Successfully deleted the MySQL Server key." }, "202": { "description": "Operation in progress" }, "204": { "description": "The specified MySQL Server key does not exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "Delete the MySQL Server key": { "$ref": "./examples/ServerKeyDelete.json" } } } } }, "definitions": { "ServerKeyListResult": { "description": "A list of MySQL Server keys.", "type": "object", "properties": { "value": { "description": "A list of MySQL Server keys.", "type": "array", "items": { "$ref": "#/definitions/ServerKey" }, "readOnly": true }, "nextLink": { "description": "Link to retrieve next page of results.", "type": "string", "readOnly": true } } }, "ServerKeyProperties": { "description": "Properties for a key execution.", "required": [ "serverKeyType" ], "type": "object", "properties": { "serverKeyType": { "description": "The key type like 'AzureKeyVault'.", "enum": [ "AzureKeyVault" ], "type": "string", "x-ms-enum": { "name": "ServerKeyType", "modelAsString": true } }, "uri": { "description": "The URI of the key.", "type": "string" }, "creationDate": { "format": "date-time", "description": "The key creation date.", "type": "string", "readOnly": true } } }, "ServerKey": { "description": "A MySQL Server key.", "type": "object", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "properties": { "kind": { "description": "Kind of encryption protector used to protect the key.", "type": "string", "readOnly": true }, "properties": { "$ref": "#/definitions/ServerKeyProperties", "description": "Properties of the ServerKey Resource.", "x-ms-client-flatten": true } } }, "CloudError": { "x-ms-external": true, "properties": { "error": { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" } }, "description": "An error response from the Batch service." } }, "parameters": { "ServerNameParameter": { "name": "serverName", "in": "path", "required": true, "type": "string", "description": "The name of the server.", "x-ms-parameter-location": "method" } }, "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" } } } }