Skip to content

Commit

Permalink
stable 2020-11-20 workbooktemplates (Azure#13793)
Browse files Browse the repository at this point in the history
* 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 <69238381+kairu-ms@users.noreply.github.com>

* Update specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2020-11-20/workbookTemplates_API.json

Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com>

* 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 <69238381+kairu-ms@users.noreply.github.com>
  • Loading branch information
vutran01 and kairu-ms authored May 24, 2021
1 parent e018c35 commit 1750698
Show file tree
Hide file tree
Showing 8 changed files with 1,092 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"parameters": {
"api-version": "2020-11-20",
"resourceGroupName": "my-resource-group",
"resourceName": "testtemplate2",
"subscriptionId": "subid",
"workbookTemplateProperties": {
"location": "west us",
"properties": {
"priority": 1,
"author": "Contoso",
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"type": "tsg",
"resourceType": "microsoft.insights/components",
"order": 100
}
],
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
},
"tags": null
}
},
"responses": {
"200": {
"body": {
"name": "testtemplate2",
"location": "westeurope",
"tags": null,
"type": "microsoft.insights/workbooktemplates",
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
"properties": {
"priority": 1,
"author": "Contoso",
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
},
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"order": 100,
"type": "tsg",
"resourceType": "microsoft.insights/components"
}
],
"localized": null
}
}
},
"201": {
"body": {
"name": "testtemplate2",
"location": "westeurope",
"tags": null,
"type": "microsoft.insights/workbooktemplates",
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
"properties": {
"priority": 1,
"author": "Contoso",
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
},
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"order": 100,
"type": "tsg",
"resourceType": "microsoft.insights/components"
}
],
"localized": null
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"api-version": "2020-11-20",
"subscriptionId": "subid",
"resourceGroupName": "my-resource-group",
"resourceName": "my-template-resource"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"parameters": {
"api-version": "2020-11-20",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "my-resource-name"
},
"responses": {
"200": {
"body": {
"name": "my-resource-name",
"type": "microsoft.insights/workbooktemplate",
"location": "westus",
"id": "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/microsoft.insights/workbooktemplates/my-resource-name",
"properties": {
"priority": 1,
"author": "Contoso",
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"type": "tsg",
"resourceType": "microsoft.insights/components",
"order": 100
}
],
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
},
"tags": null
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"parameters": {
"api-version": "2020-11-20",
"subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af",
"resourceGroupName": "my-resource-group",
"resourceName": "my-template-resource",
"workbookTemplateProperties": {
"name": "display-name-of-template",
"location": "west us",
"type": "microsoft.insights/workbooktemplates",
"properties": {
"priority": 1,
"author": "Contoso",
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"type": "tsg",
"resourceType": "microsoft.insights/components",
"order": 100
}
],
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
},
"tags": null
}
},
"responses": {
"200": {
"body": {
"name": "testtemplate2",
"location": "westeurope",
"tags": null,
"type": "microsoft.insights/workbooktemplates",
"id": "/subscriptions/50359d91-7b9d-4823-85af-eb298a61ba95/resourceGroups/testrg/providers/microsoft.insights/workbooktemplates/testtemplate2",
"properties": {
"priority": 1,
"author": "Contoso",
"templateData": {
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"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."
},
"name": "text - 2"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union withsource=TableName *\n| summarize Count=count() by TableName\n| render barchart",
"size": 1,
"exportToExcelOptions": "visible",
"queryType": 0,
"resourceType": "microsoft.operationalinsights/workspaces"
},
"name": "query - 2"
}
],
"styleSettings": {},
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
},
"galleries": [
{
"name": "Simple Template",
"category": "Failures",
"order": 100,
"type": "tsg",
"resourceType": "microsoft.insights/components"
}
],
"localized": null
}
}
}
}
}
Loading

0 comments on commit 1750698

Please sign in to comment.