Skip to content

Commit

Permalink
Azure Resource Graph - Resource Changes API 2020-09-01_preview update. (
Browse files Browse the repository at this point in the history
Azure#13052)

* initial drop of previous version

* publishing the actual change

* pretty check update

* updating response for resource change details to return list

Co-authored-by: Alex Dubinkov <alexdu@microsoft.com>
  • Loading branch information
2 people authored and mkarmark committed Jul 20, 2021
1 parent aaa3471 commit 9f83707
Show file tree
Hide file tree
Showing 6 changed files with 720 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"title": "Resource Change Details Query",
"description": "A resource change details query.",
"parameters": {
"api-version": "2020-09-01-preview",
"parameters": {
"resourceIds": [
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
],
"changeIds": [
"53dc0515-b86b-4bc2-979b-e4694ab4a556"
]
}
},
"responses": {
"200": {
"body": [
{
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeId": "53dc0515-b86b-4bc2-979b-e4694ab4a556",
"beforeSnapshot": {
"timestamp": "2018-10-31T01:32:05.993Z",
"content": {
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"name": "mystorageaccount",
"type": "Microsoft.Storage/storageAccounts",
"location": "westus",
"tags": {},
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": false,
"encryption": {
"services": {
"file": {
"enabled": true,
"lastEnabledTime": "2018-07-27T18:37:21.8333895Z"
},
"blob": {
"enabled": true,
"lastEnabledTime": "2018-07-27T18:37:21.8333895Z"
}
},
"keySource": "Microsoft.Storage"
},
"provisioningState": "Succeeded",
"creationTime": "2018-07-27T18:37:21.7708872Z",
"primaryEndpoints": {
"blob": "https://mystorageaccount.blob.core.windows.net/",
"queue": "https://mystorageaccount.queue.core.windows.net/",
"table": "https://mystorageaccount.table.core.windows.net/",
"file": "https://mystorageaccount.file.core.windows.net/"
},
"primaryLocation": "westus",
"statusOfPrimary": "available"
}
}
},
"afterSnapshot": {
"timestamp": "2018-10-31T01:54:24.42Z",
"content": {
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"id": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"name": "mystorageaccount",
"type": "Microsoft.Storage/storageAccounts",
"location": "westus",
"tags": {},
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": true,
"encryption": {
"services": {
"file": {
"enabled": true,
"lastEnabledTime": "2018-07-27T18:37:21.8333895Z"
},
"blob": {
"enabled": true,
"lastEnabledTime": "2018-07-27T18:37:21.8333895Z"
}
},
"keySource": "Microsoft.Storage"
},
"provisioningState": "Succeeded",
"creationTime": "2018-07-27T18:37:21.7708872Z",
"primaryEndpoints": {
"blob": "https://mystorageaccount.blob.core.windows.net/",
"queue": "https://mystorageaccount.queue.core.windows.net/",
"table": "https://mystorageaccount.table.core.windows.net/",
"file": "https://mystorageaccount.file.core.windows.net/"
},
"primaryLocation": "westus",
"statusOfPrimary": "available"
}
}
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"title": "Basic Resource Changes Query",
"description": "A simple resource changes query.",
"parameters": {
"api-version": "2020-09-01-preview",
"parameters": {
"resourceIds": [
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
],
"interval": {
"start": "2018-10-30T12:09:03.141Z",
"end": "2018-10-31T12:09:03.141Z"
}
}
},
"responses": {
"200": {
"body": {
"changes": [
{
"changeId": "2db0ad2d-f6f0-4f46-b529-5c4e8c494648",
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeType": "Update",
"beforeSnapshot": {
"timestamp": "2018-10-31T01:32:05.993Z"
},
"afterSnapshot": {
"timestamp": "2018-10-31T01:54:24.42Z"
}
},
{
"changeId": "9dc352cb-b7c1-4198-9eda-e5e3ed66aec8",
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeType": "Create",
"beforeSnapshot": {
"timestamp": "2018-10-30T10:30:19.68Z"
},
"afterSnapshot": {
"timestamp": "2018-10-30T21:12:31.337Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"title": "Resource Changes Query: First Page",
"description": "A resource changes query requesting the first page.",
"parameters": {
"api-version": "2020-09-01-preview",
"parameters": {
"resourceIds": [
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
],
"interval": {
"start": "2018-10-30T12:09:03.141Z",
"end": "2018-10-31T12:09:03.141Z"
},
"$top": 2
}
},
"responses": {
"200": {
"body": {
"changes": [
{
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeId": "2db0ad2d-f6f0-4f46-b529-5c4e8c494648",
"changeType": "Update",
"beforeSnapshot": {
"timestamp": "2018-10-31T01:32:05.993Z"
},
"afterSnapshot": {
"timestamp": "2018-10-31T01:54:24.42Z"
}
},
{
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeId": "9dc352cb-b7c1-4198-9eda-e5e3ed66aec8",
"changeType": "Create",
"beforeSnapshot": {
"timestamp": "2018-10-30T10:30:19.68Z"
},
"afterSnapshot": {
"timestamp": "2018-10-30T21:12:31.337Z"
}
}
],
"$skipToken": "ew0KICAiJGlkIjogIjEiLA0KICAiRW5kVGltZSI6ICJcL0RhdGUoMTU1MDc0NT"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"title": "Resource Changes Query: Next Page",
"description": "A resource changes query requesting the next page using a skip token.",
"parameters": {
"api-version": "2020-04-01-preview",
"parameters": {
"resourceIds": [
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"
],
"interval": {
"start": "2018-10-30T12:09:03.141Z",
"end": "2018-10-31T12:09:03.141Z"
},
"$top": 2,
"$skipToken": "ew0KICAiJGlkIjogIjEiLA0KICAiRW5kVGltZSI6ICJcL0RhdGUoMTU1MDc0NT"
}
},
"responses": {
"200": {
"body": {
"changes": [
{
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeId": "55f458c4-f1c0-4963-bc6c-af275cd47702",
"changeType": "Update",
"beforeSnapshot": {
"timestamp": "2018-10-31T03:43:08.629Z"
},
"afterSnapshot": {
"timestamp": "2018-10-31T05:12:32.087Z"
}
},
{
"resourceId": "/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount",
"changeId": "0495b929-b86d-46cc-a972-939145feed90",
"changeType": "Create",
"beforeSnapshot": {
"timestamp": "2018-10-31T01:54:24.42Z"
},
"afterSnapshot": {
"timestamp": "2018-10-31T02:01:02.163Z"
}
}
],
"$skipToken": "kVGltZSI6ICJcL0RhdGUoMTU1MDc0NTew0KICAiJGlkIjogIjEiLA0KICAiRW5"
}
}
}
}
Loading

0 comments on commit 9f83707

Please sign in to comment.