Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup admin update #16151

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,377 @@
{
"swagger": "2.0",
"info": {
"version": "2021-09-01",
"title": "BackupManagementClient",
"description": "The Admin Backup Management Client."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups": {
"get": {
"x-ms-examples": {
"Returns a list of backups from a location.": {
"$ref": "./examples/Backups/List.json"
}
},
"description": "Returns a list of backups from a location.",
"tags": [
"Backups"
],
"operationId": "Backups_List",
"parameters": [
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/SubscriptionIdParameter"
bganapa marked this conversation as resolved.
Show resolved Hide resolved
},
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "BackupLocations.json#/parameters/BackupLocationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/TopParameter"
},
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/SkipParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/BackupList"
}
},
"default": {
"description": "Error response.",
"schema": {
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}": {
"get": {
"x-ms-examples": {
"Returns a backup from a location based on name.": {
"$ref": "./examples/Backups/Get.json"
}
},
"description": "Returns a backup from a location based on name.",
"tags": [
"Backups"
],
"operationId": "Backups_Get",
"parameters": [
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "BackupLocations.json#/parameters/BackupLocationParameter"
},
{
"$ref": "#/parameters/BackupParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Backup"
}
},
"default": {
"description": "Error response.",
"schema": {
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Backup.Admin/backupLocations/{location}/backups/{backup}/restore": {
"post": {
"x-ms-examples": {
"Restore a backup.": {
"$ref": "./examples/Backups/Restore.json"
},
"Restore a single role from backup.": {
"$ref": "./examples/Backups/SingleRepoRestore.json"
}
},
"description": "Restore a backup.",
"tags": [
"Backups"
],
"operationId": "Backups_Restore",
"parameters": [
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "BackupLocations.json#/parameters/BackupLocationParameter"
},
{
"$ref": "../../stable/2018-09-01/Backup.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/BackupParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/RestoreOptionsParameter"
}
],
"responses": {
"200": {
"description": "OK"
},
"202": {
"description": "ACCEPTED"
},
"default": {
"description": "Error response.",
"schema": {
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
},
"definitions": {
"Backup": {
"description": "Information related to a backup.",
"type": "object",
"properties": {
"properties": {
"description": "Properties for a backup.",
"$ref": "#/definitions/BackupModel",
"x-ms-client-flatten": true
}
},
"allOf": [
{
"$ref": "../../stable/2018-09-01/Backup.json#/definitions/Resource"
}
]
},
"BackupModel": {
"type": "object",
"description": "Properties for a backup.",
"properties": {
"backupInfo": {
"description": "Holds information for a backup.",
"x-ms-client-flatten": true,
"$ref": "#/definitions/BackupInfo"
}
}
},
"BackupInfo": {
"type": "object",
"description": "Holds information for a backup.",
"properties": {
"backupDataVersion": {
"description": "Version of the backup data.",
"type": "string",
"readOnly": true
},
"roleStatus": {
"description": "Backup status for each role.",
"$ref": "#/definitions/RoleOperationStatusList",
"readOnly": true
},
"status": {
"description": "Current status of the backup.",
"$ref": "#/definitions/OperationStatus",
"readOnly": true
},
"createdDateTime": {
"description": "Creation time of the backup.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"timeTakenToCreate": {
"description": "Duration to create the backup.",
"type": "string",
"readOnly": true
},
"deploymentID": {
"description": "Deployment Id of the stamp.",
"type": "string",
"readOnly": true
},
"stampVersion": {
"description": "Azure Stack stamp version of the backup.",
"type": "string",
"readOnly": true
},
"oemVersion": {
"description": "OEM version.",
"type": "string",
"readOnly": true
},
"isCloudRecoveryReady": {
"description": "True if the backup can be used for cloud recovery scenario.",
"type": "boolean",
"readOnly": true
},
"encryptionCertThumbprint": {
"description": "The thumbprint of the certificate used to encrypt the backup encryption key.",
"type": "string",
"readOnly": true
}
}
},
"OperationStatus": {
"description": "Status of an operation.",
"type": "string",
"enum": [
"Creating",
"Queued",
"Running",
"Deleted",
"Failed",
"Skipped",
"PartialSucceeded",
"Succeeded"
],
"x-ms-enum": {
"name": "OperationStatus",
"modelAsString": false
}
},
"RoleOperationStatusList": {
"description": "object",
"type": "array",
"items": {
"$ref": "#/definitions/RoleOperationStatus"
}
},
"RoleOperationStatus": {
"description": "Backup status for a role.",
"type": "object",
"properties": {
"roleName": {
"description": "Name of the role.",
"type": "string"
},
"status": {
"description": "Status of the role.",
"$ref": "#/definitions/OperationStatus"
}
}
},
"BackupList": {
"type": "object",
"description": "List of backups.",
"properties": {
"value": {
"description": "List of backups.",
"type": "array",
"items": {
"$ref": "#/definitions/Backup"
}
},
"nextLink": {
"description": "URI to the next page.",
"type": "string"
}
}
},
"RestoreOptions": {
"type": "object",
"description": "Properties for restore options.",
"properties": {
"roleName": {
"description": "The Azure Stack role name for restore, set it to empty for all infrastructure role",
"type": "string"
},
"decryptionCertBase64": {
"description": "The certificate file raw data in Base64 string. This should be the .pfx file with the private key.",
"type": "string"
},
"decryptionCertPassword": {
"description": "The password for the decryption certificate.",
"type": "string"
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"description": "Client API version.",
"required": true,
"type": "string",
"default": "2021-09-01"
},
"BackupParameter": {
"name": "backup",
"in": "path",
"description": "Name of the backup.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
},
"RestoreOptionsParameter": {
"name": "restoreOptions",
"in": "body",
"description": "Restore options.",
"required": true,
"schema": {
"$ref": "#/definitions/RestoreOptions"
},
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Authorization uses an Azure Active Directory OAuth2 flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
]
}
Loading