Skip to content

Commit

Permalink
Recovery services backup october release (#16303)
Browse files Browse the repository at this point in the history
* Adds base for updating Microsoft.RecoveryServices from version stable/2021-08-01 to 2021-10-01

* Update Swagger spec and examples

* Update readme

* Resolve Avocado and PrettierCheck issues

* Resolve Model Validation issues
  • Loading branch information
abhinitkumar01 authored Oct 25, 2021
1 parent 0d31f20 commit 2e67345
Show file tree
Hide file tree
Showing 4 changed files with 420 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2010,6 +2010,12 @@
},
"Create or Update Full Azure Workload Protection Policy": {
"$ref": "./examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json"
},
"Create or Update Daily Azure Storage Protection Policy": {
"$ref": "./examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json"
},
"Create or Update Hourly Azure Storage Protection Policy": {
"$ref": "./examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json"
}
}
},
Expand Down Expand Up @@ -6806,6 +6812,26 @@
},
"x-ms-discriminator-value": "GenericProtectionPolicy"
},
"HourlySchedule": {
"type": "object",
"properties": {
"interval": {
"format": "int32",
"description": "Interval at which backup needs to be triggered. For hourly the value\r\n can be 4/6/8/12",
"type": "integer"
},
"scheduleWindowStartTime": {
"format": "date-time",
"description": "To specify start time of the backup window",
"type": "string"
},
"scheduleWindowDuration": {
"format": "int32",
"description": "To specify duration of the backup window",
"type": "integer"
}
}
},
"IdentityInfo": {
"description": "Encapsulates Managed Identity related information",
"type": "object",
Expand Down Expand Up @@ -8619,7 +8645,8 @@
"enum": [
"Invalid",
"Daily",
"Weekly"
"Weekly",
"Hourly"
],
"type": "string",
"x-ms-enum": {
Expand Down Expand Up @@ -8655,6 +8682,10 @@
"type": "string"
}
},
"hourlySchedule": {
"$ref": "#/definitions/HourlySchedule",
"description": "Hourly Schedule of this Policy"
},
"scheduleWeeklyFrequency": {
"format": "int32",
"description": "At every number weeks this schedule has to be run.",
Expand Down Expand Up @@ -9355,6 +9386,18 @@
"format": "int64",
"description": "Number of items backed up in this container.",
"type": "integer"
},
"acquireStorageAccountLock": {
"description": "Whether storage account lock is to be acquired for this container or not.",
"enum": [
"Acquire",
"NotAcquire"
],
"type": "string",
"x-ms-enum": {
"name": "AcquireStorageAccountLock",
"modelAsString": true
}
}
},
"x-ms-discriminator-value": "StorageContainer"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,42 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "test-rg",
"vaultName": "testvault",
"resourceGroupName": "SwaggerTestRg",
"vaultName": "swaggertestvault",
"fabricName": "Azure",
"containerName": "VMAppContainer;Compute;testRG;testSQL",
"containerName": "StorageContainer;Storage;SwaggerTestRg;swaggertestsa",
"api-version": "2021-10-01",
"parameters": {
"properties": {
"friendlyName": "testSQL",
"backupManagementType": "AzureWorkload",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testSQL",
"containerType": "VMAppContainer"
"friendlyName": "swaggertestsa",
"backupManagementType": "AzureStorage",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SwaggerTestRg/providers/Microsoft.Storage/storageAccounts/swaggertestsa",
"containerType": "StorageContainer",
"acquireStorageAccountLock": "Acquire"
}
}
},
"responses": {
"202": {
"headers": {
"Location": "https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/testvault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;testRG;testSQL/operationResults/00000000-0000-0000-0000-000000000000?api-version=2017-07-01",
"Azure-AsyncOperation": "https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.RecoveryServices/vaults/testvault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;testRG;testSQL/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2017-07-01",
"Azure-AsyncOperation": "https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupFabrics/Azure/protectionContainers/StorageContainer;Storage;SwaggerTestRg;swaggertestsa/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2019-05-13-preview",
"Location": "https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupFabrics/Azure/protectionContainers/StorageContainer;Storage;SwaggerTestRg;swaggertestsa/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-12-01",
"Retry-After": 60
}
},
"200": {
"body": {
"name": "VMAppContainer;Compute;testRG;testSQL",
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;testRG;testSQL",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers",
"id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupFabrics/Azure/protectionContainers/StorageContainer;Storage;SwaggerTestRg;swaggertestsa",
"name": "StorageContainer;Storage;SwaggerTestRg;swaggertestsa",
"properties": {
"extendedInfo": {
"hostServerName": "testsql",
"nodesList": [],
"inquiryInfo": {
"status": "Success",
"errorDetail": {
"code": "Success",
"message": "Not Available",
"recommendations": [
"Not Available"
]
},
"inquiryDetails": [
{
"type": "sql",
"itemCount": 14,
"inquiryValidation": {
"status": "Success",
"errorDetail": {
"code": "Success",
"message": "Not Available",
"recommendations": [
"Not Available"
]
}
}
}
]
}
},
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/testSQL",
"backupManagementType": "AzureWorkload",
"workloadType": null,
"containerType": "VMAppContainer",
"friendlyName": "testSQL"
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SwaggerTestRg/providers/Microsoft.Storage/storageAccounts/swaggertestsa",
"protectedItemCount": 0,
"acquireStorageAccountLock": "Acquire",
"friendlyName": "swaggertestsa",
"backupManagementType": "AzureStorage",
"registrationStatus": "Registered",
"healthStatus": "Healthy",
"containerType": "StorageContainer"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "SwaggerTestRg",
"vaultName": "swaggertestvault",
"policyName": "dailyPolicy2",
"api-version": "2021-10-01",
"parameters": {
"properties": {
"backupManagementType": "AzureStorage",
"workLoadType": "AzureFileShare",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2021-09-29T08:00:00.000Z"
]
},
"timeZone": "UTC",
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2021-09-29T08:00:00.000Z"
],
"retentionDuration": {
"count": 5,
"durationType": "Days"
}
},
"weeklySchedule": {
"daysOfTheWeek": [
"Sunday"
],
"retentionTimes": [
"2021-09-29T08:00:00.000Z"
],
"retentionDuration": {
"count": 12,
"durationType": "Weeks"
}
},
"monthlySchedule": {
"retentionScheduleFormatType": "Weekly",
"retentionScheduleDaily": null,
"retentionScheduleWeekly": {
"daysOfTheWeek": [
"Sunday"
],
"weeksOfTheMonth": [
"First"
]
},
"retentionTimes": [
"2021-09-29T08:00:00.000Z"
],
"retentionDuration": {
"count": 60,
"durationType": "Months"
}
},
"yearlySchedule": {
"retentionScheduleFormatType": "Weekly",
"monthsOfYear": [
"January"
],
"retentionScheduleDaily": null,
"retentionScheduleWeekly": {
"daysOfTheWeek": [
"Sunday"
],
"weeksOfTheMonth": [
"First"
]
},
"retentionTimes": [
"2021-09-29T08:00:00.000Z"
],
"retentionDuration": {
"count": 10,
"durationType": "Years"
}
}
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2",
"name": "dailyPolicy2",
"type": "Microsoft.RecoveryServices/vaults/backupPolicies",
"properties": {
"backupManagementType": "AzureStorage",
"schedulePolicy": {
"schedulePolicyType": "SimpleSchedulePolicy",
"scheduleRunFrequency": "Daily",
"scheduleRunTimes": [
"2021-09-29T08:00:00Z"
],
"scheduleWeeklyFrequency": 0
},
"retentionPolicy": {
"retentionPolicyType": "LongTermRetentionPolicy",
"dailySchedule": {
"retentionTimes": [
"2021-09-29T08:00:00Z"
],
"retentionDuration": {
"count": 5,
"durationType": "Days"
}
},
"weeklySchedule": {
"daysOfTheWeek": [
"Sunday"
],
"retentionTimes": [
"2021-09-29T08:00:00Z"
],
"retentionDuration": {
"count": 12,
"durationType": "Weeks"
}
},
"monthlySchedule": {
"retentionScheduleFormatType": "Weekly",
"retentionScheduleWeekly": {
"daysOfTheWeek": [
"Sunday"
],
"weeksOfTheMonth": [
"First"
]
},
"retentionTimes": [
"2021-09-29T08:00:00Z"
],
"retentionDuration": {
"count": 60,
"durationType": "Months"
}
},
"yearlySchedule": {
"retentionScheduleFormatType": "Weekly",
"monthsOfYear": [
"January"
],
"retentionScheduleWeekly": {
"daysOfTheWeek": [
"Sunday"
],
"weeksOfTheMonth": [
"First"
]
},
"retentionTimes": [
"2021-09-29T08:00:00Z"
],
"retentionDuration": {
"count": 10,
"durationType": "Years"
}
}
},
"timeZone": "UTC",
"protectedItemsCount": 0
}
}
},
"202": {
"headers": {
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01",
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01",
"Retry-After": 60
}
}
}
}
Loading

0 comments on commit 2e67345

Please sign in to comment.