|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "consumes": [ |
| 4 | + "application/json" |
| 5 | + ], |
| 6 | + "host": "management.azure.com", |
| 7 | + "info": { |
| 8 | + "title": "MySQLManagementClient", |
| 9 | + "description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules and configurations.", |
| 10 | + "version": "2022-09-30-preview" |
| 11 | + }, |
| 12 | + "securityDefinitions": { |
| 13 | + "azure_auth": { |
| 14 | + "type": "oauth2", |
| 15 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 16 | + "flow": "implicit", |
| 17 | + "description": "Azure Active Directory OAuth2 Flow", |
| 18 | + "scopes": { |
| 19 | + "user_impersonation": "impersonate your user account" |
| 20 | + } |
| 21 | + } |
| 22 | + }, |
| 23 | + "paths": { |
| 24 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/backupAndExport": { |
| 25 | + "post": { |
| 26 | + "tags": [ |
| 27 | + "BackupAndExport" |
| 28 | + ], |
| 29 | + "operationId": "BackupAndExport_Create", |
| 30 | + "x-ms-examples": { |
| 31 | + "Create and Export Backup": { |
| 32 | + "$ref": "./examples/BackupAndExport.json" |
| 33 | + } |
| 34 | + }, |
| 35 | + "description": "Exports the backup of the given server by creating a backup if not existing.", |
| 36 | + "parameters": [ |
| 37 | + { |
| 38 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" |
| 39 | + }, |
| 40 | + { |
| 41 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" |
| 42 | + }, |
| 43 | + { |
| 44 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" |
| 45 | + }, |
| 46 | + { |
| 47 | + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" |
| 48 | + }, |
| 49 | + { |
| 50 | + "name": "parameters", |
| 51 | + "in": "body", |
| 52 | + "required": true, |
| 53 | + "schema": { |
| 54 | + "$ref": "#/definitions/BackupAndExportRequest" |
| 55 | + }, |
| 56 | + "description": "The required parameters for creating and exporting backup of the given server." |
| 57 | + } |
| 58 | + ], |
| 59 | + "responses": { |
| 60 | + "200": { |
| 61 | + "description": "OK", |
| 62 | + "schema": { |
| 63 | + "$ref": "#/definitions/BackupAndExportResponse" |
| 64 | + } |
| 65 | + }, |
| 66 | + "202": { |
| 67 | + "description": "Accepted", |
| 68 | + "headers": { |
| 69 | + "Location": { |
| 70 | + "description": "URL to retrieve the final result after operation completes.", |
| 71 | + "type": "string" |
| 72 | + }, |
| 73 | + "Azure-AsyncOperation": { |
| 74 | + "description": "URL to query for status of the operation.", |
| 75 | + "type": "string" |
| 76 | + } |
| 77 | + } |
| 78 | + }, |
| 79 | + "default": { |
| 80 | + "description": "Error response describing why the operation failed.", |
| 81 | + "schema": { |
| 82 | + "$ref": "#/definitions/CloudError" |
| 83 | + } |
| 84 | + } |
| 85 | + }, |
| 86 | + "x-ms-long-running-operation": true, |
| 87 | + "x-ms-long-running-operation-options": { |
| 88 | + "final-state-via": "location" |
| 89 | + } |
| 90 | + } |
| 91 | + }, |
| 92 | + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/flexibleServers/{serverName}/validateBackup": { |
| 93 | + "post": { |
| 94 | + "tags": [ |
| 95 | + "BackupAndExport" |
| 96 | + ], |
| 97 | + "operationId": "BackupAndExport_ValidateBackup", |
| 98 | + "x-ms-examples": { |
| 99 | + "Validate Backup": { |
| 100 | + "$ref": "./examples/ValidateBackup.json" |
| 101 | + } |
| 102 | + }, |
| 103 | + "description": "Validates if backup can be performed for given server.", |
| 104 | + "parameters": [ |
| 105 | + { |
| 106 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" |
| 107 | + }, |
| 108 | + { |
| 109 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" |
| 110 | + }, |
| 111 | + { |
| 112 | + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" |
| 113 | + }, |
| 114 | + { |
| 115 | + "$ref": "../../../common-types/v1/common-types.json#/parameters/ServerNameParameter" |
| 116 | + } |
| 117 | + ], |
| 118 | + "responses": { |
| 119 | + "200": { |
| 120 | + "description": "OK", |
| 121 | + "schema": { |
| 122 | + "$ref": "#/definitions/ValidateBackupResponse" |
| 123 | + } |
| 124 | + }, |
| 125 | + "default": { |
| 126 | + "description": "Error response describing why the operation failed.", |
| 127 | + "schema": { |
| 128 | + "$ref": "#/definitions/CloudError" |
| 129 | + } |
| 130 | + } |
| 131 | + } |
| 132 | + } |
| 133 | + } |
| 134 | + }, |
| 135 | + "definitions": { |
| 136 | + "BackupRequestBase": { |
| 137 | + "description": "BackupRequestBase is the base for all backup request.", |
| 138 | + "required": [ |
| 139 | + "backupSettings" |
| 140 | + ], |
| 141 | + "type": "object", |
| 142 | + "properties": { |
| 143 | + "backupSettings": { |
| 144 | + "$ref": "#/definitions/BackupSettings", |
| 145 | + "description": "Backup Settings" |
| 146 | + } |
| 147 | + } |
| 148 | + }, |
| 149 | + "BackupAndExportRequest": { |
| 150 | + "description": "BackupAndExport API Request", |
| 151 | + "type": "object", |
| 152 | + "allOf": [ |
| 153 | + { |
| 154 | + "$ref": "#/definitions/BackupRequestBase" |
| 155 | + } |
| 156 | + ], |
| 157 | + "required": [ |
| 158 | + "backupSettings", |
| 159 | + "targetDetails" |
| 160 | + ], |
| 161 | + "properties": { |
| 162 | + "targetDetails": { |
| 163 | + "$ref": "#/definitions/BackupStoreDetails", |
| 164 | + "description": "Backup Target Store Details" |
| 165 | + } |
| 166 | + } |
| 167 | + }, |
| 168 | + "BackupStoreDetails": { |
| 169 | + "description": "Details about the target where the backup content will be stored.", |
| 170 | + "required": [ |
| 171 | + "objectType" |
| 172 | + ], |
| 173 | + "type": "object", |
| 174 | + "properties": { |
| 175 | + "objectType": { |
| 176 | + "description": "Type of the specific object - used for deserializing", |
| 177 | + "type": "string" |
| 178 | + } |
| 179 | + }, |
| 180 | + "discriminator": "objectType" |
| 181 | + }, |
| 182 | + "FullBackupStoreDetails": { |
| 183 | + "description": "FullBackupStoreDetails is used for scenarios where backup data is streamed/copied over to a storage destination.", |
| 184 | + "type": "object", |
| 185 | + "required": [ |
| 186 | + "sasUriList" |
| 187 | + ], |
| 188 | + "allOf": [ |
| 189 | + { |
| 190 | + "$ref": "#/definitions/BackupStoreDetails" |
| 191 | + } |
| 192 | + ], |
| 193 | + "properties": { |
| 194 | + "sasUriList": { |
| 195 | + "description": "SASUriList of storage containers where backup data is to be streamed/copied.", |
| 196 | + "type": "array", |
| 197 | + "items": { |
| 198 | + "type": "string" |
| 199 | + } |
| 200 | + } |
| 201 | + } |
| 202 | + }, |
| 203 | + "BackupSettings": { |
| 204 | + "description": "Backup Settings", |
| 205 | + "type": "object", |
| 206 | + "required": [ |
| 207 | + "backupName" |
| 208 | + ], |
| 209 | + "properties": { |
| 210 | + "backupName": { |
| 211 | + "$ref": "../../../common-types/v1/common-types.json#/definitions/BackupName" |
| 212 | + }, |
| 213 | + "backupFormat": { |
| 214 | + "description": "Backup Format for the current backup. (CollatedFormat is INTERNAL – DO NOT USE)", |
| 215 | + "enum": [ |
| 216 | + "None", |
| 217 | + "CollatedFormat" |
| 218 | + ], |
| 219 | + "type": "string", |
| 220 | + "x-ms-enum": { |
| 221 | + "name": "BackupFormat", |
| 222 | + "modelAsString": true |
| 223 | + } |
| 224 | + } |
| 225 | + } |
| 226 | + }, |
| 227 | + "ValidateBackupResponseProperties": { |
| 228 | + "description": "ValidateBackup Response Properties", |
| 229 | + "type": "object", |
| 230 | + "properties": { |
| 231 | + "numberOfContainers": { |
| 232 | + "format": "int32", |
| 233 | + "description": "Estimated no of storage containers required for resource data to be backed up.", |
| 234 | + "type": "integer" |
| 235 | + } |
| 236 | + } |
| 237 | + }, |
| 238 | + "BackupAndExportResponseProperties": { |
| 239 | + "description": "BackupAndExport Response Properties", |
| 240 | + "type": "object", |
| 241 | + "properties": { |
| 242 | + "datasourceSizeInBytes": { |
| 243 | + "format": "int64", |
| 244 | + "description": "Size of datasource in bytes", |
| 245 | + "type": "integer" |
| 246 | + }, |
| 247 | + "dataTransferredInBytes": { |
| 248 | + "format": "int64", |
| 249 | + "description": "Data transferred in bytes", |
| 250 | + "type": "integer" |
| 251 | + }, |
| 252 | + "backupMetadata": { |
| 253 | + "description": "Metadata related to backup to be stored for restoring resource in key-value pairs.", |
| 254 | + "type": "string" |
| 255 | + } |
| 256 | + } |
| 257 | + }, |
| 258 | + "BackupAndExportResponse": { |
| 259 | + "type": "object", |
| 260 | + "properties": { |
| 261 | + "status": { |
| 262 | + "description": "The operation status", |
| 263 | + "type": "string", |
| 264 | + "enum": [ |
| 265 | + "Pending", |
| 266 | + "InProgress", |
| 267 | + "Succeeded", |
| 268 | + "Failed", |
| 269 | + "CancelInProgress", |
| 270 | + "Canceled" |
| 271 | + ], |
| 272 | + "x-ms-enum": { |
| 273 | + "name": "OperationStatus", |
| 274 | + "modelAsString": false, |
| 275 | + "values": [ |
| 276 | + { |
| 277 | + "value": "Pending", |
| 278 | + "description": "The operation has been accepted but hasn't started." |
| 279 | + }, |
| 280 | + { |
| 281 | + "value": "InProgress", |
| 282 | + "description": "The operation is running" |
| 283 | + }, |
| 284 | + { |
| 285 | + "value": "Succeeded", |
| 286 | + "description": "The operation Succeeded" |
| 287 | + }, |
| 288 | + { |
| 289 | + "value": "Failed", |
| 290 | + "description": "The operation Failed" |
| 291 | + }, |
| 292 | + { |
| 293 | + "value": "CancelInProgress", |
| 294 | + "description": "The cancellation in progress" |
| 295 | + }, |
| 296 | + { |
| 297 | + "value": "Canceled", |
| 298 | + "description": "The operation has been Canceled" |
| 299 | + } |
| 300 | + ] |
| 301 | + } |
| 302 | + }, |
| 303 | + "startTime": { |
| 304 | + "description": "Start time", |
| 305 | + "type": "string", |
| 306 | + "format": "date-time" |
| 307 | + }, |
| 308 | + "endTime": { |
| 309 | + "description": "End time", |
| 310 | + "type": "string", |
| 311 | + "format": "date-time" |
| 312 | + }, |
| 313 | + "percentComplete": { |
| 314 | + "description": "Operation progress (0-100).", |
| 315 | + "type": "number", |
| 316 | + "format": "double", |
| 317 | + "minimum": 0, |
| 318 | + "maximum": 100 |
| 319 | + }, |
| 320 | + "properties": { |
| 321 | + "$ref": "#/definitions/BackupAndExportResponseProperties", |
| 322 | + "x-ms-client-flatten": true, |
| 323 | + "description": "The response properties of a backup and export operation." |
| 324 | + }, |
| 325 | + "error": { |
| 326 | + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", |
| 327 | + "description": "The BackupAndExport operation error response." |
| 328 | + } |
| 329 | + }, |
| 330 | + "allOf": [ |
| 331 | + { |
| 332 | + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" |
| 333 | + } |
| 334 | + ], |
| 335 | + "description": "Represents BackupAndExport API Response" |
| 336 | + }, |
| 337 | + "ValidateBackupResponse": { |
| 338 | + "type": "object", |
| 339 | + "properties": { |
| 340 | + "properties": { |
| 341 | + "$ref": "#/definitions/ValidateBackupResponseProperties", |
| 342 | + "x-ms-client-flatten": true, |
| 343 | + "description": "The response properties of a pre backup operation." |
| 344 | + } |
| 345 | + }, |
| 346 | + "description": "Represents ValidateBackup API Response" |
| 347 | + }, |
| 348 | + "CloudError": { |
| 349 | + "type": "object", |
| 350 | + "x-ms-external": true, |
| 351 | + "properties": { |
| 352 | + "error": { |
| 353 | + "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse", |
| 354 | + "description": "The resource management error response." |
| 355 | + } |
| 356 | + }, |
| 357 | + "description": "An error response from the Batch service." |
| 358 | + } |
| 359 | + }, |
| 360 | + "produces": [ |
| 361 | + "application/json" |
| 362 | + ], |
| 363 | + "schemes": [ |
| 364 | + "https" |
| 365 | + ], |
| 366 | + "security": [ |
| 367 | + { |
| 368 | + "azure_auth": [ |
| 369 | + "user_impersonation" |
| 370 | + ] |
| 371 | + } |
| 372 | + ] |
| 373 | +} |
0 commit comments