forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 2021-03-01 API version with the GA version changes (Azure#13380)
* Add 2021-03-01 API version with the GA version changes * Addressing review feedback. * Address the prettier check errors and swagger tooling input files.
- Loading branch information
1 parent
09539bd
commit e52c990
Showing
14 changed files
with
1,238 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...h/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/OperationsList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-03-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "Microsoft.ResourceGraph/operations/read", | ||
"display": { | ||
"provider": "Microsoft Resource Graph", | ||
"resource": "Operation", | ||
"operation": "Get Operations", | ||
"description": "Gets the list of supported operations" | ||
} | ||
}, | ||
{ | ||
"name": "Microsoft.ResourceGraph/resources/read", | ||
"display": { | ||
"provider": "Microsoft Resource Graph", | ||
"resource": "Resources", | ||
"operation": "Query resources", | ||
"description": "Submits a query on resources within specified subscriptions, the specified management groups, or against all access granted in the tenant." | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...ource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesBasicQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"title": "Basic Query", | ||
"description": "A simple resources query.", | ||
"parameters": { | ||
"api-version": "2021-03-01", | ||
"query": { | ||
"subscriptions": [ | ||
"cfbbd179-59d2-4052-aa06-9270a38aa9d6" | ||
], | ||
"query": "Resources | project id, name, type, location, tags | limit 3" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"totalRecords": 3, | ||
"count": 3, | ||
"resultTruncated": "false", | ||
"facets": [], | ||
"data": [ | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", | ||
"name": "myNetworkInterface", | ||
"type": "microsoft.network/networkinterfaces", | ||
"location": "centralus", | ||
"tags": { | ||
"tag1": "Value1" | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/virtualNetworks/myVnet", | ||
"name": "myVnet", | ||
"type": "microsoft.network/virtualnetworks", | ||
"location": "westus", | ||
"tags": {} | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/publicIPAddresses/myPublicIp", | ||
"name": "myPublicIp", | ||
"type": "microsoft.network/publicipaddresses", | ||
"location": "westus", | ||
"tags": {} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...rce-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesComplexQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"title": "Complex Query", | ||
"description": "A complex query on resources featuring multiple operations.", | ||
"parameters": { | ||
"api-version": "2021-03-01", | ||
"query": { | ||
"subscriptions": [ | ||
"cfbbd179-59d2-4052-aa06-9270a38aa9d6" | ||
], | ||
"query": "Resources | project id, name, type, location | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by location | top 3 by count_" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"totalRecords": 3, | ||
"count": 3, | ||
"resultTruncated": "false", | ||
"facets": [], | ||
"data": [ | ||
{ | ||
"location": "centralus", | ||
"count_": 11 | ||
}, | ||
{ | ||
"location": "eastus", | ||
"count_": 11 | ||
}, | ||
{ | ||
"location": "southcentralus", | ||
"count_": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
185 changes: 185 additions & 0 deletions
185
...ource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFacetQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
{ | ||
"title": "Facet Query", | ||
"description": "A query on resources requesting extra facets.", | ||
"parameters": { | ||
"api-version": "2021-03-01", | ||
"query": { | ||
"subscriptions": [ | ||
"cfbbd179-59d2-4052-aa06-9270a38aa9d6" | ||
], | ||
"query": "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project id, name, location, resourceGroup, properties.storageProfile.osDisk.osType | limit 5", | ||
"facets": [ | ||
{ | ||
"expression": "location", | ||
"options": { | ||
"sortOrder": "desc", | ||
"$top": 3 | ||
} | ||
}, | ||
{ | ||
"expression": "properties.storageProfile.osDisk.osType", | ||
"options": { | ||
"sortOrder": "desc", | ||
"$top": 3 | ||
} | ||
}, | ||
{ | ||
"expression": "nonExistingColumn", | ||
"options": { | ||
"sortOrder": "desc", | ||
"$top": 3 | ||
} | ||
}, | ||
{ | ||
"expression": "resourceGroup", | ||
"options": { | ||
"sortBy": "tolower(resourceGroup)", | ||
"sortOrder": "asc", | ||
"$top": 3 | ||
} | ||
}, | ||
{ | ||
"expression": "resourceGroup", | ||
"options": { | ||
"filter": "resourceGroup contains 'test'", | ||
"$top": 3 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"totalRecords": 5, | ||
"count": 5, | ||
"resultTruncated": "false", | ||
"data": [ | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/B-TEST-RG/providers/Microsoft.Compute/virtualMachines/myTestVm", | ||
"name": "myTestVm", | ||
"location": "eastus", | ||
"resourceGroup": "B-TEST-RG", | ||
"properties_storageProfile_osDisk_osType": "Windows" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/c-rg/providers/Microsoft.Compute/virtualMachines/myTestAccountVm", | ||
"name": "myTestAccountVm", | ||
"location": "westcentralus", | ||
"resourceGroup": "c-rg", | ||
"properties_storageProfile_osDisk_osType": "Windows" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/I-RG/providers/Microsoft.Compute/virtualMachines/yetanothertest", | ||
"name": "yetanothertest", | ||
"location": "eastus", | ||
"resourceGroup": "I-RG", | ||
"properties_storageProfile_osDisk_osType": "Linux" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/x-test-rg/providers/Microsoft.Compute/virtualMachines/drafttest1bux4cv7a7q3aw", | ||
"name": "drafttest1bux4cv7a7q3aw", | ||
"location": "southcentralus", | ||
"resourceGroup": "x-test-rg", | ||
"properties_storageProfile_osDisk_osType": "Linux" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/y-rg/providers/Microsoft.Compute/virtualMachines/testvmntp25370", | ||
"name": "testvmntp25370", | ||
"location": "eastus", | ||
"resourceGroup": "y-rg", | ||
"properties_storageProfile_osDisk_osType": "Windows" | ||
} | ||
], | ||
"facets": [ | ||
{ | ||
"expression": "location", | ||
"resultType": "FacetResult", | ||
"totalRecords": 3, | ||
"count": 3, | ||
"data": [ | ||
{ | ||
"location": "eastus", | ||
"count": 3 | ||
}, | ||
{ | ||
"location": "southcentralus", | ||
"count": 1 | ||
}, | ||
{ | ||
"location": "westcentralus", | ||
"count": 1 | ||
} | ||
] | ||
}, | ||
{ | ||
"expression": "properties.storageProfile.osDisk.osType", | ||
"resultType": "FacetResult", | ||
"totalRecords": 2, | ||
"count": 2, | ||
"data": [ | ||
{ | ||
"properties_storageProfile_osDisk_osType": "Linux", | ||
"count": 2 | ||
}, | ||
{ | ||
"properties_storageProfile_osDisk_osType": "Windows", | ||
"count": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"expression": "nonExistingColumn", | ||
"resultType": "FacetError", | ||
"errors": [ | ||
{ | ||
"code": "NoValidColumns", | ||
"message": "No valid columns in facet expression." | ||
}, | ||
{ | ||
"code": "InvalidColumnNames", | ||
"message": "Invalid column names: [nonExistingColumn]." | ||
} | ||
] | ||
}, | ||
{ | ||
"expression": "resourceGroup", | ||
"resultType": "FacetResult", | ||
"totalRecords": 5, | ||
"count": 3, | ||
"data": [ | ||
{ | ||
"resourceGroup": "B-TEST-RG", | ||
"count": 1 | ||
}, | ||
{ | ||
"resourceGroup": "c-rg", | ||
"count": 1 | ||
}, | ||
{ | ||
"resourceGroup": "I-RG", | ||
"count": 1 | ||
} | ||
] | ||
}, | ||
{ | ||
"expression": "resourceGroup", | ||
"resultType": "FacetResult", | ||
"totalRecords": 2, | ||
"count": 2, | ||
"data": [ | ||
{ | ||
"resourceGroup": "B-TEST-RG", | ||
"count": 1 | ||
}, | ||
{ | ||
"resourceGroup": "x-test-rg", | ||
"count": 1 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...urce-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFilterQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"title": "Filter query", | ||
"description": "A filtering query on resources.", | ||
"parameters": { | ||
"api-version": "2021-03-01", | ||
"query": { | ||
"subscriptions": [ | ||
"cfbbd179-59d2-4052-aa06-9270a38aa9d6" | ||
], | ||
"query": "Resources | project id, name, type, location | where type =~ 'Microsoft.Compute/virtualMachines' | limit 3" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"totalRecords": 3, | ||
"count": 3, | ||
"resultTruncated": "false", | ||
"facets": [], | ||
"data": [ | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Compute/virtualMachines/myVm1", | ||
"name": "myVm1", | ||
"type": "microsoft.compute/virtualmachines", | ||
"location": "centralus" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Compute/virtualMachines/myVirtualMachine", | ||
"name": "myVirtualMachine", | ||
"type": "microsoft.compute/virtualmachines", | ||
"location": "eastus" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG3/providers/Microsoft.Compute/virtualMachines/testVm", | ||
"name": "testVm", | ||
"type": "microsoft.compute/virtualmachines", | ||
"location": "eastus" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...e-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFirstPageQuery.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"title": "First page query", | ||
"description": "A query requesting a first page with of results. Please note id field is required in the response to return the pages in stable sorted fashion.", | ||
"parameters": { | ||
"api-version": "2021-03-01", | ||
"query": { | ||
"subscriptions": [ | ||
"cfbbd179-59d2-4052-aa06-9270a38aa9d6" | ||
], | ||
"query": "Resources | where name contains 'test' | project id, name, type, location", | ||
"options": { | ||
"$top": 3, | ||
"$skip": 0 | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"totalRecords": 386, | ||
"count": 3, | ||
"resultTruncated": "false", | ||
"facets": [], | ||
"$skipToken": "eyAibm8iOiAibHVjayIsICJidXQiOiAibmljZSIsICJ0cnkiOiAiISIgfQ==", | ||
"data": [ | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Compute/disks/yetanothertest_OsDisk_1_f396cbcb625a457bb69fe2abf5975820", | ||
"name": "yetanothertest_OsDisk_1_f396cbcb625a457bb69fe2abf5975820", | ||
"type": "microsoft.compute/disks", | ||
"location": "eastus" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Automation/automationAccounts/TestAA", | ||
"name": "TestAA", | ||
"type": "microsoft.automation/automationaccounts", | ||
"location": "westcentralus" | ||
}, | ||
{ | ||
"id": "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Automation/automationAccounts/TestAA/runbooks/TestRB", | ||
"name": "TestRB", | ||
"type": "microsoft.automation/automationaccounts/runbooks", | ||
"location": "westcentralus" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.