Skip to content

Commit 26128b7

Browse files
Microsoft.DataProtection swagger changes (Azure#13334)
* Microsoft.DataProtection swagger changes * Added example file FindRestorableTimeRanges.json * Adding 202 GetOperationResult (#1) * adding 202 GetOperationResult * added headers Co-authored-by: Mayank Aggarwal <[email protected]> * pr comments fixes * prettier fixes * adding fix for x-ms-error-response * Added missed DppWorkerRequest object in swagger json * Validation fixes * changes for request * removing objectType Co-authored-by: Mayank Aggarwal <[email protected]> Co-authored-by: Mayank Aggarwal <[email protected]>
1 parent 542fa4e commit 26128b7

File tree

3 files changed

+271
-6
lines changed

3 files changed

+271
-6
lines changed

specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2021-02-01-preview/dataprotection.json

Lines changed: 235 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@
9191
}
9292
],
9393
"responses": {
94+
"202": {
95+
"description": "Accepted",
96+
"headers": {
97+
"Location": {
98+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
99+
"type": "string"
100+
},
101+
"Azure-AsyncOperation": {
102+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
103+
"type": "string"
104+
},
105+
"Retry-After": {
106+
"description": "Suggested delay to check the status of the asynchronous operation. The value is an integer that represents the seconds.",
107+
"type": "integer",
108+
"format": "int32"
109+
}
110+
}
111+
},
94112
"200": {
95113
"description": "Contains additional information like job Id",
96114
"schema": {
@@ -260,7 +278,7 @@
260278
"BackupVaults"
261279
],
262280
"description": "Creates or updates a BackupVault resource belonging to a resource group.",
263-
"operationId": "BackupVaults_Put",
281+
"operationId": "BackupVaults_CreateOrUpdate",
264282
"consumes": [
265283
"application/json"
266284
],
@@ -720,7 +738,7 @@
720738
"tags": [
721739
"BackupPolicies"
722740
],
723-
"operationId": "BackupPolicies_Put",
741+
"operationId": "BackupPolicies_CreateOrUpdate",
724742
"summary": "Creates or Updates a backup policy belonging to a backup vault",
725743
"produces": [
726744
"application/json"
@@ -830,7 +848,7 @@
830848
"BackupInstances"
831849
],
832850
"description": "Gets a backup instances belonging to a backup vault",
833-
"operationId": "BackupInstances_GetBackupInstancesInVault",
851+
"operationId": "BackupInstances_List",
834852
"produces": [
835853
"application/json"
836854
],
@@ -927,7 +945,7 @@
927945
"tags": [
928946
"BackupInstances"
929947
],
930-
"operationId": "BackupInstances_Put",
948+
"operationId": "BackupInstances_CreateOrUpdate",
931949
"produces": [
932950
"application/json"
933951
],
@@ -1628,6 +1646,65 @@
16281646
}
16291647
}
16301648
},
1649+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstances}/findRestorableTimeRanges": {
1650+
"post": {
1651+
"tags": [
1652+
"FindRestorableTimeRanges"
1653+
],
1654+
"operationId": "FindRestorableTimeRanges_Post",
1655+
"produces": [
1656+
"application/json"
1657+
],
1658+
"parameters": [
1659+
{
1660+
"$ref": "#/parameters/ApiVersion"
1661+
},
1662+
{
1663+
"$ref": "#/parameters/VaultName"
1664+
},
1665+
{
1666+
"$ref": "#/parameters/ResourceGroupName"
1667+
},
1668+
{
1669+
"$ref": "#/parameters/SubscriptionId"
1670+
},
1671+
{
1672+
"name": "backupInstances",
1673+
"in": "path",
1674+
"required": true,
1675+
"type": "string"
1676+
},
1677+
{
1678+
"name": "parameters",
1679+
"in": "body",
1680+
"description": "Request body for operation",
1681+
"required": true,
1682+
"schema": {
1683+
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesRequest"
1684+
}
1685+
}
1686+
],
1687+
"responses": {
1688+
"200": {
1689+
"description": "OK",
1690+
"schema": {
1691+
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesResponseResource"
1692+
}
1693+
},
1694+
"default": {
1695+
"description": "Error response describing why the operation failed.",
1696+
"schema": {
1697+
"$ref": "#/definitions/CloudError"
1698+
}
1699+
}
1700+
},
1701+
"x-ms-examples": {
1702+
"Find Restorable Time Ranges": {
1703+
"$ref": "./examples/BackupInstanceOperations/FindRestorableTimeRanges.json"
1704+
}
1705+
}
1706+
}
1707+
},
16311708
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}": {
16321709
"get": {
16331710
"tags": [
@@ -1935,6 +2012,82 @@
19352012
"type": "object",
19362013
"x-ms-discriminator-value": "AzureBackupDiscreteRecoveryPoint"
19372014
},
2015+
"AzureBackupFindRestorableTimeRangesRequest": {
2016+
"description": "List Restore Ranges Request",
2017+
"required": [
2018+
"sourceDataStoreType",
2019+
"startTime",
2020+
"endTime"
2021+
],
2022+
"type": "object",
2023+
"properties": {
2024+
"sourceDataStoreType": {
2025+
"description": "Gets or sets the type of the source data store.",
2026+
"enum": [
2027+
"OperationalStore",
2028+
"VaultStore",
2029+
"ArchiveStore"
2030+
],
2031+
"type": "string",
2032+
"x-ms-enum": {
2033+
"name": "RestoreSourceDataStoreType",
2034+
"modelAsString": true
2035+
}
2036+
},
2037+
"startTime": {
2038+
"description": "Start time for the List Restore Ranges request",
2039+
"type": "string"
2040+
},
2041+
"endTime": {
2042+
"description": "End time for the List Restore Ranges request",
2043+
"type": "string"
2044+
}
2045+
}
2046+
},
2047+
"AzureBackupFindRestorableTimeRangesRequestResource": {
2048+
"description": "List Restore Ranges Request",
2049+
"allOf": [
2050+
{
2051+
"$ref": "#/definitions/DppWorkerRequest"
2052+
}
2053+
],
2054+
"properties": {
2055+
"content": {
2056+
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesRequest",
2057+
"description": "AzureBackupFindRestorableTimeRangesRequestResource content"
2058+
}
2059+
}
2060+
},
2061+
"AzureBackupFindRestorableTimeRangesResponse": {
2062+
"description": "List Restore Ranges Response",
2063+
"type": "object",
2064+
"properties": {
2065+
"restorableTimeRanges": {
2066+
"description": "Returns the Restore Ranges available on the Backup Instance.",
2067+
"type": "array",
2068+
"items": {
2069+
"$ref": "#/definitions/RestorableTimeRange"
2070+
}
2071+
},
2072+
"objectType": {
2073+
"type": "string"
2074+
}
2075+
}
2076+
},
2077+
"AzureBackupFindRestorableTimeRangesResponseResource": {
2078+
"description": "List Restore Ranges Response",
2079+
"allOf": [
2080+
{
2081+
"$ref": "#/definitions/DppResource"
2082+
}
2083+
],
2084+
"properties": {
2085+
"properties": {
2086+
"$ref": "#/definitions/AzureBackupFindRestorableTimeRangesResponse",
2087+
"description": "AzureBackupFindRestorableTimeRangesResponseResource properties"
2088+
}
2089+
}
2090+
},
19382091
"AzureBackupJob": {
19392092
"description": "AzureBackup Job Class",
19402093
"properties": {
@@ -2298,6 +2451,26 @@
22982451
"type": "object",
22992452
"x-ms-discriminator-value": "AzureBackupRestoreWithRehydrationRequest"
23002453
},
2454+
"AzureBackupRecoveryTimeBasedRestoreRequest": {
2455+
"allOf": [
2456+
{
2457+
"$ref": "#/definitions/AzureBackupRestoreRequest"
2458+
}
2459+
],
2460+
"description": "AzureBackup RecoveryPointTime Based Restore Request",
2461+
"properties": {
2462+
"recoveryPointTime": {
2463+
"description": "The recovery time in ISO 8601 format example - 2020-08-14T17:30:00.0000000Z.",
2464+
"type": "string"
2465+
}
2466+
},
2467+
"required": [
2468+
"recoveryPointTime"
2469+
],
2470+
"title": "AzureBackupRecoveryTimeBasedRestoreRequest",
2471+
"type": "object",
2472+
"x-ms-discriminator-value": "AzureBackupRecoveryTimeBasedRestoreRequest"
2473+
},
23012474
"AzureBackupRule": {
23022475
"allOf": [
23032476
{
@@ -3227,6 +3400,44 @@
32273400
},
32283401
"type": "object"
32293402
},
3403+
"DppWorkerRequest": {
3404+
"type": "object",
3405+
"properties": {
3406+
"subscriptionId": {
3407+
"type": "string"
3408+
},
3409+
"uri": {
3410+
"type": "string"
3411+
},
3412+
"headers": {
3413+
"type": "object",
3414+
"additionalProperties": {
3415+
"type": "array",
3416+
"items": {
3417+
"type": "string"
3418+
}
3419+
}
3420+
},
3421+
"supportedGroupVersions": {
3422+
"type": "array",
3423+
"items": {
3424+
"type": "string"
3425+
}
3426+
},
3427+
"cultureInfo": {
3428+
"type": "string"
3429+
},
3430+
"parameters": {
3431+
"type": "object",
3432+
"additionalProperties": {
3433+
"type": "string"
3434+
}
3435+
},
3436+
"httpMethod": {
3437+
"type": "string"
3438+
}
3439+
}
3440+
},
32303441
"Error": {
32313442
"description": "The resource management error response.",
32323443
"properties": {
@@ -3806,6 +4017,26 @@
38064017
],
38074018
"type": "object"
38084019
},
4020+
"RestorableTimeRange": {
4021+
"required": [
4022+
"startTime",
4023+
"endTime"
4024+
],
4025+
"type": "object",
4026+
"properties": {
4027+
"startTime": {
4028+
"description": "Start time for the available restore range",
4029+
"type": "string"
4030+
},
4031+
"endTime": {
4032+
"description": "End time for the available restore range",
4033+
"type": "string"
4034+
},
4035+
"objectType": {
4036+
"type": "string"
4037+
}
4038+
}
4039+
},
38094040
"RetentionTag": {
38104041
"description": "Retention tag",
38114042
"properties": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "04cf684a-d41f-4550-9f70-7708a3a2283b",
4+
"resourceGroupName": "Blob-Backup",
5+
"vaultName": "ZBlobBackupVaultBVTD3",
6+
"backupInstances": "zblobbackuptestsa58",
7+
"api-version": "2021-02-01-preview",
8+
"parameters": {
9+
"sourceDataStoreType": "OperationalStore",
10+
"startTime": "2020-10-17T23:28:17.6829685Z",
11+
"endTime": "2021-02-24T00:35:17.6829685Z"
12+
}
13+
},
14+
"responses": {
15+
"200": {
16+
"body": {
17+
"id": "zblobbackuptestsa58",
18+
"type": "Microsoft.DataProtection/backupVaults/backupInstances/findRestorableTimeRanges",
19+
"properties": {
20+
"restorableTimeRanges": [
21+
{
22+
"startTime": "2021-02-23T18:33:51.6349708Z",
23+
"endTime": "2021-02-24T00:35:17.0000000Z",
24+
"objectType": "RestorableTimeRange"
25+
}
26+
],
27+
"objectType": "AzureBackupFindRestorableTimeRangesResponse"
28+
}
29+
}
30+
}
31+
}
32+
}

specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2021-02-01-preview/examples/GetOperationResult.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
"api-version": "2021-02-01-preview"
77
},
88
"responses": {
9-
"200": {
9+
"202": {
1010
"headers": {
1111
"Location": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/operationResults/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
1212
"Azure-AsyncOperation": "https://api-dogfood.resources.windows-int.net/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/providers/Microsoft.DataProtection/locations/westus/operationStatus/ZTA4YjQ0ZGYtYmNkNS00YTk1LWFjZTMtOTc1MjNmZWIxYWZlO2Y1ODg1MzA3LWJkNjItNDQ2OC05ZjZlLTJkMGM2NjNiNmJmNg==?api-version=2021-02-01-preview",
1313
"Retry-After": "60"
14-
},
14+
}
15+
},
16+
"200": {
1517
"body": {
1618
"jobId": "c60cb49-63e8-4b21-b9bd-26277b3fdfae"
1719
}

0 commit comments

Comments
 (0)