Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.ResourceGraph to add ver…
Browse files Browse the repository at this point in the history
…sion preview/2020-04-01-preview (Azure#11070)

* Add missing subscriptionId and resourceGroup

* Update 2020-04-01-preview

* Split 2020-04-01-preview

* Reverting changes for subscriptionId/resourceGroup; Fix casing for etag field.

* Adding missing ResourcesHistory API to swagger

* Fix API definition; Add an example

* Fix multiple issues

1) Rename PropertyChangeType to ChangeType; 2) Add resourceId ResourceChangeData; 3) Add snapshotId to ResourceSnapshotData; 4) Fix model name in resourceshistory.json

* Fix linter/model issues

* Fix etag casing more places

* Fix ErrorResponse modeling in resourcechanges.json and resourcehistory.json

* Add default response for Operations API

* Revert renaming of PropertyChangeType

* Add changeType to swagger

* Revert "Add changeType to swagger"

This reverts commit 5bfd7fb.

* Fix swagger for resourcesHistory

Co-authored-by: Youke Shen <yoshen@microsoft.com>
  • Loading branch information
2 people authored and mkarmark committed Jul 20, 2021
1 parent 836b961 commit 982cd83
Show file tree
Hide file tree
Showing 15 changed files with 719 additions and 314 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"tags": {},
"properties": {
"description": "Docker VMs in PROD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"tags": null,
"properties": {
"description": "Docker VMs in PROD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"tags": {},
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"properties": {
"description": "Docker VMs in PROD",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'",
Expand All @@ -29,7 +29,7 @@
"name": "MyTestVMs",
"type": "Microsoft.ResourceGraph/queries",
"tags": {},
"eTag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"properties": {
"description": "Test VMs in PROD",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"api-version": "2018-09-01-preview",
"body": {
"tags": null,
"eTag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"properties": {
"description": "Modified description",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'"
Expand All @@ -21,7 +21,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "73811091-6188-4523-97b7-b5e7134e7fd9",
"etag": "73811091-6188-4523-97b7-b5e7134e7fd9",
"tags": null,
"properties": {
"description": "Modified description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"readOnly": true,
"description": "Azure resource type"
},
"eTag": {
"etag": {
"type": "string",
"description": "This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict."
},
Expand Down Expand Up @@ -367,7 +367,7 @@
},
"description": "Resource tags"
},
"eTag": {
"etag": {
"type": "string",
"description": "This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"tags": {},
"properties": {
"description": "Docker VMs in PROD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"tags": null,
"properties": {
"description": "Docker VMs in PROD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"tags": {},
"eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"etag": "5d64408e-4ca3-41f7-b725-6914f3012afa",
"properties": {
"description": "Docker VMs in PROD",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'",
Expand All @@ -37,7 +37,7 @@
"name": "MyTestVMs",
"type": "Microsoft.ResourceGraph/queries",
"tags": {},
"eTag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"properties": {
"description": "Test VMs in PROD",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"api-version": "2020-04-01-preview",
"body": {
"tags": null,
"eTag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"etag": "b0809832-ca62-4133-8f13-0c46580f9db1",
"properties": {
"description": "Modified description",
"query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'"
Expand All @@ -21,7 +21,7 @@
"id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs",
"name": "MyDockerVMs",
"type": "Microsoft.ResourceGraph/queries",
"eTag": "73811091-6188-4523-97b7-b5e7134e7fd9",
"etag": "73811091-6188-4523-97b7-b5e7134e7fd9",
"tags": null,
"properties": {
"description": "Modified description",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"title": "Resource History Query",
"description": "A resource history query.",
"parameters": {
"api-version": "2020-04-01-preview",
"request": {
"subscriptions": [
"a7f33fdb-e646-4f15-89aa-3a360210861e"
],
"query": "where name =~ 'cpu-utilization' | project id, name, properties",
"options": {
"interval": {
"start": "2020-11-12T01:00:00.0000000Z",
"end": "2020-11-12T01:25:00.0000000Z"
}
}
}
},
"responses": {
"200": {
"body": {
"count": 2,
"snapshots": {
"columns": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "properties",
"type": "object"
}
],
"rows": [
[
"/subscriptions/a7f33fdb-e646-4f15-89aa-3a360210861e/resourceGroups/meya-test-rg/providers/Microsoft.Compute/virtualMachines/meya-win-eus/providers/Microsoft.WorkloadMonitor/monitors/cpu-utilization",
"cpu-utilization",
{
"monitorName": "",
"currentStateFirstObservedTimestamp": ""
}
],
[
"/subscriptions/a7f33fdb-e646-4f15-89aa-3a360210861e/resourceGroups/meya-test-rg/providers/Microsoft.Compute/virtualMachines/meya-win-eus/providers/Microsoft.WorkloadMonitor/monitors/cpu-utilization",
"cpu-utilization",
{
"monitorName": "test",
"currentStateFirstObservedTimestamp": ""
}
]
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
"readOnly": true,
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData"
},
"eTag": {
"etag": {
"type": "string",
"description": "This will be used to handle Optimistic Concurrency."
}
Expand Down Expand Up @@ -371,7 +371,7 @@
},
"description": "Resource tags"
},
"eTag": {
"etag": {
"type": "string",
"description": "This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict."
},
Expand Down
Loading

0 comments on commit 982cd83

Please sign in to comment.