MySQLManagementClient icon

MySQLManagementClient

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 policie...

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "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.",
    "title": "MySQLManagementClient",
    "version": "2020-01-01-privatepreview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/mysql/resource-manager/Microsoft.DBforMySQL/preview/2020-01-01-privatepreview/DataEncryptionKeys.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "mysql-DataEncryptionKeys",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "parameters": {
    "ApiVersionParameter": {
      "description": "The API version to use for the request.",
      "in": "query",
      "name": "api-version",
      "required": true,
      "type": "string"
    },
    "ResourceGroupParameter": {
      "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.",
      "in": "path",
      "name": "resourceGroupName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "ServerNameParameter": {
      "description": "The name of the server.",
      "in": "path",
      "name": "serverName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "SubscriptionIdParameter": {
      "description": "The subscription ID that identifies an Azure subscription.",
      "in": "path",
      "name": "subscriptionId",
      "required": true,
      "type": "string"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys": {
      "get": {
        "description": "Gets a list of  Server keys.",
        "operationId": "ServerKeys_ListByInstance",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "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"
            }
          }
        },
        "tags": [
          "ServerKeys"
        ],
        "x-ms-examples": {
          "List the keys for a MySQL Server.": {
            "parameters": {
              "api-version": "2020-01-01-privatepreview",
              "resourceGroupName": "testrg",
              "serverName": "testserver",
              "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901",
                      "kind": "azurekeyvault",
                      "name": "someVault_someKey_01234567890123456789012345678901",
                      "properties": {
                        "creationDate": "2019-12-01T00:00:00.0Z",
                        "serverKeyType": "AzureKeyVault",
                        "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
                      },
                      "type": "Microsoft.DBforMySQL/servers/keys"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/keys/{keyName}": {
      "delete": {
        "description": "Deletes the MySQL Server key with the given name.",
        "operationId": "ServerKeys_Delete",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the MySQL Server key to be deleted.",
            "in": "path",
            "name": "keyName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted the MySQL Server key."
          },
          "202": {
            "description": "Accepted"
          },
          "204": {
            "description": "The specified MySQL Server key does not exist."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "ServerKeys"
        ],
        "x-ms-examples": {
          "Delete the MySQL Server key": {
            "parameters": {
              "api-version": "2020-01-01-privatepreview",
              "keyName": "someVault_someKey_01234567890123456789012345678901",
              "resourceGroupName": "testrg",
              "serverName": "testserver",
              "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets a MySQL Server key.",
        "operationId": "ServerKeys_Get",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the MySQL Server key to be retrieved.",
            "in": "path",
            "name": "keyName",
            "required": true,
            "type": "string"
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "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"
            }
          }
        },
        "tags": [
          "ServerKeys"
        ],
        "x-ms-examples": {
          "Get the MySQL Server key": {
            "parameters": {
              "api-version": "2020-01-01-privatepreview",
              "keyName": "someVault_someKey_01234567890123456789012345678901",
              "resourceGroupName": "testrg",
              "serverName": "testserver",
              "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901",
                  "kind": "azurekeyvault",
                  "name": "someVault_someKey_01234567890123456789012345678901",
                  "properties": {
                    "creationDate": "2019-12-01T00:00:00.0Z",
                    "serverKeyType": "AzureKeyVault",
                    "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
                  },
                  "type": "Microsoft.DBforMySQL/servers/keys"
                }
              }
            }
          }
        }
      },
      "put": {
        "description": "Creates or updates a MySQL Server key.",
        "operationId": "ServerKeys_CreateOrUpdate",
        "parameters": [
          {
            "$ref": "#/parameters/ResourceGroupParameter"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the MySQL Server key to be operated on (updated or created).",
            "in": "path",
            "name": "keyName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The requested MySQL Server key resource state.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ServerKey"
            }
          },
          {
            "$ref": "#/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "#/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully updated the MySQL Server key.",
            "schema": {
              "$ref": "#/definitions/ServerKey"
            }
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "ServerKeys"
        ],
        "x-ms-examples": {
          "Creates or updates a MySQL Server key": {
            "parameters": {
              "api-version": "2020-01-01-privatepreview",
              "keyName": "someVault_someKey_01234567890123456789012345678901",
              "parameters": {
                "properties": {
                  "serverKeyType": "AzureKeyVault",
                  "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
                }
              },
              "resourceGroupName": "testrg",
              "serverName": "testserver",
              "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMySQL/servers/testserver/keys/someVault_someKey_01234567890123456789012345678901",
                  "kind": "azurekeyvault",
                  "name": "omeVault_someKey_01234567890123456789012345678901",
                  "properties": {
                    "creationDate": "2017-05-01T00:00:00.0Z",
                    "serverKeyType": "AzureKeyVault",
                    "uri": "https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"
                  },
                  "type": "Microsoft.DBforMySQL/servers/keys"
                }
              },
              "202": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "definitions": {
    "CloudError": {
      "description": "An error response from the Batch service.",
      "properties": {
        "error": {
          "$ref": "#/definitions/CloudErrorBody"
        }
      },
      "x-ms-external": true
    },
    "CloudErrorBody": {
      "description": "An error response from the Batch service.",
      "properties": {
        "code": {
          "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
          "type": "string"
        },
        "details": {
          "description": "A list of additional details about the error.",
          "items": {
            "$ref": "#/definitions/CloudErrorBody"
          },
          "type": "array"
        },
        "message": {
          "description": "A message describing the error, intended to be suitable for display in a user interface.",
          "type": "string"
        },
        "target": {
          "description": "The target of the particular error. For example, the name of the property in error.",
          "type": "string"
        }
      },
      "x-ms-external": true
    },
    "ProxyResource": {
      "description": "Resource properties.",
      "properties": {
        "id": {
          "description": "Resource ID",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Resource name.",
          "readOnly": true,
          "type": "string"
        },
        "type": {
          "description": "Resource type.",
          "readOnly": true,
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    },
    "ServerKey": {
      "allOf": [
        {
          "$ref": "#/definitions/ProxyResource"
        }
      ],
      "description": "A MySQL Server key.",
      "properties": {
        "kind": {
          "description": "Kind of encryption protector. This is metadata used for the Azure portal experience.",
          "readOnly": true,
          "type": "string"
        },
        "properties": {
          "$ref": "#/definitions/ServerKeyProperties",
          "description": "Resource properties.",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "ServerKeyListResult": {
      "description": "A list of MySQL Server keys.",
      "properties": {
        "nextLink": {
          "description": "Link to retrieve next page of results.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "description": "Array of results.",
          "items": {
            "$ref": "#/definitions/ServerKey"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "type": "object"
    },
    "ServerKeyProperties": {
      "description": "Properties for a key execution.",
      "properties": {
        "creationDate": {
          "description": "The key creation date.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "serverKeyType": {
          "description": "The key type like 'AzureKeyVault'.",
          "enum": [
            "AzureKeyVault"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "ServerKeyType"
          }
        },
        "uri": {
          "description": "The URI of the key.",
          "type": "string"
        }
      },
      "required": [
        "serverKeyType"
      ],
      "type": "object"
    }
  }
}