{ "swagger": "2.0", "info": { "title": "MySQLManagementClient", "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", "version": "2023-12-30" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupsV2/{backupName}": { "put": { "tags": [ "backupsV2" ], "operationId": "LongRunningBackup_Create", "x-ms-examples": { "Create backup for a server": { "$ref": "./examples/LongRunningBackup.json" } }, "description": "Create backup for a given server with specified backup 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" }, { "$ref": "./common-types/v1/common-types.json#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/BackupNameParameter" }, { "name": "parameters", "in": "body", "schema": { "$ref": "#/definitions/ServerBackupV2" }, "description": "The required parameters for creating and exporting backup of the given server." } ], "responses": { "200": { "description": "Successfully backup.", "schema": { "$ref": "#/definitions/ServerBackupV2" } }, "201": { "description": "Successfully backup.", "schema": { "$ref": "#/definitions/ServerBackupV2" } }, "202": { "description": "Accepted", "headers": { "Location": { "description": "URL to retrieve the final result after operation completes.", "type": "string" }, "Azure-AsyncOperation": { "description": "URL to query for status of the operation.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" } }, "get": { "tags": [ "backupsV2" ], "operationId": "LongRunningBackups_Get", "x-ms-examples": { "Get a backup for a server": { "$ref": "./examples/LongRunningBackupGet.json" } }, "description": "Get backup for a given 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" }, { "$ref": "./common-types/v1/common-types.json#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/BackupNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerBackupV2" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupsV2": { "get": { "tags": [ "backupsV2" ], "operationId": "LongRunningBackups_List", "x-ms-examples": { "List backups for a server": { "$ref": "./examples/LongRunningBackupsListByServer.json" } }, "description": "List all the backups for a given 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" }, { "$ref": "./common-types/v1/common-types.json#/parameters/ServerNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ServerBackupV2ListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "ProvisioningState": { "type": "string", "readOnly": true, "description": "The current provisioning state.", "enum": [ "Succeeded", "Creating", "Deleting", "Failed", "Canceled" ], "x-ms-enum": { "name": "ProvisioningState", "modelAsString": true } }, "provisioningStateProperties": { "type": "object", "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", "description": "The provisioning state of backup resource." } }, "description": "The properties of a server backup." }, "ServerBackupPropertiesV2": { "type": "object", "properties": { "backupNameV2": { "type": "string", "description": "Backup name" }, "backupType": { "type": "string", "enum": [ "FULL" ], "x-ms-enum": { "name": "backupType", "modelAsString": true } }, "completedTime": { "type": "string", "format": "date-time", "description": "Backup completed time (ISO8601 format)." }, "source": { "type": "string", "description": "Backup source" }, "provisioningState": { "$ref": "#/definitions/ProvisioningState", "description": "The provisioning state of backup resource." } }, "description": "The properties of a server backup." }, "ServerBackupV2": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/ServerBackupPropertiesV2", "x-ms-client-flatten": true, "description": "The properties of a server backup." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "description": "Server backup properties" }, "Provisioning": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/provisioningStateProperties", "x-ms-client-flatten": true, "description": "The properties of provisioning." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "description": "Server backup properties" }, "ServerBackupV2ListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ServerBackupV2" }, "description": "The list of backups of a server." }, "nextLink": { "description": "The link used to get the next page of operations.", "type": "string" } }, "description": "A list of server backups." } }, "parameters": { "BackupNameParameter": { "name": "backupName", "in": "path", "required": true, "type": "string", "description": "The name of the backup.", "x-ms-parameter-location": "method", "pattern": "^[-\\w\\._]+$" } } }