{ "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}/maintenances/{maintenanceName}": { "get": { "tags": [ "Maintenances" ], "operationId": "Maintenances_Read", "x-ms-examples": { "Read a maintenance": { "$ref": "./examples/MaintenanceRead.json" } }, "description": "Read maintenance.", "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/MaintenanceNameParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Maintenance" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Maintenances" ], "operationId": "Maintenances_Update", "x-ms-examples": { "Update maintenance on a server": { "$ref": "./examples/MaintenanceUpdate.json" } }, "description": "Update maintenances.", "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/MaintenanceNameParameter" }, { "name": "parameters", "in": "body", "required": false, "schema": { "$ref": "#/definitions/MaintenanceUpdate" }, "description": "The required parameters for update maintenance on a server." } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Maintenance" } }, "202": { "description": "Accepted", "headers": { "Location": { "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 } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/maintenances": { "get": { "tags": [ "Maintenances" ], "operationId": "Maintenances_List", "x-ms-examples": { "List maintenances on a server": { "$ref": "./examples/MaintenancesListByServer.json" } }, "description": "List maintenances.", "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/MaintenanceListResult" } }, "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": { "Maintenance": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/MaintenanceProperties", "x-ms-client-flatten": true, "description": "The properties of a maintenance" } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "required": [ "properties" ], "description": "Represents a maintenance." }, "MaintenanceListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Maintenance" }, "x-ms-identifiers": [], "description": "The list of maintenances in a server." }, "nextLink": { "description": "The link used to get the next page of operations.", "type": "string" } }, "description": "A list of maintenances." }, "MaintenanceProperties": { "type": "object", "properties": { "maintenanceType": { "$ref": "#/definitions/MaintenanceType", "description": "A string defines maintenance type." }, "maintenanceState": { "$ref": "#/definitions/MaintenanceState", "description": "A string describes the maintenance status" }, "maintenanceStartTime": { "type": "string", "format": "date-time", "description": "The start time for a maintenance." }, "maintenanceEndTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end time for a maintenance." }, "maintenanceExecutionStartTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "The start time for a maintenance execution." }, "maintenanceExecutionEndTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "The end time for a maintenance execution." }, "maintenanceAvailableScheduleMinTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "The min time the maintenance can be rescheduled." }, "maintenanceAvailableScheduleMaxTime": { "type": "string", "format": "date-time", "readOnly": true, "description": "The max time the maintenance can be rescheduled." }, "maintenanceTitle": { "type": "string", "readOnly": true, "description": "The maintenance title." }, "maintenanceDescription": { "type": "string", "readOnly": true, "description": "The maintenance description." }, "provisioningState": { "$ref": "#/definitions/MaintenanceProvisioningState", "description": "Provisioning state of the Maintenance." } }, "description": "The properties of a maintenance resource." }, "MaintenanceProvisioningState": { "type": "string", "readOnly": true, "description": "The current provisioning state.", "enum": [ "Succeeded", "Creating", "Deleting", "Failed" ], "x-ms-enum": { "name": "MaintenanceProvisioningState", "modelAsString": true } }, "MaintenanceState": { "type": "string", "readOnly": true, "description": "The current status of this maintenance.", "enum": [ "Scheduled", "ReScheduled", "InPreparation", "Processing", "Completed", "Canceled" ], "x-ms-enum": { "name": "MaintenanceState", "modelAsString": true } }, "MaintenanceType": { "type": "string", "readOnly": true, "description": "The type of this maintenance.", "enum": [ "RoutineMaintenance", "MinorVersionUpgrade", "SecurityPatches", "HotFixes" ], "x-ms-enum": { "name": "MaintenanceType", "modelAsString": true } }, "MaintenanceUpdate": { "type": "object", "properties": { "properties": { "$ref": "#/definitions/MaintenancePropertiesForUpdate", "x-ms-client-flatten": true, "description": "The properties of a maintenance update parameter" } }, "description": "Represents a maintenance update parameter." }, "MaintenancePropertiesForUpdate": { "type": "object", "properties": { "maintenanceStartTime": { "type": "string", "format": "date-time", "description": "The start time for a maintenance." } }, "description": "The properties of a maintenance update parameter." } }, "parameters": { "MaintenanceNameParameter": { "name": "maintenanceName", "in": "path", "required": true, "type": "string", "pattern": "^[a-zA-Z0-9-_]*$", "description": "The name of the maintenance.", "x-ms-parameter-location": "method" } } }