Skip to content

Commit 8f96730

Browse files
ansahdevvisingl
authored andcommitted
Updating Compute Diagnostic RP's Swagger API .(Ref PR: #18317) (#18351)
* 1) Ref PR: #18317 2) Added new APIs + examples for Compute Diagnostic RP - 2021-06-01-preview 3) Prettier fix * Updating readme.md for $(tag) == 'package-2021-06-01-preview' with latest RP versions.
1 parent 90bdae4 commit 8f96730

File tree

4 files changed

+155
-6
lines changed

4 files changed

+155
-6
lines changed

specification/compute/resource-manager/Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,98 @@
206206
}
207207
}
208208
}
209+
},
210+
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/registerStorageConfiguration": {
211+
"post": {
212+
"tags": [
213+
"registerStorageConfiguration"
214+
],
215+
"operationId": "DiskInspectionStorageConfiguration_Register",
216+
"x-ms-long-running-operation": false,
217+
"description": "Register a storageAccount for a subscription used for DiskInspection",
218+
"consumes": [
219+
"application/json"
220+
],
221+
"parameters": [
222+
{
223+
"$ref": "#/parameters/SubscriptionIdParameter"
224+
},
225+
{
226+
"$ref": "#/parameters/LocationParameter"
227+
},
228+
{
229+
"$ref": "#/parameters/ApiVersionParameter"
230+
},
231+
{
232+
"name": "storageConfigurationInput",
233+
"in": "body",
234+
"required": true,
235+
"schema": {
236+
"$ref": "#/definitions/StorageConfigurationInput"
237+
},
238+
"description": "Storage Configuration object supplied in the body of the Post to cache storageAccount for a given subscription."
239+
}
240+
],
241+
"responses": {
242+
"200": {
243+
"description": "Succeeded"
244+
},
245+
"default": {
246+
"description": "Error response describing why the register operation failed.",
247+
"schema": {
248+
"$ref": "#/definitions/ErrorResponse"
249+
}
250+
}
251+
},
252+
"x-ms-examples": {
253+
"Create a request for registering a storageAccount information.": {
254+
"$ref": "./examples/RegisterStorageConfiguration.json"
255+
}
256+
}
257+
}
258+
},
259+
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/validateStorageConfiguration": {
260+
"post": {
261+
"tags": [
262+
"validateStorageConfiguration"
263+
],
264+
"operationId": "DiskInspectionStorageConfiguration_Validate",
265+
"x-ms-long-running-operation": false,
266+
"description": "Validate if a storageAccount configuration exists for a subscription used for DiskInspection.",
267+
"consumes": [
268+
"application/json"
269+
],
270+
"parameters": [
271+
{
272+
"$ref": "#/parameters/SubscriptionIdParameter"
273+
},
274+
{
275+
"$ref": "#/parameters/LocationParameter"
276+
},
277+
{
278+
"$ref": "#/parameters/ApiVersionParameter"
279+
}
280+
],
281+
"responses": {
282+
"200": {
283+
"description": "Success",
284+
"schema": {
285+
"$ref": "#/definitions/StorageConfigurationResponse"
286+
}
287+
},
288+
"default": {
289+
"description": "Error response describing why the get call failed.",
290+
"schema": {
291+
"$ref": "#/definitions/ErrorResponse"
292+
}
293+
}
294+
},
295+
"x-ms-examples": {
296+
"Returns storageAccount value for an existing configuration entry": {
297+
"$ref": "./examples/ValidateStorageConfiguration.json"
298+
}
299+
}
300+
}
209301
}
210302
},
211303
"definitions": {
@@ -312,6 +404,28 @@
312404
},
313405
"description": "Api output result when disk inspection result is completed."
314406
},
407+
"StorageConfigurationInput": {
408+
"type": "object",
409+
"properties": {
410+
"storageAccountId": {
411+
"description": "Qualified name of the storage account",
412+
"type": "string"
413+
}
414+
},
415+
"required": [
416+
"storageAccountId"
417+
],
418+
"description": "Data used for registering a Storage Account for a Subscription."
419+
},
420+
"StorageConfigurationResponse": {
421+
"type": "object",
422+
"properties": {
423+
"storageAccountId": {
424+
"type": "string"
425+
}
426+
},
427+
"description": "Api output result when there is an existing storage configuration entry."
428+
},
315429
"ErrorResponse": {
316430
"type": "object",
317431
"properties": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"location": "eastus",
5+
"api-version": "2021-06-01-preview",
6+
"storageConfigurationInput": {
7+
"storageAccountId": "/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/az-iid-blobtest/providers/Microsoft.Storage/storageAccounts/aziidblobtest"
8+
}
9+
},
10+
"responses": {
11+
"200": {
12+
"headers": {
13+
"x-ms-request-id": "fa55b700-8218-42b1-a3e3-1794cfd37629"
14+
}
15+
}
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"location": "eastus",
5+
"api-version": "2021-06-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {
10+
"x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1"
11+
},
12+
"body": {
13+
"storageAccountId": "/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/az-iid-blobtest/providers/Microsoft.Storage/storageAccounts/aziidblobtest"
14+
}
15+
}
16+
}
17+
}

specification/compute/resource-manager/readme.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,13 @@ These settings apply only when `--tag=2021-06-01-preview` is specified on the co
371371

372372
``` yaml $(tag) == 'package-2021-06-01-preview'
373373
input-file:
374-
- Microsoft.Compute/stable/2021-03-01/compute.json
375-
- Microsoft.Compute/stable/2021-03-01/runCommands.json
376-
- Microsoft.Compute/stable/2019-04-01/skus.json
377-
- Microsoft.Compute/stable/2020-12-01/disk.json
378-
- Microsoft.Compute/stable/2020-09-30/gallery.json
379-
- Microsoft.Compute/stable/2020-09-30/sharedGallery.json
374+
- Microsoft.Compute/stable/2021-11-01/compute.json
375+
- Microsoft.Compute/stable/2021-11-01/runCommands.json
376+
- Microsoft.Compute/stable/2021-07-01/skus.json
377+
- Microsoft.Compute/stable/2021-12-01/disk.json
378+
- Microsoft.Compute/stable/2021-10-01/gallery.json
379+
- Microsoft.Compute/stable/2021-07-01/sharedGallery.json
380+
- Microsoft.Compute/stable/2021-07-01/communityGallery.json
380381
- Microsoft.Compute/stable/2021-03-01/cloudService.json
381382
- Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json
382383
```

0 commit comments

Comments
 (0)