Skip to content

Commit 1750698

Browse files
vutran01kairu-ms
andauthored
stable 2020-11-20 workbooktemplates (#13793)
* stable 2020-11-20 workbooktemplates * ref examples in readme * fix path * add swagger 2.0 * fix lintdiff failures * update name * Update readme.python.md * Update readme.md * Update readme.md * Update readme.python.md * Update readme.python.md * update WorkbookError to WorkbookTemplateError * Update readme.md * add templateData examples * Update specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/workbookTemplates_API.json Co-authored-by: kai ru <[email protected]> * Update specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/workbookTemplates_API.json Co-authored-by: kai ru <[email protected]> * updated errorfiledcontract name * make prettier * added templateData samples * update to only workbooktemplates * rename package-2020-11-20 to package-2020-11-only Co-authored-by: kai ru <[email protected]>
1 parent e018c35 commit 1750698

File tree

8 files changed

+1092
-1
lines changed

8 files changed

+1092
-1
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-11-20",
4+
"resourceGroupName": "my-resource-group",
5+
"resourceName": "testtemplate2",
6+
"subscriptionId": "subid",
7+
"workbookTemplateProperties": {
8+
"location": "west us",
9+
"properties": {
10+
"priority": 1,
11+
"author": "Contoso",
12+
"galleries": [
13+
{
14+
"name": "Simple Template",
15+
"category": "Failures",
16+
"type": "tsg",
17+
"resourceType": "microsoft.insights/components",
18+
"order": 100
19+
}
20+
],
21+
"templateData": {
22+
"version": "Notebook/1.0",
23+
"items": [
24+
{
25+
"type": 1,
26+
"content": {
27+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
28+
},
29+
"name": "text - 2"
30+
},
31+
{
32+
"type": 3,
33+
"content": {
34+
"version": "KqlItem/1.0",
35+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
36+
"size": 1,
37+
"exportToExcelOptions": "visible",
38+
"queryType": 0,
39+
"resourceType": "microsoft.operationalinsights/workspaces"
40+
},
41+
"name": "query - 2"
42+
}
43+
],
44+
"styleSettings": {},
45+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
46+
}
47+
},
48+
"tags": null
49+
}
50+
},
51+
"responses": {
52+
"200": {
53+
"body": {
54+
"name": "testtemplate2",
55+
"location": "westeurope",
56+
"tags": null,
57+
"type": "microsoft.insights/workbooktemplates",
58+
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
59+
"properties": {
60+
"priority": 1,
61+
"author": "Contoso",
62+
"templateData": {
63+
"version": "Notebook/1.0",
64+
"items": [
65+
{
66+
"type": 1,
67+
"content": {
68+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
69+
},
70+
"name": "text - 2"
71+
},
72+
{
73+
"type": 3,
74+
"content": {
75+
"version": "KqlItem/1.0",
76+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
77+
"size": 1,
78+
"exportToExcelOptions": "visible",
79+
"queryType": 0,
80+
"resourceType": "microsoft.operationalinsights/workspaces"
81+
},
82+
"name": "query - 2"
83+
}
84+
],
85+
"styleSettings": {},
86+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
87+
},
88+
"galleries": [
89+
{
90+
"name": "Simple Template",
91+
"category": "Failures",
92+
"order": 100,
93+
"type": "tsg",
94+
"resourceType": "microsoft.insights/components"
95+
}
96+
],
97+
"localized": null
98+
}
99+
}
100+
},
101+
"201": {
102+
"body": {
103+
"name": "testtemplate2",
104+
"location": "westeurope",
105+
"tags": null,
106+
"type": "microsoft.insights/workbooktemplates",
107+
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
108+
"properties": {
109+
"priority": 1,
110+
"author": "Contoso",
111+
"templateData": {
112+
"version": "Notebook/1.0",
113+
"items": [
114+
{
115+
"type": 1,
116+
"content": {
117+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
118+
},
119+
"name": "text - 2"
120+
},
121+
{
122+
"type": 3,
123+
"content": {
124+
"version": "KqlItem/1.0",
125+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
126+
"size": 1,
127+
"exportToExcelOptions": "visible",
128+
"queryType": 0,
129+
"resourceType": "microsoft.operationalinsights/workspaces"
130+
},
131+
"name": "query - 2"
132+
}
133+
],
134+
"styleSettings": {},
135+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
136+
},
137+
"galleries": [
138+
{
139+
"name": "Simple Template",
140+
"category": "Failures",
141+
"order": 100,
142+
"type": "tsg",
143+
"resourceType": "microsoft.insights/components"
144+
}
145+
],
146+
"localized": null
147+
}
148+
}
149+
}
150+
}
151+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-11-20",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "my-resource-group",
6+
"resourceName": "my-template-resource"
7+
},
8+
"responses": {
9+
"200": {},
10+
"204": {}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-11-20",
4+
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
5+
"resourceGroupName": "my-resource-group",
6+
"resourceName": "my-resource-name"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"name": "my-resource-name",
12+
"type": "microsoft.insights/workbooktemplate",
13+
"location": "westus",
14+
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/workbooktemplates/my-resource-name",
15+
"properties": {
16+
"priority": 1,
17+
"author": "Contoso",
18+
"galleries": [
19+
{
20+
"name": "Simple Template",
21+
"category": "Failures",
22+
"type": "tsg",
23+
"resourceType": "microsoft.insights/components",
24+
"order": 100
25+
}
26+
],
27+
"templateData": {
28+
"version": "Notebook/1.0",
29+
"items": [
30+
{
31+
"type": 1,
32+
"content": {
33+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
34+
},
35+
"name": "text - 2"
36+
},
37+
{
38+
"type": 3,
39+
"content": {
40+
"version": "KqlItem/1.0",
41+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
42+
"size": 1,
43+
"exportToExcelOptions": "visible",
44+
"queryType": 0,
45+
"resourceType": "microsoft.operationalinsights/workspaces"
46+
},
47+
"name": "query - 2"
48+
}
49+
],
50+
"styleSettings": {},
51+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
52+
}
53+
},
54+
"tags": null
55+
}
56+
}
57+
}
58+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"parameters": {
3+
"api-version": "2020-11-20",
4+
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
5+
"resourceGroupName": "my-resource-group",
6+
"resourceName": "my-template-resource",
7+
"workbookTemplateProperties": {
8+
"name": "display-name-of-template",
9+
"location": "west us",
10+
"type": "microsoft.insights/workbooktemplates",
11+
"properties": {
12+
"priority": 1,
13+
"author": "Contoso",
14+
"galleries": [
15+
{
16+
"name": "Simple Template",
17+
"category": "Failures",
18+
"type": "tsg",
19+
"resourceType": "microsoft.insights/components",
20+
"order": 100
21+
}
22+
],
23+
"templateData": {
24+
"version": "Notebook/1.0",
25+
"items": [
26+
{
27+
"type": 1,
28+
"content": {
29+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
30+
},
31+
"name": "text - 2"
32+
},
33+
{
34+
"type": 3,
35+
"content": {
36+
"version": "KqlItem/1.0",
37+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
38+
"size": 1,
39+
"exportToExcelOptions": "visible",
40+
"queryType": 0,
41+
"resourceType": "microsoft.operationalinsights/workspaces"
42+
},
43+
"name": "query - 2"
44+
}
45+
],
46+
"styleSettings": {},
47+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
48+
}
49+
},
50+
"tags": null
51+
}
52+
},
53+
"responses": {
54+
"200": {
55+
"body": {
56+
"name": "testtemplate2",
57+
"location": "westeurope",
58+
"tags": null,
59+
"type": "microsoft.insights/workbooktemplates",
60+
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
61+
"properties": {
62+
"priority": 1,
63+
"author": "Contoso",
64+
"templateData": {
65+
"version": "Notebook/1.0",
66+
"items": [
67+
{
68+
"type": 1,
69+
"content": {
70+
"json": "## New workbook\n---\n\nWelcome to your new workbook. This area will display text formatted as markdown.\n\n\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."
71+
},
72+
"name": "text - 2"
73+
},
74+
{
75+
"type": 3,
76+
"content": {
77+
"version": "KqlItem/1.0",
78+
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
79+
"size": 1,
80+
"exportToExcelOptions": "visible",
81+
"queryType": 0,
82+
"resourceType": "microsoft.operationalinsights/workspaces"
83+
},
84+
"name": "query - 2"
85+
}
86+
],
87+
"styleSettings": {},
88+
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
89+
},
90+
"galleries": [
91+
{
92+
"name": "Simple Template",
93+
"category": "Failures",
94+
"order": 100,
95+
"type": "tsg",
96+
"resourceType": "microsoft.insights/components"
97+
}
98+
],
99+
"localized": null
100+
}
101+
}
102+
}
103+
}
104+
}

0 commit comments

Comments
 (0)