From db39f34b941e7a80c16eb80c178796c6e1104ccd Mon Sep 17 00:00:00 2001 From: Pratima Upadhyay Date: Fri, 27 Nov 2020 13:12:08 +0530 Subject: [PATCH] Updating existing CRR APIs and protection APIs (#10962) * Fixing bug in PrepareDataMoveResponse Class * Updating existing CRR and protection APIs * Adding examples * Updating APIs to 2020-07-01 * Updating conflict * Resolving failures * Update * Update * Update * Update * Adding workloadCRRAccessToken * Adding discriminator for CRRAccesToken * Update * Reverting change to 2020-07-01 * Update * Update * Fixing prettier --- .../stable/2018-12-20/bms.json | 700 ++++++++++++++++-- .../BackupProtectedItems_List.json | 8 - .../AzureIaasVm/GetAccessToken_Get.json | 12 +- .../AzureIaasVm/ListCrrJobs_Post.json | 3 +- .../TriggerCrossRegionRestore_Post.json | 77 +- .../Common/BackupStorageConfig_Get.json | 23 + .../Common/BackupStorageConfig_Patch.json | 17 + .../Common/BackupStorageConfig_Put.json | 29 + .../resource-manager/readme.md | 4 +- 9 files changed, 770 insertions(+), 103 deletions(-) create mode 100644 specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Get.json create mode 100644 specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Patch.json create mode 100644 specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Put.json diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/bms.json index 50fb70dba218..66fcf1cd106a 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/bms.json @@ -18,7 +18,7 @@ "application/json" ], "paths": { - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default": { "get": { "tags": [ "AadProperties" @@ -45,6 +45,12 @@ "schema": { "$ref": "#/definitions/AADPropertiesResource" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-examples": { @@ -54,7 +60,7 @@ } } }, - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore": { "post": { "tags": [ "CrossRegionRestore" @@ -80,13 +86,22 @@ "description": "resource cross region restore request", "required": true, "schema": { - "$ref": "#/definitions/CrossRegionRestoreRequestResource" + "$ref": "#/definitions/CrossRegionRestoreRequest" } } ], "responses": { + "200": { + "description": "OK" + }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-long-running-operation": true, @@ -100,7 +115,7 @@ } } }, - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob": { "post": { "tags": [ "CrrJobDetails" @@ -119,6 +134,15 @@ }, { "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "parameters", + "in": "body", + "description": "CRR Job request", + "required": true, + "schema": { + "$ref": "#/definitions/CrrJobRequest" + } } ], "responses": { @@ -127,6 +151,12 @@ "schema": { "$ref": "#/definitions/JobResource" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-examples": { @@ -136,7 +166,7 @@ } } }, - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs": { "post": { "tags": [ "BackupCrrJobs" @@ -155,6 +185,29 @@ }, { "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "parameters", + "in": "body", + "description": "Backup CRR Job request", + "required": true, + "schema": { + "$ref": "#/definitions/CrrJobRequest" + } + }, + { + "name": "$filter", + "in": "query", + "description": "OData filter options.", + "required": false, + "type": "string" + }, + { + "name": "$skipToken", + "in": "query", + "description": "skipToken Filter.", + "required": false, + "type": "string" } ], "responses": { @@ -163,8 +216,15 @@ "schema": { "$ref": "#/definitions/JobResourceList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, + "x-ms-odata": "#/definitions/JobQueryObject", "x-ms-pageable": { "nextLinkName": "nextLink" }, @@ -175,7 +235,7 @@ } } }, - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}": { "get": { "tags": [ "CrrOperationResults" @@ -207,6 +267,12 @@ }, "202": { "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-long-running-operation": true, @@ -220,7 +286,7 @@ } } }, - "/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}": { + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}": { "get": { "tags": [ "CrrOperationStatus" @@ -252,6 +318,12 @@ "schema": { "$ref": "#/definitions/OperationStatus" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-examples": { @@ -261,10 +333,10 @@ } } }, - "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken": { "post": { "tags": [ - "RecoveryPoints" + "RecoveryPoints_GetAccessToken" ], "summary": "Returns the Access token for communication between BMS and Protection service", "operationId": "RecoveryPoints_GetAccessToken", @@ -311,6 +383,15 @@ "description": "Recovery Point Id", "required": true, "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "Get Access Token request", + "required": true, + "schema": { + "$ref": "#/definitions/AADPropertiesResource" + } } ], "responses": { @@ -319,6 +400,15 @@ "schema": { "$ref": "#/definitions/CrrAccessTokenResource" } + }, + "400": { + "description": "BadRequest" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-examples": { @@ -328,7 +418,150 @@ } } }, - "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": { + "get": { + "tags": [ + "BackupResourceStorageConfigs" + ], + "description": "Fetches resource storage config.", + "operationId": "BackupResourceStorageConfigs_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupResourceConfigResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Vault Storage Configuration": { + "$ref": "./examples/Common/BackupStorageConfig_Get.json" + } + } + }, + "put": { + "tags": [ + "BackupResourceStorageConfigs" + ], + "description": "Updates vault storage model type.", + "operationId": "BackupResourceStorageConfigs_Update", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "parameters", + "in": "body", + "description": "Vault storage config request", + "required": true, + "schema": { + "$ref": "#/definitions/BackupResourceConfigResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/BackupResourceConfigResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } + } + }, + "x-ms-examples": { + "Update Vault Storage Configuration": { + "$ref": "./examples/Common/BackupStorageConfig_Put.json" + } + } + }, + "patch": { + "tags": [ + "BackupResourceStorageConfigs" + ], + "description": "Updates vault storage model type.", + "operationId": "BackupResourceStorageConfigs_patch", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/VaultName" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "name": "parameters", + "in": "body", + "description": "Vault storage config request", + "required": true, + "schema": { + "$ref": "#/definitions/BackupResourceConfigResource" + } + } + ], + "responses": { + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } + } + }, + "x-ms-examples": { + "Update Vault Storage Configuration": { + "$ref": "./examples/Common/BackupStorageConfig_Patch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/": { "get": { "tags": [ "RecoveryPoints_Crr" @@ -386,6 +619,12 @@ "schema": { "$ref": "#/definitions/RecoveryPointResourceList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-odata": "#/definitions/BMSRPQueryObject", @@ -399,7 +638,7 @@ } } }, - "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/": { "get": { "tags": [ "BackupProtectedItems_Crr" @@ -443,6 +682,12 @@ "schema": { "$ref": "#/definitions/ProtectedItemResourceList" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/NewErrorResponse" + } } }, "x-ms-odata": "#/definitions/ProtectedItemQueryObject", @@ -458,6 +703,48 @@ } }, "definitions": { + "NewErrorResponse": { + "properties": { + "error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/NewErrorResponse" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + } + }, + "description": "The resource management error response." + }, "AADProperties": { "type": "object", "properties": { @@ -547,6 +834,13 @@ "description": "Timestamp of the last backup operation on this backup item.", "type": "string" }, + "kpisHealths": { + "description": "Health details of different KPIs", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/KPIResourceHealthDetails" + } + }, "extendedInfo": { "$ref": "#/definitions/AzureFileshareProtectedItemExtendedInfo", "description": "Additional information with this backup item." @@ -742,32 +1036,11 @@ "AzureIaaSVMHealthDetails": { "description": "Azure IaaS VM workload-specific Health Details.", "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "Health Code", - "type": "integer", - "readOnly": true - }, - "title": { - "description": "Health Title", - "type": "string", - "readOnly": true - }, - "message": { - "description": "Health Message", - "type": "string", - "readOnly": true - }, - "recommendations": { - "description": "Health Recommended Actions", - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true + "allOf": [ + { + "$ref": "#/definitions/ResourceHealthDetails" } - } + ] }, "AzureIaaSVMJob": { "description": "Azure IaaS VM workload-specific job object.", @@ -857,6 +1130,65 @@ } } }, + "KPIResourceHealthDetails": { + "description": "KPI Resource Health Details", + "type": "object", + "properties": { + "resourceHealthStatus": { + "description": "Resource Health Status", + "enum": [ + "Healthy", + "TransientDegraded", + "PersistentDegraded", + "TransientUnhealthy", + "PersistentUnhealthy", + "Invalid" + ], + "type": "string", + "x-ms-enum": { + "name": "ResourceHealthStatus", + "modelAsString": true + } + }, + "resourceHealthDetails": { + "description": "Resource Health Status", + "type": "array", + "items": { + "$ref": "#/definitions/ResourceHealthDetails" + } + } + } + }, + "ResourceHealthDetails": { + "description": "Health Details for backup items.", + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "Health Code", + "type": "integer", + "readOnly": true + }, + "title": { + "description": "Health Title", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Health Message", + "type": "string", + "readOnly": true + }, + "recommendations": { + "description": "Health Recommended Actions", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, "AzureIaaSVMJobTaskDetails": { "description": "Azure IaaS VM workload-specific job task details.", "type": "object", @@ -937,7 +1269,7 @@ } }, "healthStatus": { - "description": "Health status of protected item", + "description": "Health status of protected item.", "enum": [ "Passed", "ActionRequired", @@ -957,6 +1289,13 @@ "$ref": "#/definitions/AzureIaaSVMHealthDetails" } }, + "kpisHealths": { + "description": "Health details of different KPIs", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/KPIResourceHealthDetails" + } + }, "lastBackupStatus": { "description": "Last backup operation status.", "type": "string" @@ -1258,6 +1597,13 @@ "extendedInfo": { "$ref": "#/definitions/AzureVmWorkloadProtectedItemExtendedInfo", "description": "Additional information for this backup item." + }, + "kpisHealths": { + "description": "Health details of different KPIs", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/KPIResourceHealthDetails" + } } }, "x-ms-discriminator-value": "AzureVmWorkloadProtectedItem" @@ -1485,7 +1831,8 @@ "Invalid", "Full", "Log", - "Differential" + "Differential", + "Incremental" ], "type": "string", "x-ms-enum": { @@ -1738,7 +2085,8 @@ "Log", "Differential", "FullAndDifferential", - "All" + "All", + "Incremental" ], "type": "string", "x-ms-enum": { @@ -1752,6 +2100,101 @@ } } }, + "BackupResourceConfig": { + "description": "The resource storage details.", + "type": "object", + "properties": { + "storageModelType": { + "description": "Storage type", + "enum": [ + "Invalid", + "GeoRedundant", + "LocallyRedundant", + "ZoneRedundant", + "ReadAccessGeoZoneRedundant" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageType", + "modelAsString": true + } + }, + "storageType": { + "description": "Storage type.", + "enum": [ + "Invalid", + "GeoRedundant", + "LocallyRedundant", + "ZoneRedundant", + "ReadAccessGeoZoneRedundant" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageType", + "modelAsString": true + } + }, + "storageTypeState": { + "description": "Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.", + "enum": [ + "Invalid", + "Locked", + "Unlocked" + ], + "type": "string", + "x-ms-enum": { + "name": "StorageTypeState", + "modelAsString": true + } + }, + "crossRegionRestoreFlag": { + "description": "Opt in details of Cross Region Restore feature.", + "type": "boolean" + } + } + }, + "CrrJobRequest": { + "description": "Request object for fetching CRR jobs.", + "type": "object", + "properties": { + "resourceId": { + "description": "Entire ARM resource id of the resource", + "type": "string" + }, + "jobName": { + "description": "Job Name of the job to be fetched", + "type": "string" + } + } + }, + "CrrJobRequestResource": { + "description": "Request object for fetching CRR jobs.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/CrrJobRequest", + "description": "CrrJobRequestResource properties" + } + } + }, + "BackupResourceConfigResource": { + "description": "The resource storage details.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/BackupResourceConfig", + "description": "BackupResourceConfigResource properties" + } + } + }, "ClientScriptForConnect": { "description": "Client script details for file / folder restore.", "type": "object", @@ -1805,9 +2248,15 @@ } }, "CrrAccessToken": { - "description": "Container level access token for CRR", "type": "object", + "required": [ + "objectType" + ], "properties": { + "objectType": { + "description": "Type of the specific object - used for deserializing", + "type": "string" + }, "accessTokenString": { "description": "Access token used for authentication", "type": "string" @@ -1828,6 +2277,11 @@ "description": "Resource Id of the source vault", "type": "string" }, + "protectionContainerId": { + "format": "int64", + "description": "Protected item container id", + "type": "integer" + }, "recoveryPointId": { "description": "Recovery Point Id", "type": "string" @@ -1883,11 +2337,34 @@ "tokenExtendedInformation": { "description": "Extended Information about the token like FileSpec etc.", "type": "string" + }, + "rpTierInformation": { + "description": "Recovery point Tier Information", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "rpOriginalSAOption": { + "description": "Recovery point information: Original SA option", + "type": "boolean" + }, + "rpIsManagedVirtualMachine": { + "description": "Recovery point information: Managed virtual machine", + "type": "boolean" + }, + "rpVMSizeDescription": { + "description": "Recovery point information: VM size description", + "type": "string" + }, + "bMSActiveRegion": { + "description": "Active region name of BMS Stamp", + "type": "string" } - } + }, + "discriminator": "objectType" }, "CrrAccessTokenResource": { - "description": "Container level access token for CRR", "allOf": [ { "$ref": "#/definitions/Resource" @@ -2468,6 +2945,14 @@ "format": "int32", "type": "integer" } + }, + "restoreWithManagedDisks": { + "description": "Flag to denote of an Unmanaged disk VM should be restored with Managed disks.", + "type": "boolean" + }, + "diskEncryptionSetId": { + "description": "DiskEncryptionSet's ID - needed if the VM needs to be encrypted at rest during restore with customer managed key.", + "type": "string" } }, "x-ms-discriminator-value": "IaasVMRestoreRequest" @@ -2544,6 +3029,83 @@ }, "discriminator": "jobType" }, + "JobQueryObject": { + "description": "Filters to list the jobs.", + "type": "object", + "properties": { + "status": { + "description": "Status of the job.", + "enum": [ + "Invalid", + "InProgress", + "Completed", + "Failed", + "CompletedWithWarnings", + "Cancelled", + "Cancelling" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": true + } + }, + "backupManagementType": { + "description": "Type of backup management for the job.", + "enum": [ + "Invalid", + "AzureIaasVM", + "MAB", + "DPM", + "AzureBackupServer", + "AzureSql", + "AzureStorage", + "AzureWorkload", + "DefaultBackup" + ], + "type": "string", + "x-ms-enum": { + "name": "BackupManagementType", + "modelAsString": true + } + }, + "operation": { + "description": "Type of operation.", + "enum": [ + "Invalid", + "Register", + "UnRegister", + "ConfigureBackup", + "Backup", + "Restore", + "DisableBackup", + "DeleteBackupData", + "CrossRegionRestore", + "Undelete", + "UpdateCustomerManagedKey" + ], + "type": "string", + "x-ms-enum": { + "name": "JobOperationType", + "modelAsString": true + } + }, + "jobId": { + "description": "JobID represents the job uniquely.", + "type": "string" + }, + "startTime": { + "format": "date-time", + "description": "Job has started at this time. Value is in UTC.", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "Job has ended at this time. Value is in UTC.", + "type": "string" + } + } + }, "JobResource": { "description": "Defines workload agnostic properties for a job.", "allOf": [ @@ -3532,14 +4094,52 @@ "description": "Database name InstanceName/DataBaseName for SQL or System/DbName for SAP Hana", "type": "string" }, - "targetDirectoryMapping": { - "description": "This will contain the target folder mapping for the Full/Diff/Log/Incremental pits.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "targetDirectoryForFileRestore": { + "description": "Target directory location for restore as files.", + "type": "string" } } + }, + "WorkloadCrrAccessToken": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/CrrAccessToken" + } + ], + "properties": { + "protectableObjectUniqueName": { + "type": "string" + }, + "protectableObjectFriendlyName": { + "type": "string" + }, + "protectableObjectWorkloadType": { + "type": "string" + }, + "protectableObjectProtectionState": { + "type": "string" + }, + "protectableObjectContainerHostOsName": { + "type": "string" + }, + "protectableObjectParentLogicalContainerName": { + "type": "string" + }, + "containerId": { + "description": "Container Id", + "type": "string" + }, + "policyName": { + "description": "Policy Name", + "type": "string" + }, + "policyId": { + "description": "Policy Id", + "type": "string" + } + }, + "x-ms-discriminator-value": "WorkloadCrrAccessToken" } }, "parameters": { @@ -3574,9 +4174,9 @@ "x-ms-parameter-location": "method" }, "VaultName": { - "name": "vaultName", - "in": "path", "description": "The name of the recovery services vault.", + "in": "path", + "name": "vaultName", "required": true, "type": "string", "x-ms-parameter-location": "method" diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupProtectedItems_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupProtectedItems_List.json index 85d863d25ac1..8ceb418d7c90 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupProtectedItems_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/BackupProtectedItems_List.json @@ -15,14 +15,6 @@ "name": "VM;iaasvmcontainer;iaasvm-rg;iaasvm-1", "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", "properties": { - "friendlyName": "iaasvm-1", - "virtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/providers/Microsoft.ClassicCompute/virtualMachines/iaasvm-1", - "protectionStatus": "Healthy", - "protectionState": "Protected", - "healthStatus": "Passed", - "lastBackupStatus": "Completed", - "lastBackupTime": "2018-01-22T12:25:32.048723Z", - "protectedItemDataId": "636482643132986882", "protectedItemType": "Microsoft.ClassicCompute/virtualMachines", "backupManagementType": "AzureIaasVM", "workloadType": "VM", diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetAccessToken_Get.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetAccessToken_Get.json index d7706573b4a7..bedda70ca471 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetAccessToken_Get.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/GetAccessToken_Get.json @@ -7,7 +7,14 @@ "containerName": "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", "protectedItemName": "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall", "recoveryPointId": "26083826328862", - "api-version": "2018-12-20-preview" + "api-version": "2018-12-20-preview", + "parameters": { + "properties": { + "tenantId": "33e01921-4d64-4f8c-a055-5bdaffd5e33d", + "audience": "https://RecoveryServices/IaasCoord/aadmgmt/ase", + "servicePrincipalObjectId": "5ecd8123-cf74-4037-83e9-9246b227b351" + } + } }, "responses": { "200": { @@ -36,6 +43,7 @@ "tokenExtendedInformation": "V2015_091a2311d9-66f5-47d3-a9fb-7a37da63934b;BackUpOperationJobId;e1ebcf24-81a5-434e-b64b-cc81be65ae16falsefalsetrueWindowsCrashConsistentNormalStorageStandard_D2s_v3" } } - } + }, + "400": {} } } diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/ListCrrJobs_Post.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/ListCrrJobs_Post.json index 69c52aeeb20e..a5931d3fee4c 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/ListCrrJobs_Post.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/ListCrrJobs_Post.json @@ -4,7 +4,8 @@ "azureRegion": "southeastasia", "api-version": "2018-12-20", "parameters": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm" + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm", + "jobName": "02585cc9-d7f4-4b46-860c-14c048cce178" } }, "responses": { diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_Post.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_Post.json index 845ae5b837ab..ea31f675cf4d 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_Post.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/AzureIaasVm/TriggerCrossRegionRestore_Post.json @@ -4,50 +4,49 @@ "azureRegion": "southeastasia", "api-version": "2018-12-20", "parameters": { - "properties": { - "crossRegionRestoreAccessDetails": { - "accessTokenString": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhqaUJHdVExa2lWV2hyc2lzLUhEckhyWVZNbyJ9.eyJVc2VySWRlbnRpdHlUeXBlIjoiQUFEIiwiQWFkVGVuYW50SWQiOiIzM2UwMTkyMS00ZDY0LTRmOGMtYTA1NS01YmRhZmZkNWUzM2QiLCJBYWRTUE9iamVjdElkIjoiOTMzMjc2ZmMtMWJiNy00ZWNiLTk0ZTYtYWY3ODMyNWY3MjZhIiwiUmVzdG9yZVBvaW50UGVybWlzc2lvbnMiOiJSZWFkIiwiUmVzdG9yZVBvaW50SUQiOiJyZXNvdXJjZXMvMTMzMDgzNzkwNjQxODEzODE2MC9wcm90ZWN0aW9uQ29udGFpbmVycy8xMTE0Ni9wcm90ZWN0ZWRJdGVtcy8xMTQyOTM3MDMxL3JlY292ZXJ5UG9pbnRzLzg3MTc4MzU1MzkyNzE2IiwiaXNzIjoiaHR0cHM6Ly9SZWNvdmVyeVNlcnZpY2UiLCJhdWQiOiJodHRwczovL1JlY292ZXJ5U2VydmljZXMvUHJvdGVjdGlvblNlcnZpY2UiLCJleHAiOjE1NzExMjE5ODYsIm5iZiI6MTU3MTAzNTI4Nn0.oNbeX8ueE6JRGU0IagFjkOlU-o48ez9gCeCrn1-8XEsaVtYJIFKq9FeHfPAoCMxiLQvwL7S0JTjDTjiEsZEvr_VM7tDVwW3sESo2oW-SZlxT_1dJiUBn0jVlQyfDcHEMzbkaTuZswgNWfowgOrnJ67y-ztSUcegf3eVKPEhN1enBBS7pIuL9bZ3SVwMuqznUen6dH54y9lN2w6H14X0UK2CwSN94Uh-spB27j9SbksxLY_tyZm6xsamZFTHpwbgZwR24-GDtElPSxpFL6n_tWLSCHQtN9s84o0X7PfFaMkVmGWbOf4AZmP9M6agagG0JLnlOwObr07YrzZRkg3s2eQ", - "backupManagementType": "AzureIaasVM", - "containerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", - "containerType": "IaasVMContainer", - "coordinatorServiceStampUri": "https://pod01-coord1.ccy.backup.windowsazure.com", - "datasourceContainerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", - "datasourceId": "1142937031", - "datasourceName": "sriniccylinux", - "datasourceType": "VM", - "protectionServiceStampId": "90d98224-2ac6-4bda-9f35-33fb22841f2a", - "protectionServiceStampUri": "https://pod01-prot1-int.ccy.backup.windowsazure.com", - "recoveryPointId": "87178355392716", - "recoveryPointTime": "10/9/2019 6:05:54 PM", - "resourceGroupName": "srinivasccyrg", - "resourceId": "1330837906418138160", - "resourceName": "sriniccyvault", - "subscriptionId": "f2edfd5d-5496-4683-b94f-b3588c579009", - "tokenExtendedInformation": "V2015_09f2edfd5d-5496-4683-b94f-b3588c579009;AzureBackup_sriniccylinux_1142937031;AzureBackup_20191009_060554;AzureBackupRG_centraluseuap_1truetruefalseLinuxFileSystemConsistentPremiumVMOnPremiumStorageStandard_D2s_v3" + "crossRegionRestoreAccessDetails": { + "accessTokenString": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhqaUJHdVExa2lWV2hyc2lzLUhEckhyWVZNbyJ9.eyJVc2VySWRlbnRpdHlUeXBlIjoiQUFEIiwiQWFkVGVuYW50SWQiOiIzM2UwMTkyMS00ZDY0LTRmOGMtYTA1NS01YmRhZmZkNWUzM2QiLCJBYWRTUE9iamVjdElkIjoiOTMzMjc2ZmMtMWJiNy00ZWNiLTk0ZTYtYWY3ODMyNWY3MjZhIiwiUmVzdG9yZVBvaW50UGVybWlzc2lvbnMiOiJSZWFkIiwiUmVzdG9yZVBvaW50SUQiOiJyZXNvdXJjZXMvMTMzMDgzNzkwNjQxODEzODE2MC9wcm90ZWN0aW9uQ29udGFpbmVycy8xMTE0Ni9wcm90ZWN0ZWRJdGVtcy8xMTQyOTM3MDMxL3JlY292ZXJ5UG9pbnRzLzg3MTc4MzU1MzkyNzE2IiwiaXNzIjoiaHR0cHM6Ly9SZWNvdmVyeVNlcnZpY2UiLCJhdWQiOiJodHRwczovL1JlY292ZXJ5U2VydmljZXMvUHJvdGVjdGlvblNlcnZpY2UiLCJleHAiOjE1NzExMjE5ODYsIm5iZiI6MTU3MTAzNTI4Nn0.oNbeX8ueE6JRGU0IagFjkOlU-o48ez9gCeCrn1-8XEsaVtYJIFKq9FeHfPAoCMxiLQvwL7S0JTjDTjiEsZEvr_VM7tDVwW3sESo2oW-SZlxT_1dJiUBn0jVlQyfDcHEMzbkaTuZswgNWfowgOrnJ67y-ztSUcegf3eVKPEhN1enBBS7pIuL9bZ3SVwMuqznUen6dH54y9lN2w6H14X0UK2CwSN94Uh-spB27j9SbksxLY_tyZm6xsamZFTHpwbgZwR24-GDtElPSxpFL6n_tWLSCHQtN9s84o0X7PfFaMkVmGWbOf4AZmP9M6agagG0JLnlOwObr07YrzZRkg3s2eQ", + "backupManagementType": "AzureIaasVM", + "containerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", + "containerType": "IaasVMContainer", + "coordinatorServiceStampUri": "https://pod01-coord1.ccy.backup.windowsazure.com", + "datasourceContainerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", + "datasourceId": "1142937031", + "datasourceName": "sriniccylinux", + "datasourceType": "VM", + "protectionServiceStampId": "90d98224-2ac6-4bda-9f35-33fb22841f2a", + "protectionServiceStampUri": "https://pod01-prot1-int.ccy.backup.windowsazure.com", + "recoveryPointId": "87178355392716", + "recoveryPointTime": "10/9/2019 6:05:54 PM", + "resourceGroupName": "srinivasccyrg", + "resourceId": "1330837906418138160", + "resourceName": "sriniccyvault", + "subscriptionId": "f2edfd5d-5496-4683-b94f-b3588c579009", + "tokenExtendedInformation": "V2015_09f2edfd5d-5496-4683-b94f-b3588c579009;AzureBackup_sriniccylinux_1142937031;AzureBackup_20191009_060554;AzureBackupRG_centraluseuap_1truetruefalseLinuxFileSystemConsistentPremiumVMOnPremiumStorageStandard_D2s_v3" + }, + "restoreRequest": { + "affinityGroup": "", + "createNewCloudService": false, + "encryptionDetails": { + "encryptionEnabled": false }, - "restoreRequest": { - "affinityGroup": "", - "createNewCloudService": false, - "encryptionDetails": { - "encryptionEnabled": false - }, - "objectType": "IaasVMRestoreRequest", - "originalStorageAccountOption": false, - "recoveryPointId": "87178355392716", - "recoveryType": "AlternateLocation", - "region": "eastus2euap", - "sourceResourceId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/srinivasccyrg/providers/Microsoft.Compute/virtualMachines/sriniccylinux", - "storageAccountId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00prjaiTestRg1/providers/Microsoft.Storage/storageAccounts/00prjaitestrg1disks993", - "subnetId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet/subnets/default", - "targetDomainNameId": null, - "targetResourceGroupId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl", - "targetVirtualMachineId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl/providers/Microsoft.Compute/virtualMachines/gaallaVM", - "virtualNetworkId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet" - } + "objectType": "IaasVMRestoreRequest", + "originalStorageAccountOption": false, + "recoveryPointId": "87178355392716", + "recoveryType": "AlternateLocation", + "region": "eastus2euap", + "sourceResourceId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/srinivasccyrg/providers/Microsoft.Compute/virtualMachines/sriniccylinux", + "storageAccountId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00prjaiTestRg1/providers/Microsoft.Storage/storageAccounts/00prjaitestrg1disks993", + "subnetId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet/subnets/default", + "targetDomainNameId": null, + "targetResourceGroupId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl", + "targetVirtualMachineId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl/providers/Microsoft.Compute/virtualMachines/gaallaVM", + "virtualNetworkId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet" } } }, "responses": { + "200": {}, "202": { "headers": { "Location": "location: https://centraluseuap.management.azure.com/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/providers/microsoft.recoveryservices/locations/eastus2euap/backupCrrOperationResults/MTMzMDgzNzkwNjQxODEzODE2MDtkMTY3MzM3Yy0yM2I1LTQ5ODgtODkwZC0xY2MyMmQ5MTYyZjA=?api-version=2018-12-20-preview", diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Get.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Get.json new file mode 100644 index 000000000000..a22ef9d6df43 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Get.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "PythonSDKBackupTestRg", + "vaultName": "PySDKBackupTestRsVault", + "api-version": "2016-12-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupstorageconfig/vaultstorageconfig", + "name": "vaultstorageconfig", + "type": "Microsoft.RecoveryServices/vaults/backupstorageconfig", + "properties": { + "storageModelType": "GeoRedundant", + "storageType": "GeoRedundant", + "storageTypeState": "Locked" + } + } + } + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Patch.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Patch.json new file mode 100644 index 000000000000..34f7e0fea52d --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Patch.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "PythonSDKBackupTestRg", + "vaultName": "PySDKBackupTestRsVault", + "api-version": "2016-12-01", + "parameters": { + "properties": { + "storageType": "LocallyRedundant", + "storageTypeState": "Unlocked" + } + } + }, + "responses": { + "204": {} + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Put.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Put.json new file mode 100644 index 000000000000..67f6df781093 --- /dev/null +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2018-12-20/examples/Common/BackupStorageConfig_Put.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "PythonSDKBackupTestRg", + "vaultName": "PySDKBackupTestRsVault", + "api-version": "2016-12-01", + "parameters": { + "properties": { + "storageType": "LocallyRedundant", + "storageTypeState": "Unlocked" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupstorageconfig/vaultstorageconfig", + "name": "vaultstorageconfig", + "type": "Microsoft.RecoveryServices/vaults/backupstorageconfig", + "properties": { + "storageModelType": "LocallyRedundant", + "storageType": "LocallyRedundant", + "storageTypeState": "Unlocked" + } + } + } + } +} diff --git a/specification/recoveryservicesbackup/resource-manager/readme.md b/specification/recoveryservicesbackup/resource-manager/readme.md index 243c5478a575..30a6ceff5116 100644 --- a/specification/recoveryservicesbackup/resource-manager/readme.md +++ b/specification/recoveryservicesbackup/resource-manager/readme.md @@ -67,10 +67,8 @@ These settings apply only when `--tag=package-2020-07` is specified on the comma ``` yaml $(tag) == 'package-2020-07' input-file: - Microsoft.RecoveryServices/stable/2020-07-01/bms.json -- Microsoft.RecoveryServices/stable/2020-02-02/bms.json -- Microsoft.RecoveryServices/stable/2019-06-15/bms.json +- Microsoft.RecoveryServices/stable/2018-12-20/bms.json - Microsoft.RecoveryServices/stable/2017-07-01/bms.json -- Microsoft.RecoveryServices/stable/2016-12-01/bms.json - Microsoft.RecoveryServices/stable/2016-08-10/operations.json ```