Skip to content

Commit

Permalink
Workbooks correctness 2021-08-01 (Azure#16249)
Browse files Browse the repository at this point in the history
* set default tag to package-2021-03-only

* new default tag and add only workbooks to release

* update package tag with same RP as last package

* update tag name

* Update readme.python.md

* change definition name

* remove operations

* fix missingtypeobject in workbooks

* fix up model validation errors

* copy from 2021-03-08 to 2021-08-01

* 2021-08-01 changes

* fix prettier errors

* use common types where possible

* fix displayName errors

* use newer myworkbooks and workbooktemplates

* restore update params due to location

* update tags

* remove the only verison

* update types to v3

* restore the operation

* remove operation file

* restore operation as it's needed for some updates

* set to types to v1 to be consistent

* update name

* update to later tag

* use unique definition

* don't release operation in this pr

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
  • Loading branch information
2 people authored and LeiWang3 committed Mar 31, 2022
1 parent c40f5b1 commit dbc653d
Show file tree
Hide file tree
Showing 16 changed files with 1,502 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"parameters": {
"api-version": "2021-08-01",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"workbookProperties": {
"location": "west us",
"kind": "shared",
"properties": {
"displayName": "tttt",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
"category": "workbook",
"description": "Sample workbook"
},
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-8bee-4d3b-a059-9be8dac93960",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"name": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"kind": "shared",
"properties": {
"displayName": "Blah Blah Blah",
"userId": "userId",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
"version": "Notebook/1.0",
"category": "workbook",
"timeModified": "2021-08-24T06:56:31.6301521Z",
"storageUri": null,
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb"
},
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
}
}
},
"201": {
"body": {
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-8bee-4d3b-a059-9be8dac93960",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"name": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"kind": "shared",
"properties": {
"displayName": "Blah Blah Blah",
"userId": "userId",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
"version": "Notebook/1.0",
"category": "workbook",
"timeModified": "2021-08-24T06:56:31.6301521Z",
"storageUri": null,
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb"
},
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"api-version": "2021-08-01",
"subscriptionId": "subid",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2021-08-01",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"kind": "shared",
"properties": {
"displayName": "My New Workbook",
"userId": "userId",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
"version": "Notebook/1.0",
"category": "workbook",
"timeModified": "2021-08-24T06:56:31.6301521Z",
"storageUri": null,
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb"
},
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"api-version": "2021-08-01",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/microsoft.insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-8bee-4d3b-a059-9be8dac93960",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"kind": "shared",
"properties": {
"displayName": "My New Workbook",
"userId": "userId",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}",
"version": "Notebook/1.0",
"category": "workbook",
"timeModified": "2021-08-24T06:56:31.6301521Z",
"storageUri": null
},
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"parameters": {
"api-version": "2021-08-01",
"resourceGroupName": "my-resource-group",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"workbookProperties": {
"location": "westus",
"tags": {
"hidden-title": "tttt"
},
"kind": "shared",
"etag": "\"4a00f78d-0000-0700-0000-5f8f616c1000\"",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
}
},
"properties": {
"displayName": "tttt",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup\"]}",
"version": "Notebook/1.0",
"category": "workbook",
"tags": [],
"description": "Sample workbook",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
}
},
"responses": {
"200": {
"body": {
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "fbe75b66-01c5-4f87-a220-233af3270432",
"principalId": "075a0ca6-43f6-4434-9abf-c9b1b79f9x19"
}
}
},
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"tags": {
"hidden-title": "tttt"
},
"kind": "shared",
"etag": "\"4a00f85e-0000-0700-0000-5f8f5dfa0000\"",
"properties": {
"displayName": "tttt",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}",
"version": "Notebook/1.0",
"category": "workbook",
"userId": "70d90f65-8a70-4e42-b8d5-86gv25e0a90f",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"timeModified": "2020-10-20T22:00:26.4229554Z",
"tags": [],
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
}
},
"201": {
"body": {
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "fbe75b66-01c5-4f87-a220-233af3270432",
"principalId": "075a0ca6-43f6-4434-9abf-c9b1b79f9x19"
}
}
},
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"tags": {
"hidden-title": "tttt"
},
"kind": "user",
"etag": "\"4a00f85e-0000-0700-0000-5f8f5dfa0000\"",
"properties": {
"displayName": "tttt",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.OperationalInsights/workspaces/test-ws\"]}",
"version": "Notebook/1.0",
"category": "workbook",
"userId": "70d90f65-8a70-4e42-b8d5-86gv25e0a90f",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"timeModified": "2020-10-20T22:00:26.4229554Z",
"tags": [],
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"api-version": "2021-08-01",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"
},
"responses": {
"200": {
"body": {
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "fbe75b66-01c5-4f87-a220-233af3270432",
"principalId": "075a0ca6-43f6-4434-9abf-c9b1b79f9x19"
},
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {
"clientId": "47429305-c0d3-40bc-8595-6194sdfdf3dc",
"principalId": "bf9ebbc8-b92d-4752-8e66-c999d560326e0"
}
}
},
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"type": "Microsoft.Insights/workbooks",
"location": "westcentralus",
"tags": {
"hidden-title": "azuremon"
},
"kind": "shared",
"etag": "\"0c003cb4-0000-0600-0000-5f5203c60000\"",
"properties": {
"displayName": "azuremon",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"testing1\"},\"showPin\":false,\"name\":\"text - 0\"}],\"isLocked\":true,\"fallbackResourceIds\":[\"Azure Monitor\"]}",
"version": "Notebook/1.0",
"category": "workbook",
"userId": "51d1409c-d725-4550-ac03-98c0bef9ef07",
"sourceId": "azure monitor",
"timeModified": "2020-09-04T09:07:17.735638Z",
"tags": [],
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"parameters": {
"api-version": "2021-08-01",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"location": "westus",
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02"
},
"type": "Microsoft.Insights/workbooks",
"kind": "shared",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
}
},
"properties": {
"displayName": "tttt",
"version": "Notebook/1.0",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/8980832b-9589-4ac2-b322-a6ae6a97f02b/resourceGroups/MyGroup\"]}",
"category": "workbook",
"isPersisted": true,
"timeModified": "2020-10-20T22:00:26.4229554Z",
"tags": [],
"description": "Sample workbook",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
},
"responses": {
"201": {
"body": {
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "fbe75b66-01c5-4f87-a220-233af3270432",
"principalId": "075a0ca6-43f6-4434-9abf-c9b1b79f9x19"
},
"/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {
"clientId": "47429305-c0d3-40bc-8595-6194sdfdf3dc",
"principalId": "bf9ebbc8-b92d-4752-8e66-c999d560326e0"
}
}
},
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup/providers/Microsoft.Insights/workbooks/deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"name": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2",
"type": "Microsoft.Insights/workbooks",
"location": "westus",
"tags": {
"TagSample01": "sample01",
"TagSample02": "sample02",
"hidden-title": "tttt"
},
"kind": "shared",
"etag": "\"4a00f78d-0000-0700-0000-5f8f616c0000\"",
"properties": {
"displayName": "tttt",
"serializedData": "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":{\"json\":\"test\"},\"name\":\"text - 0\"}],\"isLocked\":false,\"fallbackResourceIds\":[\"/subscriptions/8980832b-9589-4ac2-b322-a6ae6a97f02b/resourceGroups/MyGroup\"]}",
"version": "Notebook/1.0",
"category": "workbook",
"userId": "70d90f65-8a70-4e42-b8d5-863725e0a90f",
"sourceId": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/MyGroup",
"timeModified": "2020-10-20T22:15:08.1875458Z",
"tags": [],
"description": "Sample workbook",
"revision": "1e2f8435b98248febee70c64ac22e1bb",
"storageUri": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/testStorage/blobServices/default/containers/testContainer"
}
}
}
}
}
Loading

0 comments on commit dbc653d

Please sign in to comment.