From 3014257dbdb656756fbca298d179d90b37523f3f Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Thu, 13 Jan 2022 02:54:13 -0800 Subject: [PATCH 1/9] Additional TieringPolicy and ProtectedItemExtendedInfo details for version 2021-12-01 --- .../stable/2021-12-01/bms.json | 79 +++++++++++++++++++ .../AzureIaasVm/BackupPolicies_List.json | 12 +++ .../BackupProtectedItems_List.json | 10 ++- .../AzureWorkload/BackupPolicies_List.json | 7 ++ 4 files changed, 107 insertions(+), 1 deletion(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 2c1ee856b24a..8cf1c78112c9 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -5454,6 +5454,21 @@ "description": "The oldest backup copy available for this backup item.", "type": "string" }, + "oldestRecoveryPointInVault": { + "format": "date-time", + "description": "The oldest backup copy available for this backup item in vault tier", + "type": "string" + }, + "oldestRecoveryPointInArchive": { + "format": "date-time", + "description": "The oldest backup copy available for this backup item in archive tier", + "type": "string" + }, + "newestRecoveryPointInArchive": { + "format": "date-time", + "description": "The latest backup copy available for this backup item in archive tier", + "type": "string" + }, "recoveryPointCount": { "format": "int32", "description": "Number of backup copies available for this backup item.", @@ -5485,6 +5500,13 @@ "$ref": "#/definitions/RetentionPolicy", "description": "Retention policy with the details on backup copy retention ranges." }, + "tieringPolicy": { + "description": "Tiering policy to automatically move RPs to another tier\r\nKey is Target Tier, defined in RecoveryPointTierType enum.\r\nTiering policy specifies the criteria to move RP to the target tier.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TieringPolicy" + } + }, "instantRpRetentionRangeInDays": { "format": "int32", "description": "Instant RP retention policy range in days", @@ -5807,6 +5829,21 @@ "description": "The oldest backup copy available for this backup item.", "type": "string" }, + "oldestRecoveryPointInVault": { + "format": "date-time", + "description": "The oldest backup copy available for this backup item in vault tier", + "type": "string" + }, + "oldestRecoveryPointInArchive": { + "format": "date-time", + "description": "The oldest backup copy available for this backup item in archive tier", + "type": "string" + }, + "newestRecoveryPointInArchive": { + "format": "date-time", + "description": "The latest backup copy available for this backup item in archive tier", + "type": "string" + }, "recoveryPointCount": { "format": "int32", "description": "Number of backup copies available for this backup item.", @@ -9001,6 +9038,13 @@ "retentionPolicy": { "$ref": "#/definitions/RetentionPolicy", "description": "Retention policy with the details on backup copy retention ranges." + }, + "tieringPolicy": { + "description": "Tiering policy to automatically move RPs to another tier.\r\nKey is Target Tier, defined in RecoveryPointTierType enum.\r\nTiering policy specifies the criteria to move RP to the target tier.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TieringPolicy" + } } } }, @@ -12434,6 +12478,41 @@ } } } + }, + "TieringPolicy": { + "description": "Tiering Policy.", + "type": "object", + "properties": { + "tieringMode": { + "enum": [ + "Invalid", + "TierRecommended", + "TierAfter", + "DoNotTier" + ], + "type": "string" + }, + "duration": { + "format": "int32", + "description": "Number of days/weeks/months/years to retain backups in current tier before tiering.", + "type": "integer" + }, + "durationType": { + "description": "Retention duration type: days/weeks/months/years", + "enum": [ + "Invalid", + "Days", + "Weeks", + "Months", + "Years" + ], + "type": "string", + "x-ms-enum": { + "name": "RetentionDurationType", + "modelAsString": true + } + } + } } }, "parameters": { diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json index 364068241201..2ab8c74a2f5f 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json @@ -36,6 +36,11 @@ } } }, + "tieringPolicy" : { + "ArchivedRP" : { + "tieringMode": "TierRecommended" + } + }, "protectedItemsCount": 0 } }, @@ -65,6 +70,13 @@ } } }, + "tieringPolicy" : { + "ArchivedRP" : { + "tieringMode": "TierAfter", + "retentionDuration": 12, + "durationType": "Months" + } + }, "timeZone": "Pacific Standard Time", "protectedItemsCount": 0 } diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json index 1f5584b8e856..1a9d91f50a4f 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json @@ -29,7 +29,15 @@ "containerName": "iaasvmcontainer;iaasvm-rg;iaasvm-1", "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/providers/Microsoft.ClassicCompute/virtualMachines/iaasvm-1", "policyId": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1", - "lastRecoveryPoint": "2017-11-22T12:25:32.048723Z" + "lastRecoveryPoint": "2017-11-22T12:25:32.048723Z", + "extendedInfo": { + "oldestRecoveryPoint": "2021-01-30T00:09:30.8639311Z", + "oldestRecoveryPointInVault": "2021-01-30T00:09:30.8639311Z", + "oldestRecoveryPointInArchive ": "2021-01-30T00:09:30.8639311Z", + "newestRecoveryPointInArchive": "2021-01-30T00:09:30.8639311Z", + "recoveryPointCount": 14, + "policyInconsistent": false + } } } ] diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json index a20bed84739a..11788191e112 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json @@ -43,6 +43,13 @@ "durationType": "Days" } } + }, + "tieringPolicy" : { + "ArchivedRP" : { + "tieringMode": "TierAfter", + "duration": 60, + "durationType": "Days" + } } }, { From c9543ede838aaed848cb3893692d216d0911856e Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Wed, 26 Jan 2022 15:19:51 -0800 Subject: [PATCH 2/9] Prettier Fix --- .../examples/AzureIaasVm/BackupPolicies_List.json | 8 ++++---- .../examples/AzureWorkload/BackupPolicies_List.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json index 2ab8c74a2f5f..5461be742e9c 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json @@ -36,8 +36,8 @@ } } }, - "tieringPolicy" : { - "ArchivedRP" : { + "tieringPolicy": { + "ArchivedRP": { "tieringMode": "TierRecommended" } }, @@ -70,8 +70,8 @@ } } }, - "tieringPolicy" : { - "ArchivedRP" : { + "tieringPolicy": { + "ArchivedRP": { "tieringMode": "TierAfter", "retentionDuration": 12, "durationType": "Months" diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json index 11788191e112..2867b6c605cb 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureWorkload/BackupPolicies_List.json @@ -44,8 +44,8 @@ } } }, - "tieringPolicy" : { - "ArchivedRP" : { + "tieringPolicy": { + "ArchivedRP": { "tieringMode": "TierAfter", "duration": 60, "durationType": "Days" From 0cf5fdde5771aa3d7012db019fe6033003e3d233 Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Wed, 26 Jan 2022 15:26:06 -0800 Subject: [PATCH 3/9] Fixing ModelValidation --- .../2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json | 2 +- .../examples/AzureIaasVm/BackupProtectedItems_List.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json index 5461be742e9c..37cb62188a6f 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupPolicies_List.json @@ -73,7 +73,7 @@ "tieringPolicy": { "ArchivedRP": { "tieringMode": "TierAfter", - "retentionDuration": 12, + "duration": 12, "durationType": "Months" } }, diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json index 1a9d91f50a4f..de738fb7b3d8 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/examples/AzureIaasVm/BackupProtectedItems_List.json @@ -33,7 +33,7 @@ "extendedInfo": { "oldestRecoveryPoint": "2021-01-30T00:09:30.8639311Z", "oldestRecoveryPointInVault": "2021-01-30T00:09:30.8639311Z", - "oldestRecoveryPointInArchive ": "2021-01-30T00:09:30.8639311Z", + "oldestRecoveryPointInArchive": "2021-01-30T00:09:30.8639311Z", "newestRecoveryPointInArchive": "2021-01-30T00:09:30.8639311Z", "recoveryPointCount": 14, "policyInconsistent": false From 0acbb0e6a6b586651f512682a5926b4406cde423 Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Mon, 14 Feb 2022 02:55:48 -0800 Subject: [PATCH 4/9] Fixing LintDiff --- .../Microsoft.RecoveryServices/stable/2021-12-01/bms.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 8cf1c78112c9..384145b9b78b 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -12484,13 +12484,18 @@ "type": "object", "properties": { "tieringMode": { + "description": "Tiering Mode to control automatic tiering of recovery points", "enum": [ "Invalid", "TierRecommended", "TierAfter", "DoNotTier" ], - "type": "string" + "type": "string", + "x-ms-enum": { + "name": "TieringMode", + "modelAsString": true + } }, "duration": { "format": "int32", From 0e335a51fd2c5cf75e8b3cc148b39983ea36899d Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Mon, 14 Feb 2022 19:10:06 -0800 Subject: [PATCH 5/9] Added more details in description as per review comments --- .../Microsoft.RecoveryServices/stable/2021-12-01/bms.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 384145b9b78b..5d9335f4b3f9 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -12480,11 +12480,11 @@ } }, "TieringPolicy": { - "description": "Tiering Policy.", + "description": "Tiering Policy for a target tier.\r\nIf the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier", "type": "object", "properties": { "tieringMode": { - "description": "Tiering Mode to control automatic tiering of recovery points", + "description": "Tiering Mode to control automatic tiering of recovery points. Supported values are:\r\n1. TierRecommended: Tier all recovery points recommended to be tiered\r\n2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below.\r\n3. DoNotTier: Do not tier any recovery points", "enum": [ "Invalid", "TierRecommended", @@ -12499,11 +12499,11 @@ }, "duration": { "format": "int32", - "description": "Number of days/weeks/months/years to retain backups in current tier before tiering.", + "description": "Number of days/weeks/months/years to retain backups in current tier before tiering.\r\nUsed only if TieringMode is set to TierAfter", "type": "integer" }, "durationType": { - "description": "Retention duration type: days/weeks/months/years", + "description": "Retention duration type: days/weeks/months/years\r\nUsed only if TieringMode is set to TierAfter", "enum": [ "Invalid", "Days", From 09d4329120b21e4bc7e0e8e179a288ab006a7a7d Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Tue, 15 Feb 2022 13:31:10 -0800 Subject: [PATCH 6/9] Updated description for oldestRecoveryPoint --- .../Microsoft.RecoveryServices/stable/2021-12-01/bms.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 5d9335f4b3f9..85aadaed46ae 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -5451,7 +5451,7 @@ "properties": { "oldestRecoveryPoint": { "format": "date-time", - "description": "The oldest backup copy available for this backup item.", + "description": "The oldest backup copy available for this backup item across all tiers.", "type": "string" }, "oldestRecoveryPointInVault": { @@ -5826,7 +5826,7 @@ "properties": { "oldestRecoveryPoint": { "format": "date-time", - "description": "The oldest backup copy available for this backup item.", + "description": "The oldest backup copy available for this backup item across all tiers.", "type": "string" }, "oldestRecoveryPointInVault": { From 0685ca52ca7395a49e6960deffb6857eddde6f38 Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Tue, 8 Mar 2022 00:34:05 -0800 Subject: [PATCH 7/9] Fixing Prettier --- .../Microsoft.RecoveryServices/stable/2021-12-01/bms.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 85aadaed46ae..9e5e75b0ae88 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -12503,7 +12503,7 @@ "type": "integer" }, "durationType": { - "description": "Retention duration type: days/weeks/months/years\r\nUsed only if TieringMode is set to TierAfter", + "description": "Retention duration type: days/weeks/months/years\r\nUsed only if TieringMode is set to TierAfter", "enum": [ "Invalid", "Days", From 96705a08550ede1111515a2bb8862be8eaa07792 Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Tue, 8 Mar 2022 19:01:30 -0800 Subject: [PATCH 8/9] Test Fix for SDK generation --- specification/recoveryservicesbackup/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/recoveryservicesbackup/resource-manager/readme.md b/specification/recoveryservicesbackup/resource-manager/readme.md index 8530169fe793..e094d3e9dba4 100644 --- a/specification/recoveryservicesbackup/resource-manager/readme.md +++ b/specification/recoveryservicesbackup/resource-manager/readme.md @@ -306,7 +306,7 @@ csharp: payload-flattening-threshold: 1 license-header: MICROSOFT_MIT_NO_VERSION namespace: Microsoft.Azure.Management.RecoveryServices.Backup - output-folder: $(csharp-sdks-folder)/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated + output-folder: $(csharp-sdks-folder)/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated clear-output-folder: true ``` From 664b873c0a2a81a0e5fa7a934d0741b72b8a3a74 Mon Sep 17 00:00:00 2001 From: Anjor Hemant Date: Thu, 10 Mar 2022 15:41:52 -0800 Subject: [PATCH 9/9] SemanticValidation Fixes --- .../Microsoft.RecoveryServices/stable/2021-12-01/bms.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json index 9e5e75b0ae88..61a84244bca4 100644 --- a/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json +++ b/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-12-01/bms.json @@ -11390,7 +11390,7 @@ "type": "string" } }, - "x-ms-discriminator-value": "IaaSVMContainer" + "x-ms-discriminator-value": "IaasVMContainer" }, "IaasVMILRRegistrationRequest": { "description": "Restore files/folders from a backup copy of IaaS VM.", @@ -11980,7 +11980,10 @@ "VMAppContainer", "SQLAGWorkLoadContainer", "StorageContainer", - "GenericContainer" + "GenericContainer", + "AzureWorkloadContainer", + "Microsoft.ClassicCompute/virtualMachines", + "Microsoft.Compute/virtualMachines" ], "type": "string", "x-ms-enum": {