Skip to content

Commit 2cbe9bd

Browse files
Fixing swagger correctness and completeness issues for RecoveryServicesBackup (#15024)
* Fixing swagger correctness and completeness issues for RecoveryServicesBackup * Adding examples * Fixing swagger completness * Updating tag in 2021-04-01 * Update * Update
1 parent 55558c4 commit 2cbe9bd

File tree

6 files changed

+284
-23
lines changed

6 files changed

+284
-23
lines changed

specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-04-01/bms.json

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,149 @@
1818
"application/json"
1919
],
2020
"paths": {
21+
"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig": {
22+
"get": {
23+
"tags": [
24+
"BackupResourceStorageConfigsNonCRR"
25+
],
26+
"description": "Fetches resource storage config.",
27+
"operationId": "BackupResourceStorageConfigsNonCRR_Get",
28+
"produces": [
29+
"application/json"
30+
],
31+
"parameters": [
32+
{
33+
"$ref": "#/parameters/ApiVersion"
34+
},
35+
{
36+
"$ref": "#/parameters/VaultName"
37+
},
38+
{
39+
"$ref": "#/parameters/ResourceGroupName"
40+
},
41+
{
42+
"$ref": "#/parameters/SubscriptionId"
43+
}
44+
],
45+
"responses": {
46+
"200": {
47+
"description": "OK",
48+
"schema": {
49+
"$ref": "#/definitions/BackupResourceConfigResource"
50+
}
51+
},
52+
"default": {
53+
"description": "Error response describing why the operation failed.",
54+
"schema": {
55+
"$ref": "#/definitions/NewErrorResponse"
56+
}
57+
}
58+
},
59+
"x-ms-examples": {
60+
"Get Vault Storage Configuration": {
61+
"$ref": "./examples/Common/BackupStorageConfig_Get.json"
62+
}
63+
}
64+
},
65+
"put": {
66+
"tags": [
67+
"BackupResourceStorageConfigsNonCRR"
68+
],
69+
"description": "Updates vault storage model type.",
70+
"operationId": "BackupResourceStorageConfigsNonCRR_Update",
71+
"produces": [
72+
"application/json"
73+
],
74+
"parameters": [
75+
{
76+
"$ref": "#/parameters/ApiVersion"
77+
},
78+
{
79+
"$ref": "#/parameters/VaultName"
80+
},
81+
{
82+
"$ref": "#/parameters/ResourceGroupName"
83+
},
84+
{
85+
"$ref": "#/parameters/SubscriptionId"
86+
},
87+
{
88+
"name": "parameters",
89+
"in": "body",
90+
"description": "Vault storage config request",
91+
"required": true,
92+
"schema": {
93+
"$ref": "#/definitions/BackupResourceConfigResource"
94+
}
95+
}
96+
],
97+
"responses": {
98+
"200": {
99+
"description": "OK",
100+
"schema": {
101+
"$ref": "#/definitions/BackupResourceConfigResource"
102+
}
103+
},
104+
"default": {
105+
"description": "Error response describing why the operation failed.",
106+
"schema": {
107+
"$ref": "#/definitions/NewErrorResponse"
108+
}
109+
}
110+
},
111+
"x-ms-examples": {
112+
"Update Vault Storage Configuration": {
113+
"$ref": "./examples/Common/BackupStorageConfig_Put.json"
114+
}
115+
}
116+
},
117+
"patch": {
118+
"tags": [
119+
"BackupResourceStorageConfigsNonCRR"
120+
],
121+
"description": "Updates vault storage model type.",
122+
"operationId": "BackupResourceStorageConfigsNonCRR_patch",
123+
"parameters": [
124+
{
125+
"$ref": "#/parameters/ApiVersion"
126+
},
127+
{
128+
"$ref": "#/parameters/VaultName"
129+
},
130+
{
131+
"$ref": "#/parameters/ResourceGroupName"
132+
},
133+
{
134+
"$ref": "#/parameters/SubscriptionId"
135+
},
136+
{
137+
"name": "parameters",
138+
"in": "body",
139+
"description": "Vault storage config request",
140+
"required": true,
141+
"schema": {
142+
"$ref": "#/definitions/BackupResourceConfigResource"
143+
}
144+
}
145+
],
146+
"responses": {
147+
"204": {
148+
"description": "NoContent"
149+
},
150+
"default": {
151+
"description": "Error response describing why the operation failed.",
152+
"schema": {
153+
"$ref": "#/definitions/NewErrorResponse"
154+
}
155+
}
156+
},
157+
"x-ms-examples": {
158+
"Update Vault Storage Configuration": {
159+
"$ref": "./examples/Common/BackupStorageConfig_Patch.json"
160+
}
161+
}
162+
}
163+
},
21164
"/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupPreValidateProtection": {
22165
"post": {
23166
"tags": [
@@ -5885,6 +6028,73 @@
58856028
},
58866029
"x-ms-discriminator-value": "DpmJob"
58876030
},
6031+
"BackupResourceConfigResource": {
6032+
"description": "The resource storage details.",
6033+
"allOf": [
6034+
{
6035+
"$ref": "#/definitions/Resource"
6036+
}
6037+
],
6038+
"properties": {
6039+
"properties": {
6040+
"$ref": "#/definitions/BackupResourceConfig",
6041+
"description": "BackupResourceConfigResource properties"
6042+
}
6043+
}
6044+
},
6045+
"BackupResourceConfig": {
6046+
"description": "The resource storage details.",
6047+
"type": "object",
6048+
"properties": {
6049+
"storageModelType": {
6050+
"description": "Storage type",
6051+
"enum": [
6052+
"Invalid",
6053+
"GeoRedundant",
6054+
"LocallyRedundant",
6055+
"ZoneRedundant",
6056+
"ReadAccessGeoZoneRedundant"
6057+
],
6058+
"type": "string",
6059+
"x-ms-enum": {
6060+
"name": "StorageType",
6061+
"modelAsString": true
6062+
}
6063+
},
6064+
"storageType": {
6065+
"description": "Storage type.",
6066+
"enum": [
6067+
"Invalid",
6068+
"GeoRedundant",
6069+
"LocallyRedundant",
6070+
"ZoneRedundant",
6071+
"ReadAccessGeoZoneRedundant"
6072+
],
6073+
"type": "string",
6074+
"x-ms-enum": {
6075+
"name": "StorageType",
6076+
"modelAsString": true
6077+
}
6078+
},
6079+
"storageTypeState": {
6080+
"description": "Locked or Unlocked. Once a machine is registered against a resource, the storageTypeState is always Locked.",
6081+
"enum": [
6082+
"Invalid",
6083+
"Locked",
6084+
"Unlocked"
6085+
],
6086+
"type": "string",
6087+
"x-ms-enum": {
6088+
"name": "StorageTypeState",
6089+
"modelAsString": true
6090+
}
6091+
},
6092+
"crossRegionRestoreFlag": {
6093+
"description": "Opt in details of Cross Region Restore feature.",
6094+
"type": "boolean"
6095+
}
6096+
}
6097+
},
58886098
"DpmJobExtendedInfo": {
58896099
"description": "Additional information on the DPM workload-specific job.",
58906100
"type": "object",

specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-04-01/examples/AzureIaasVm/RecoveryPoints_List.json

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"fabricName": "Azure",
77
"containerName": "IaasVMContainer;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
88
"protectedItemName": "VM;iaasvmcontainerv2;rshhtestmdvmrg;rshmdvmsmall",
9-
"api-version": "2021-01-01"
9+
"api-version": "2019-05-13"
1010
},
1111
"responses": {
1212
"200": {
@@ -27,18 +27,13 @@
2727
"recoveryPointTierDetails": [
2828
{
2929
"type": "InstantRP",
30-
"status": "Deleted"
30+
"status": "Valid"
3131
},
3232
{
3333
"type": "HardenedRP",
3434
"status": "Valid"
3535
}
3636
],
37-
"recoveryPointMoveReadinessInfo": {
38-
"Archive": {
39-
"isReadyForMove": true
40-
}
41-
},
4237
"isManagedVirtualMachine": true,
4338
"virtualMachineSize": "Standard_D1",
4439
"originalStorageAccountOption": false
@@ -59,26 +54,13 @@
5954
"recoveryPointTierDetails": [
6055
{
6156
"type": "InstantRP",
62-
"status": "Deleted"
57+
"status": "Valid"
6358
},
6459
{
6560
"type": "HardenedRP",
66-
"status": "Deleted"
67-
},
68-
{
69-
"type": "ArchivedRP",
70-
"status": "Rehydrated",
71-
"extendedInfo": {
72-
"RehydratedRPExpiryTime": "2020-12-21T22:48:25.4353958Z"
73-
}
61+
"status": "Valid"
7462
}
7563
],
76-
"recoveryPointMoveReadinessInfo": {
77-
"ArchivedRP": {
78-
"isReadyForMove": false,
79-
"additionalInfo": "Recovery point cannot be moved to archive tier since it has already been moved."
80-
}
81-
},
8264
"isManagedVirtualMachine": true,
8365
"virtualMachineSize": "Standard_D1",
8466
"originalStorageAccountOption": false,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"resourceGroupName": "PythonSDKBackupTestRg",
5+
"vaultName": "PySDKBackupTestRsVault",
6+
"api-version": "2016-12-01"
7+
},
8+
"responses": {
9+
"200": {
10+
"headers": {},
11+
"body": {
12+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupstorageconfig/vaultstorageconfig",
13+
"name": "vaultstorageconfig",
14+
"type": "Microsoft.RecoveryServices/vaults/backupstorageconfig",
15+
"properties": {
16+
"storageModelType": "GeoRedundant",
17+
"storageType": "GeoRedundant",
18+
"storageTypeState": "Locked"
19+
}
20+
}
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"resourceGroupName": "PythonSDKBackupTestRg",
5+
"vaultName": "PySDKBackupTestRsVault",
6+
"api-version": "2016-12-01",
7+
"parameters": {
8+
"properties": {
9+
"storageType": "LocallyRedundant",
10+
"storageTypeState": "Unlocked"
11+
}
12+
}
13+
},
14+
"responses": {
15+
"204": {}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
4+
"resourceGroupName": "PythonSDKBackupTestRg",
5+
"vaultName": "PySDKBackupTestRsVault",
6+
"api-version": "2016-12-01",
7+
"parameters": {
8+
"properties": {
9+
"storageType": "LocallyRedundant",
10+
"storageTypeState": "Unlocked"
11+
}
12+
}
13+
},
14+
"responses": {
15+
"200": {
16+
"headers": {},
17+
"body": {
18+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupstorageconfig/vaultstorageconfig",
19+
"name": "vaultstorageconfig",
20+
"type": "Microsoft.RecoveryServices/vaults/backupstorageconfig",
21+
"properties": {
22+
"storageModelType": "LocallyRedundant",
23+
"storageType": "LocallyRedundant",
24+
"storageTypeState": "Unlocked"
25+
}
26+
}
27+
}
28+
}
29+
}

specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2021-04-01/examples/Common/ProtectedItem_Delete_OperationStatus.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"name": "00000000-0000-0000-0000-000000000000",
1515
"status": "InProgress",
1616
"startTime": "2017-08-03T06:52:53.886027Z",
17-
"endTime": "0001-01-01T00:00:00.00000Z"
17+
"endTime": "2017-09-03T06:52:53.886027Z"
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)