Skip to content

Commit

Permalink
Updating Compute Diagnostic RP's Swagger API .(Ref PR: #18317) (#18351)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
ansahdev authored and visingl committed Mar 30, 2022
1 parent 90bdae4 commit 8f96730
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,98 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/registerStorageConfiguration": {
"post": {
"tags": [
"registerStorageConfiguration"
],
"operationId": "DiskInspectionStorageConfiguration_Register",
"x-ms-long-running-operation": false,
"description": "Register a storageAccount for a subscription used for DiskInspection",
"consumes": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/LocationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "storageConfigurationInput",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/StorageConfigurationInput"
},
"description": "Storage Configuration object supplied in the body of the Post to cache storageAccount for a given subscription."
}
],
"responses": {
"200": {
"description": "Succeeded"
},
"default": {
"description": "Error response describing why the register operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Create a request for registering a storageAccount information.": {
"$ref": "./examples/RegisterStorageConfiguration.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/diskInspection/validateStorageConfiguration": {
"post": {
"tags": [
"validateStorageConfiguration"
],
"operationId": "DiskInspectionStorageConfiguration_Validate",
"x-ms-long-running-operation": false,
"description": "Validate if a storageAccount configuration exists for a subscription used for DiskInspection.",
"consumes": [
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/LocationParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/StorageConfigurationResponse"
}
},
"default": {
"description": "Error response describing why the get call failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Returns storageAccount value for an existing configuration entry": {
"$ref": "./examples/ValidateStorageConfiguration.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -312,6 +404,28 @@
},
"description": "Api output result when disk inspection result is completed."
},
"StorageConfigurationInput": {
"type": "object",
"properties": {
"storageAccountId": {
"description": "Qualified name of the storage account",
"type": "string"
}
},
"required": [
"storageAccountId"
],
"description": "Data used for registering a Storage Account for a Subscription."
},
"StorageConfigurationResponse": {
"type": "object",
"properties": {
"storageAccountId": {
"type": "string"
}
},
"description": "Api output result when there is an existing storage configuration entry."
},
"ErrorResponse": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"location": "eastus",
"api-version": "2021-06-01-preview",
"storageConfigurationInput": {
"storageAccountId": "/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/az-iid-blobtest/providers/Microsoft.Storage/storageAccounts/aziidblobtest"
}
},
"responses": {
"200": {
"headers": {
"x-ms-request-id": "fa55b700-8218-42b1-a3e3-1794cfd37629"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"location": "eastus",
"api-version": "2021-06-01-preview"
},
"responses": {
"200": {
"headers": {
"x-ms-request-id": "27b7c568-16ec-46f3-bcf1-5bea3f2529b1"
},
"body": {
"storageAccountId": "/subscriptions/88fd8cb2-8248-499e-9a2d-4929a4b0133c/resourceGroups/az-iid-blobtest/providers/Microsoft.Storage/storageAccounts/aziidblobtest"
}
}
}
}
13 changes: 7 additions & 6 deletions specification/compute/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,13 @@ These settings apply only when `--tag=2021-06-01-preview` is specified on the co

``` yaml $(tag) == 'package-2021-06-01-preview'
input-file:
- Microsoft.Compute/stable/2021-03-01/compute.json
- Microsoft.Compute/stable/2021-03-01/runCommands.json
- Microsoft.Compute/stable/2019-04-01/skus.json
- Microsoft.Compute/stable/2020-12-01/disk.json
- Microsoft.Compute/stable/2020-09-30/gallery.json
- Microsoft.Compute/stable/2020-09-30/sharedGallery.json
- Microsoft.Compute/stable/2021-11-01/compute.json
- Microsoft.Compute/stable/2021-11-01/runCommands.json
- Microsoft.Compute/stable/2021-07-01/skus.json
- Microsoft.Compute/stable/2021-12-01/disk.json
- Microsoft.Compute/stable/2021-10-01/gallery.json
- Microsoft.Compute/stable/2021-07-01/sharedGallery.json
- Microsoft.Compute/stable/2021-07-01/communityGallery.json
- Microsoft.Compute/stable/2021-03-01/cloudService.json
- Microsoft.Compute/preview/2021-06-01-preview/diagnostic.json
```
Expand Down

0 comments on commit 8f96730

Please sign in to comment.