From a892e9fd58932c8cfc3faa94d0525e5824dcc247 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:18:09 -0700 Subject: [PATCH 01/53] Adding Workbooks resource type. --- .../examples/LinkedWorkbookResponseOnly.json | 13 + .../2015-05-01/examples/WorkbookAdd.json | 51 ++ .../2015-05-01/examples/WorkbookAddLink.json | 14 + .../2015-05-01/examples/WorkbookGet.json | 33 + .../examples/WorkbookResponseOnly.json | 16 + .../2015-05-01/examples/WorkbookUpdate.json | 50 ++ .../examples/WorkbookUpdateLink.json | 32 + .../2015-05-01/examples/WorkbooksList.json | 49 ++ .../examples/WorkbooksListLink.json | 51 ++ .../2015-05-01/examples/workbookDelete.json | 15 + .../stable/2015-05-01/workbooks_API.json | 695 ++++++++++++++++++ .../resource-manager/readme.md | 2 + .../2015-04-01/examples/OperationList.json | 49 +- 13 files changed, 1065 insertions(+), 5 deletions(-) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json new file mode 100644 index 000000000000..7fe66f3c0846 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "linkProperties": { + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" + } + }, + "responses": { + "200": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json new file mode 100644 index 000000000000..0e7c71f15345 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "subscriptionId": "subid", + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "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}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json new file mode 100644 index 000000000000..12d17c0aee18 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json new file mode 100644 index 000000000000..ceb4e88622bc --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "type": "", + "location": "westus", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json new file mode 100644 index 000000000000..5abc43074990 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "sourceId": "azure source id", + "category": "workbook", + "location": "us west", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json new file mode 100644 index 000000000000..f135343b34df --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } +} + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json new file mode 100644 index 000000000000..79a275036eb1 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "timeModified": null, + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json new file mode 100644 index 000000000000..e762584335e6 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "category": "workbook" + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"verion\":\"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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json new file mode 100644 index 000000000000..b0262789137d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "canFetchWorkbook": true, + "tags": [] + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json new file mode 100644 index 000000000000..4b7ff91a4b45 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "location": "west us", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json new file mode 100644 index 000000000000..c2987ea71f1d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -0,0 +1,695 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights workbook type.", + "version": "2015-05-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "get": { + "description": "Get all Workbooks defined within a specified resource group and category.", + "operationId": "Workbooks_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "$ref": "#/definitions/WorkbookListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbooks_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookDelete.json" + } + } + }, + "put": { + "description": "Create a new workbook.", + "operationId": "Workbooks_Create", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/WorkbookAdd.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The workbook definition updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookUpdate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbooks_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + }, + "/providers/microsoft.insights/workbooks": { + "get": { + "description": "Gets a list of workbooks.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksListLink.json" + } + } + }, + "put": { + "description": "Create a new workbook link.", + "operationId": "Workbooks_CreateLink", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The link has been created." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_UpdateLink", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The workbook link updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbooks_DeleteLink", + "parameters": [ + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook link has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookList": { + "$ref": "./examples/WorkbookResponseOnly.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "WorkbookListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + }, + "description": "An array of workbooks." + } + }, + "description": "Workbook list result." + }, + "Workbook": { + "description": "An Application Insights workbook definition.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": false + } + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a web test for an Azure resource.", + "$ref": "#/definitions/WorkbookProperties" + } + } + }, + "LinkProperties": { + "description": "Contains a sourceId and workbook resource id to link two resources.", + "properties": { + "sourceId": { + "type": "string", + "description": "The source Azure resource id" + }, + "targetId": { + "type": "string", + "description": "The workbook Azure resource id" + }, + "category": { + "type": "string", + "description": "The category of workbook" + } + } + }, + "WorkbookProperties": { + "description": "Properties that contain a workbook.", + "required": [ + "name", + "kind", + "category", + "workbookId", + "serializedData", + "userId" + ], + "properties": { + "name": { + "type": "string", + "description": "The user-defined name of the workbook." + }, + "serializedData": { + "type": "string", + "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" + }, + "version": { + "type": "string", + "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." + }, + "workbookId": { + "type": "string", + "description": "Internally assigned unique id of the workbook definition." + }, + "kind": { + "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", + "x-ms-client-name": "SharedTypeKind", + "default": "shared", + "type": "string", + "enum": [ + "shared", + "user" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": false + } + }, + "timeModified": { + "type": "string", + "description": "Date and time in UTC of the last modification that was made to this workbook definition.", + "readOnly": true + }, + "category": { + "type": "string", + "description": "Workbook category, as defined by the user at creation time." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of 0 or more tags that are associated with this workbook definition" + }, + "userId": { + "type": "string", + "description": "Unique user id of the specific user that owns this workbook." + }, + "sourceResourceId": { + "type": "string", + "description": "Optional resourceId for a source resource." + } + } + }, + "ErrorFieldContract": { + "properties": { + "code": { + "type": "string", + "description": "Property level error code." + }, + "message": { + "type": "string", + "description": "Human-readable representation of property-level error." + }, + "target": { + "type": "string", + "description": "Property name." + } + }, + "description": "Error Field contract." + }, + "WorkbookErrorResponse": { + "properties": { + "code": { + "type": "string", + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorFieldContract" + }, + "description": "The list of invalid fields send in request, in case of validation error." + } + }, + "description": "Error message body that will indicate why the operation failed." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "WorkbookResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "query", + "required": true, + "type": "string", + "description": "The name of location where workbook is stored.", + "x-ms-parameter-location": "method" + }, + "CategoryParameter": { + "name": "category", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "workbook", + "TSG", + "performance", + "retention" + ], + "x-ms-enum": { + "name": "CategoryType", + "modelAsString": true + }, + "description": "Category of workbook to return.", + "x-ms-parameter-location": "method" + }, + "SourceIdParameter": { + "name": "sourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id that will fetch all linked workbooks.", + "x-ms-parameter-location": "method" + }, + "CanFetchWorkbookContentParameter": { + "name": "canFetchContent", + "in": "query", + "required": false, + "type": "boolean", + "description": "Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks.", + "x-ms-parameter-location": "method" + }, + "TagsParameter": { + "name": "tags", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Tags presents on each workbook returned.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index c56fa95dcc25..48a626053ec4 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -245,6 +245,7 @@ input-file: - Microsoft.Insights/stable/2015-05-01/favorites_API.json - Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json - Microsoft.Insights/stable/2015-05-01/webTests_API.json +- Microsoft.Insights/stable/2015-05-01/workbooks_API.json ``` ### Tag: package-2017-10 @@ -376,6 +377,7 @@ input-file: - ./Microsoft.Insights/stable/2015-05-01/aiOperations_API.json - ./Microsoft.Insights/stable/2015-05-01/components_API.json - ./Microsoft.Insights/stable/2015-05-01/webTests_API.json + - ./Microsoft.Insights/stable/2015-05-01/workbooks_API.json override-info: title: ApplicationInsightsManagementClient diff --git a/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json b/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json index ecb517307f53..a9b7694da946 100644 --- a/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json +++ b/specification/monitor/resource-manager/microsoft.insights/stable/2015-04-01/examples/OperationList.json @@ -659,13 +659,52 @@ } }, { - "name":"Microsoft.Insights/Webtests/Read", + "name":"Microsoft.Insights/Workbooks/Read", "display":{ "publisher":"Microsoft", - "provider":"Microsoft Monitoring Insights", - "resource":"Web tests", - "operation":"Webtest read", - "description":"Reading a webtest configuration" + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks read", + "description":"Reading a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks write", + "description":"Writing to a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks delete", + "description":"Deleting a Workbooks configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Workbooks/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Application Insights", + "resource":"Workbooks", + "operation":"Workbooks read", + "description":"Reading a Workbooks configuration" }, "properties":{ From aee99140e738b1db27861cc263ff999b6a57c637 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:30:45 -0700 Subject: [PATCH 02/53] Rename workbookDelete.json to WorkbookDelete.json --- .../examples/{workbookDelete.json => WorkbookDelete.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/{workbookDelete.json => WorkbookDelete.json} (100%) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json similarity index 100% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/workbookDelete.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json From 4ba66aa10ab02dd9018381b7b3e7210174b60dc1 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 29 Mar 2018 14:52:16 -0700 Subject: [PATCH 03/53] Fixed undefiend parameter issue with Delete verb. --- .../2015-05-01/examples/WorkbookDeleteLink.json | 14 ++++++++++++++ .../stable/2015-05-01/workbooks_API.json | 17 +++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json new file mode 100644 index 000000000000..d9b4bc1de5ea --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "resourceId": "Azure resource id", + "category": "workbook", + "location": "west us" + }, + "responses": { + "200": { + }, + "204": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index c2987ea71f1d..360fbfec01ea 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -371,14 +371,11 @@ } }, "delete": { - "description": "Delete a workbook.", + "description": "Delete a link between a source resource and workbook resource.", "operationId": "Workbooks_DeleteLink", "parameters": [ { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" + "$ref": "#/parameters/ResourceIdParameter" }, { "$ref": "#/parameters/CategoryParameter" @@ -403,7 +400,7 @@ }, "x-ms-examples": { "WorkbookList": { - "$ref": "./examples/WorkbookResponseOnly.json" + "$ref": "./examples/WorkbookDeleteLink.json" } } } @@ -671,6 +668,14 @@ "description": "Azure Resource Id that will fetch all linked workbooks.", "x-ms-parameter-location": "method" }, + "ResourceIdParameter": { + "name": "resourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id or any target workbook resource id.", + "x-ms-parameter-location": "method" + }, "CanFetchWorkbookContentParameter": { "name": "canFetchContent", "in": "query", From 667221564451572a6967ad8f15baf609a46ffe8a Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 30 Mar 2018 12:22:20 -0700 Subject: [PATCH 04/53] Update swagger to add subscriptionId --- .../examples/LinkedWorkbookResponseOnly.json | 3 +- .../2015-05-01/examples/WorkbookAddLink.json | 2 +- .../examples/WorkbookDeleteLink.json | 1 + .../stable/2015-05-01/workbooks_API.json | 65 +++++++++++++++++-- 4 files changed, 62 insertions(+), 9 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json index 7fe66f3c0846..4df7f492d046 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -1,5 +1,6 @@ { "parameters": { + "subscriptionId": "subid", "api-version": "2015-05-01", "linkProperties": { "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", @@ -8,6 +9,6 @@ }, "responses": { "200": { - } + } } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json index 12d17c0aee18..5b1a848b1072 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json @@ -6,7 +6,7 @@ "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" }, "responses": { - "200": { + "201": { }, "204": { } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json index d9b4bc1de5ea..92dcebcd3c89 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -1,5 +1,6 @@ { "parameters": { + "subscriptionId": "subid", "api-version": "2015-05-01", "resourceId": "Azure resource id", "category": "workbook", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 360fbfec01ea..0a72d85d0cc3 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -118,7 +118,7 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookDelete": { "$ref": "./examples/WorkbookDelete.json" } } @@ -210,7 +210,7 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookUpdate": { "$ref": "./examples/WorkbookUpdate.json" } } @@ -255,11 +255,14 @@ } } }, - "/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { "get": { "description": "Gets a list of workbooks.", "operationId": "Workbooks_ListBySourceId", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/SourceIdParameter" }, @@ -294,7 +297,7 @@ } }, "x-ms-examples": { - "WorkbooksList": { + "WorkbooksListLink": { "$ref": "./examples/WorkbooksListLink.json" } } @@ -303,6 +306,9 @@ "description": "Create a new workbook link.", "operationId": "Workbooks_CreateLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -337,6 +343,9 @@ "description": "Updates a workbook that has already been added.", "operationId": "Workbooks_UpdateLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -365,7 +374,7 @@ } }, "x-ms-examples": { - "WorkbookAdd": { + "WorkbookUpdateLink": { "$ref": "./examples/LinkedWorkbookResponseOnly.json" } } @@ -374,6 +383,9 @@ "description": "Delete a link between a source resource and workbook resource.", "operationId": "Workbooks_DeleteLink", "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ResourceIdParameter" }, @@ -399,12 +411,51 @@ } }, "x-ms-examples": { - "WorkbookList": { + "WorkbookDeleteLink": { "$ref": "./examples/WorkbookDeleteLink.json" } } } - } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { + "get": { + "description": "Gets a workbook link by a workbook resource name.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + } }, "definitions": { "Resource": { From 92ff8e941e2653e47b92665f1a30943ac968fe84 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 30 Mar 2018 12:52:34 -0700 Subject: [PATCH 05/53] Fixed duplicated operation id issue --- .../Microsoft.Insights/stable/2015-05-01/workbooks_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 0a72d85d0cc3..28e4b6584cf7 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -258,7 +258,7 @@ "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { "get": { "description": "Gets a list of workbooks.", - "operationId": "Workbooks_ListBySourceId", + "operationId": "Workbooks_List", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" From c245a85973ec62e036c09efc7375f77a5c4cf758 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 13:21:50 -0700 Subject: [PATCH 06/53] Removed links endpoint --- .../2015-05-01/examples/WorkbookAdd.json | 38 +-- .../2015-05-01/examples/WorkbookUpdate.json | 38 +-- .../2015-05-01/examples/WorkbooksList.json | 4 +- .../stable/2015-05-01/workbooks_API.json | 240 ++---------------- 4 files changed, 70 insertions(+), 250 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index 0e7c71f15345..e39be4602011 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -4,24 +4,28 @@ "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", - "workbookProperties": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "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}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null + "workbookPayload": { + "workbook": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "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}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "linkResource": { + } } }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index f135343b34df..bb9cd81cc240 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -4,24 +4,28 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null + "workbookPayload": { + "workbook": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + }, + "linkResource": { } -} + } }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index e762584335e6..48cd4fda78c8 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -2,9 +2,9 @@ "parameters": { "api-version": "2015-05-01", "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", "location": "west us", - "category": "workbook" + "category": "workbook", + "resourceId": "resource id" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 28e4b6584cf7..a62da0b59b55 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -34,17 +34,14 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { "get": { - "description": "Get all Workbooks defined within a specified resource group and category.", + "description": "Get all Workbooks defined within a specified subscriptionId. It will get a list of workbooks or linked workbooks based on $filter clause. If sourceId is specified, it will get a list of linked workbboks. If a targetId is specified, it will get a list of workboks. When a targetId is specified, a resourceName is not required. Even if it is provided, it will be ignored.", "operationId": "Workbooks_ListByResourceGroup", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, { "$ref": "#/parameters/LocationParameter" }, @@ -59,6 +56,9 @@ }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ResourceIdParameter" } ], "responses": { @@ -140,12 +140,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", + "name": "workbookPayload", + "description": "Properties that need to be specified to create a new workbook or link.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookPayload" } } ], @@ -186,12 +186,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", + "name": "workbookPayload", + "description": "Properties that need to be specified to create a new workbook or link.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookPayload" } } ], @@ -254,208 +254,7 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { - "get": { - "description": "Gets a list of workbooks.", - "operationId": "Workbooks_List", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/TagsParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A list containing 0 or more workbook definitions.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Workbook" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListLink.json" - } - } - }, - "put": { - "description": "Create a new workbook link.", - "operationId": "Workbooks_CreateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The link has been created." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookAdd": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "patch": { - "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_UpdateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The workbook link updated.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookUpdateLink": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "delete": { - "description": "Delete a link between a source resource and workbook resource.", - "operationId": "Workbooks_DeleteLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The workbook link has been successfully deleted." - }, - "204": { - "description": "The resource doens't exisit." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookDeleteLink": { - "$ref": "./examples/WorkbookDeleteLink.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { - "get": { - "description": "Gets a workbook link by a workbook resource name.", - "operationId": "Workbooks_ListBySourceId", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - } + } }, "definitions": { "Resource": { @@ -532,6 +331,19 @@ } } }, + "WorkbookPayload": { + "description": "This wraps either Workbook definition or LinkReource properties.", + "properties": { + "workbook": { + "$ref": "#/definitions/Workbook", + "description": "Workbook properties. If provided, it will be used to create new workbook." + }, + "linkResource": { + "$ref": "#/definitions/LinkProperties", + "description": "LinkProperties. If provided, it will be used to create a link." + } + } + }, "LinkProperties": { "description": "Contains a sourceId and workbook resource id to link two resources.", "properties": { @@ -724,7 +536,7 @@ "in": "query", "required": true, "type": "string", - "description": "Azure Resource Id or any target workbook resource id.", + "description": "Azure Resource id or any target workbook resource id.", "x-ms-parameter-location": "method" }, "CanFetchWorkbookContentParameter": { From bed6bc30d4bc4bd5716fb9f907ac74f224b4b81d Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 13:24:00 -0700 Subject: [PATCH 07/53] Removed unused samples --- .../examples/LinkedWorkbookResponseOnly.json | 14 ----- .../examples/WorkbookDeleteLink.json | 15 ------ .../examples/WorkbookUpdateLink.json | 32 ------------ .../examples/WorkbooksListLink.json | 51 ------------------- 4 files changed, 112 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json deleted file mode 100644 index 4df7f492d046..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "linkProperties": { - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" - } - }, - "responses": { - "200": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json deleted file mode 100644 index 92dcebcd3c89..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "resourceId": "Azure resource id", - "category": "workbook", - "location": "west us" - }, - "responses": { - "200": { - }, - "204": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json deleted file mode 100644 index 79a275036eb1..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "timeModified": null, - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json deleted file mode 100644 index b0262789137d..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "category": "workbook", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "canFetchWorkbook": true, - "tags": [] - }, - "responses": { - "200": { - "body": [ - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [], - "properties": { - "name": "My Workbook 1", - "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - }, - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": ["SampleTag01", "SampleTag2"], - "properties": { - "name": "My Workbook 2", - "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - ] - } - } -} \ No newline at end of file From d3bac2038fc4f6b4d21f12c014d2b1007ec1c3e5 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 14:56:00 -0700 Subject: [PATCH 08/53] Revert "Removed unused samples" This reverts commit bed6bc30d4bc4bd5716fb9f907ac74f224b4b81d. --- .../examples/LinkedWorkbookResponseOnly.json | 14 +++++ .../examples/WorkbookDeleteLink.json | 15 ++++++ .../examples/WorkbookUpdateLink.json | 32 ++++++++++++ .../examples/WorkbooksListLink.json | 51 +++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json new file mode 100644 index 000000000000..4df7f492d046 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2015-05-01", + "linkProperties": { + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" + } + }, + "responses": { + "200": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json new file mode 100644 index 000000000000..92dcebcd3c89 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "subid", + "api-version": "2015-05-01", + "resourceId": "Azure resource id", + "category": "workbook", + "location": "west us" + }, + "responses": { + "200": { + }, + "204": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json new file mode 100644 index 000000000000..79a275036eb1 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "timeModified": null, + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json new file mode 100644 index 000000000000..b0262789137d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "canFetchWorkbook": true, + "tags": [] + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file From 5259a41517efcef04f500f54564c0a695d69e4af Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 3 Apr 2018 14:56:09 -0700 Subject: [PATCH 09/53] Revert "Removed links endpoint" This reverts commit c245a85973ec62e036c09efc7375f77a5c4cf758. --- .../2015-05-01/examples/WorkbookAdd.json | 38 ++- .../2015-05-01/examples/WorkbookUpdate.json | 38 ++- .../2015-05-01/examples/WorkbooksList.json | 4 +- .../stable/2015-05-01/workbooks_API.json | 240 ++++++++++++++++-- 4 files changed, 250 insertions(+), 70 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index e39be4602011..0e7c71f15345 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -4,28 +4,24 @@ "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", - "workbookPayload": { - "workbook": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "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}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "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}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null }, - "linkResource": { - } + "tags": [ + "TagSample01", + "TagSample02" + ] } }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index bb9cd81cc240..f135343b34df 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -4,28 +4,24 @@ "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookPayload": { - "workbook": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - }, - "linkResource": { + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null } - } +} }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index 48cd4fda78c8..e762584335e6 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -2,9 +2,9 @@ "parameters": { "api-version": "2015-05-01", "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", "location": "west us", - "category": "workbook", - "resourceId": "resource id" + "category": "workbook" }, "responses": { "200": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index a62da0b59b55..28e4b6584cf7 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -34,14 +34,17 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { "get": { - "description": "Get all Workbooks defined within a specified subscriptionId. It will get a list of workbooks or linked workbooks based on $filter clause. If sourceId is specified, it will get a list of linked workbboks. If a targetId is specified, it will get a list of workboks. When a targetId is specified, a resourceName is not required. Even if it is provided, it will be ignored.", + "description": "Get all Workbooks defined within a specified resource group and category.", "operationId": "Workbooks_ListByResourceGroup", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, { "$ref": "#/parameters/LocationParameter" }, @@ -56,9 +59,6 @@ }, { "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" } ], "responses": { @@ -140,12 +140,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookPayload", - "description": "Properties that need to be specified to create a new workbook or link.", + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkbookPayload" + "$ref": "#/definitions/Workbook" } } ], @@ -186,12 +186,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookPayload", - "description": "Properties that need to be specified to create a new workbook or link.", + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkbookPayload" + "$ref": "#/definitions/Workbook" } } ], @@ -254,7 +254,208 @@ } } } - } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { + "get": { + "description": "Gets a list of workbooks.", + "operationId": "Workbooks_List", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbooksListLink": { + "$ref": "./examples/WorkbooksListLink.json" + } + } + }, + "put": { + "description": "Create a new workbook link.", + "operationId": "Workbooks_CreateLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The link has been created." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbooks_UpdateLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "linkProperties", + "description": "Properties that need to be specified to create a workbook link.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LinkProperties" + } + } + ], + "responses": { + "200": { + "description": "The workbook link updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookUpdateLink": { + "$ref": "./examples/LinkedWorkbookResponseOnly.json" + } + } + }, + "delete": { + "description": "Delete a link between a source resource and workbook resource.", + "operationId": "Workbooks_DeleteLink", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceIdParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The workbook link has been successfully deleted." + }, + "204": { + "description": "The resource doens't exisit." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookDeleteLink": { + "$ref": "./examples/WorkbookDeleteLink.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { + "get": { + "description": "Gets a workbook link by a workbook resource name.", + "operationId": "Workbooks_ListBySourceId", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookErrorResponse" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + } + } }, "definitions": { "Resource": { @@ -331,19 +532,6 @@ } } }, - "WorkbookPayload": { - "description": "This wraps either Workbook definition or LinkReource properties.", - "properties": { - "workbook": { - "$ref": "#/definitions/Workbook", - "description": "Workbook properties. If provided, it will be used to create new workbook." - }, - "linkResource": { - "$ref": "#/definitions/LinkProperties", - "description": "LinkProperties. If provided, it will be used to create a link." - } - } - }, "LinkProperties": { "description": "Contains a sourceId and workbook resource id to link two resources.", "properties": { @@ -536,7 +724,7 @@ "in": "query", "required": true, "type": "string", - "description": "Azure Resource id or any target workbook resource id.", + "description": "Azure Resource Id or any target workbook resource id.", "x-ms-parameter-location": "method" }, "CanFetchWorkbookContentParameter": { From 4227f6c77925c789e94cfa8b5e2545594e21b323 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 4 Apr 2018 17:50:34 -0700 Subject: [PATCH 10/53] Removed link logic and added get by resourceid --- .../examples/LinkedWorkbookResponseOnly.json | 14 -- .../2015-05-01/examples/WorkbookAdd.json | 22 ++ .../2015-05-01/examples/WorkbookAddLink.json | 14 -- .../2015-05-01/examples/WorkbookDelete.json | 2 +- .../examples/WorkbookDeleteLink.json | 15 -- .../examples/WorkbookResponseOnly.json | 16 -- .../examples/WorkbookUpdateLink.json | 32 --- ...Link.json => WorkbooksListBySourceId.json} | 0 .../stable/2015-05-01/workbooks_API.json | 199 +++--------------- 9 files changed, 49 insertions(+), 265 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json rename specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/{WorkbooksListLink.json => WorkbooksListBySourceId.json} (100%) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json deleted file mode 100644 index 4df7f492d046..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/LinkedWorkbookResponseOnly.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "linkProperties": { - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "targetId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Insights/workbook/91d51e13-9a1b-49be-9ac0-0927c19b1dbf" - } - }, - "responses": { - "200": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json index 0e7c71f15345..6a4d5b893386 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAdd.json @@ -46,6 +46,28 @@ "TagSample02" ] } + }, + "201": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } } } } \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json deleted file mode 100644 index 5b1a848b1072..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookAddLink.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960" - }, - "responses": { - "201": { - }, - "204": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json index 4b7ff91a4b45..55e211e37569 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json @@ -7,7 +7,7 @@ "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" }, "responses": { - "200": { + "201": { }, "204": { } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json deleted file mode 100644 index 92dcebcd3c89..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDeleteLink.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "subscriptionId": "subid", - "api-version": "2015-05-01", - "resourceId": "Azure resource id", - "category": "workbook", - "location": "west us" - }, - "responses": { - "200": { - }, - "204": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json deleted file mode 100644 index 5abc43074990..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookResponseOnly.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "sourceId": "azure source id", - "category": "workbook", - "location": "us west", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" - }, - "responses": { - "200": { - }, - "204": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json deleted file mode 100644 index 79a275036eb1..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdateLink.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "timeModified": null, - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - }, - "responses": { - "200": { - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json similarity index 100% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListLink.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 28e4b6584cf7..3af806c42aad 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -65,13 +65,13 @@ "200": { "description": "A list containing 0 or more workbook definitions.", "schema": { - "$ref": "#/definitions/WorkbookListResult" + "$ref": "#/definitions/Workbooks" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -85,7 +85,7 @@ "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { "delete": { "description": "Delete a workbook.", - "operationId": "Workbooks_Delete", + "operationId": "Workbook_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -104,16 +104,16 @@ } ], "responses": { - "200": { + "201": { "description": "The workbook has been successfully deleted." }, "204": { - "description": "The resource doens't exisit." + "description": "The resource doens't exist." }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -125,7 +125,7 @@ }, "put": { "description": "Create a new workbook.", - "operationId": "Workbooks_Create", + "operationId": "Workbook_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -156,10 +156,16 @@ "$ref": "#/definitions/Workbook" } }, + "201": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -171,7 +177,7 @@ }, "patch": { "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_Update", + "operationId": "Workbook_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -205,7 +211,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -219,7 +225,7 @@ "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { "get": { "description": "Get a single workbook by its resourceName.", - "operationId": "Workbooks_Get", + "operationId": "Workbook_Get", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -244,7 +250,7 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, @@ -255,10 +261,10 @@ } } }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/links": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { "get": { - "description": "Gets a list of workbooks.", - "operationId": "Workbooks_List", + "description": "Gets a list of workbooks by sourceId.", + "operationId": "Workbook_List", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -292,170 +298,17 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" + "$ref": "#/definitions/WorkbookError" } } }, "x-ms-examples": { "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListLink.json" - } - } - }, - "put": { - "description": "Create a new workbook link.", - "operationId": "Workbooks_CreateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The link has been created." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookAdd": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "patch": { - "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_UpdateLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "linkProperties", - "description": "Properties that need to be specified to create a workbook link.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/LinkProperties" - } - } - ], - "responses": { - "200": { - "description": "The workbook link updated.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookUpdateLink": { - "$ref": "./examples/LinkedWorkbookResponseOnly.json" - } - } - }, - "delete": { - "description": "Delete a link between a source resource and workbook resource.", - "operationId": "Workbooks_DeleteLink", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The workbook link has been successfully deleted." - }, - "204": { - "description": "The resource doens't exisit." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookDeleteLink": { - "$ref": "./examples/WorkbookDeleteLink.json" + "$ref": "./examples/WorkbooksListBySourceId.json" } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}/links": { - "get": { - "description": "Gets a workbook link by a workbook resource name.", - "operationId": "Workbooks_ListBySourceId", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookErrorResponse" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - } + } }, "definitions": { "Resource": { @@ -493,7 +346,7 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "WorkbookListResult": { + "Workbooks": { "properties": { "value": { "type": "array", @@ -633,7 +486,7 @@ }, "description": "Error Field contract." }, - "WorkbookErrorResponse": { + "WorkbookError": { "properties": { "code": { "type": "string", From 328b75c26fc80e1be1fa36a4e5684dc302886c53 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 4 Apr 2018 17:56:03 -0700 Subject: [PATCH 11/53] Applied PR comments --- .../stable/2015-05-01/examples/WorkbookGet.json | 4 ++-- .../stable/2015-05-01/examples/WorkbookUpdate.json | 2 +- .../stable/2015-05-01/examples/WorkbooksList.json | 2 +- .../stable/2015-05-01/examples/WorkbooksListBySourceId.json | 2 +- .../Microsoft.Insights/stable/2015-05-01/workbooks_API.json | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json index ceb4e88622bc..f291a5d5b94b 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "location": "west us", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" @@ -14,7 +14,7 @@ "type": "", "location": "westus", "properties": { - "name": "Blah Blah Blah", + "name": "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": "ME", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json index f135343b34df..472a88653122 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookUpdate.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "workbookProperties": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index e762584335e6..c1b1214d103c 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "location": "west us", "category": "workbook" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json index b0262789137d..2482bbab334f 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2015-05-01", - "subscriptionId": "subid", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "category": "workbook", "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 3af806c42aad..4ad3bd1f42cb 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -375,7 +375,7 @@ ], "x-ms-enum": { "name": "SharedTypeKind", - "modelAsString": false + "modelAsString": true } }, "properties": { @@ -440,7 +440,7 @@ ], "x-ms-enum": { "name": "SharedTypeKind", - "modelAsString": false + "modelAsString": true } }, "timeModified": { From b7421982ebcb992a114798cc036d56c029bde370 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 18 Apr 2018 10:20:00 -0700 Subject: [PATCH 12/53] Added Resource Group parameter for GET. Removed get by sourceId since we are not using sourceId anymore --- .../examples/WorkbooksListBySourceId.json | 51 ------- .../stable/2015-05-01/workbooks_API.json | 127 ++++++------------ 2 files changed, 40 insertions(+), 138 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json deleted file mode 100644 index 2482bbab334f..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksListBySourceId.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", - "resourceGroupName": "my-resource-group", - "category": "workbook", - "sourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "canFetchWorkbook": true, - "tags": [] - }, - "responses": { - "200": { - "body": [ - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [], - "properties": { - "name": "My Workbook 1", - "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - }, - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": ["SampleTag01", "SampleTag2"], - "properties": { - "name": "My Workbook 2", - "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - ] - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 4ad3bd1f42cb..1ab651d0e7ff 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -83,6 +83,46 @@ } }, "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbook_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/LocationParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + }, "delete": { "description": "Delete a workbook.", "operationId": "Workbook_Delete", @@ -221,93 +261,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks/{resourceName}": { - "get": { - "description": "Get a single workbook by its resourceName.", - "operationId": "Workbook_Get", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/LocationParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/microsoft.insights/workbooks": { - "get": { - "description": "Gets a list of workbooks by sourceId.", - "operationId": "Workbook_List", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/TagsParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A list containing 0 or more workbook definitions.", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Workbook" - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbooksListLink": { - "$ref": "./examples/WorkbooksListBySourceId.json" - } - } - } } }, "definitions": { From 12a39625cc68eb8eb32d3f864fbc025629864998 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 18 Apr 2018 11:02:05 -0700 Subject: [PATCH 13/53] Resolved the merge conflicts with readme.md --- specification/applicationinsights/resource-manager/readme.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index a9ce231acdac..1367e03a92b5 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -254,10 +254,7 @@ input-file: - Microsoft.Insights/stable/2015-05-01/favorites_API.json - Microsoft.Insights/stable/2015-05-01/webTestLocations_API.json - Microsoft.Insights/stable/2015-05-01/webTests_API.json -<<<<<<< HEAD -======= - microsoft.insights/stable/2015-05-01/analyticsItems_API.json ->>>>>>> upstream/master - Microsoft.Insights/stable/2015-05-01/workbooks_API.json ``` From ebf8df0f1369a164100318bd295fa37d12d6ef7c Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Sat, 21 Apr 2018 12:26:03 -0700 Subject: [PATCH 14/53] Remove a location parameter since ARM routes it as we are using an tracted resource type --- .../2015-05-01/examples/WorkbookDelete.json | 1 - .../stable/2015-05-01/examples/WorkbookGet.json | 1 - .../2015-05-01/examples/WorkbooksList.json | 1 - .../stable/2015-05-01/workbooks_API.json | 17 ----------------- 4 files changed, 20 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json index 55e211e37569..c9fc249f8b4c 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookDelete.json @@ -3,7 +3,6 @@ "api-version": "2015-05-01", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", - "location": "west us", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json index f291a5d5b94b..2ca735abb836 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbookGet.json @@ -3,7 +3,6 @@ "api-version": "2015-05-01", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", - "location": "west us", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json index c1b1214d103c..f9ed6a892437 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WorkbooksList.json @@ -3,7 +3,6 @@ "api-version": "2015-05-01", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", - "location": "west us", "category": "workbook" }, "responses": { diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json index 1ab651d0e7ff..722aa6c9e079 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/workbooks_API.json @@ -45,9 +45,6 @@ { "$ref": "#/parameters/ResourceGroupNameParameter" }, - { - "$ref": "#/parameters/LocationParameter" - }, { "$ref": "#/parameters/CategoryParameter" }, @@ -96,9 +93,6 @@ { "$ref": "#/parameters/WorkbookResourceNameParameter" }, - { - "$ref": "#/parameters/LocationParameter" - }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -136,9 +130,6 @@ { "$ref": "#/parameters/WorkbookResourceNameParameter" }, - { - "$ref": "#/parameters/LocationParameter" - }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -491,14 +482,6 @@ "description": "The name of the Application Insights component resource.", "x-ms-parameter-location": "method" }, - "LocationParameter": { - "name": "location", - "in": "query", - "required": true, - "type": "string", - "description": "The name of location where workbook is stored.", - "x-ms-parameter-location": "method" - }, "CategoryParameter": { "name": "category", "in": "query", From 75c93ebb20f55dff0b4330dbeee3068979c39f18 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 25 Apr 2018 19:48:05 -0700 Subject: [PATCH 15/53] Created newer version (2018-04-01-preview) for workbook resource type. --- .../2018-04-01/examples/WorkbookAdd.json | 74 +++ .../2018-04-01/examples/WorkbookDelete.json | 14 + .../2018-04-01/examples/WorkbookGet.json | 32 ++ .../2018-04-01/examples/WorkbookUpdate.json | 51 ++ .../2018-04-01/examples/WorkbooksList.json | 49 ++ .../preview/2018-04-01/workbooks_API.json | 541 ++++++++++++++++++ 6 files changed, 761 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json new file mode 100644 index 000000000000..10ca702f796b --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "subscriptionId": "subid", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "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}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "201": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json new file mode 100644 index 000000000000..c9fc249f8b4c --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "201": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json new file mode 100644 index 000000000000..2ca735abb836 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "type": "", + "location": "westus", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json new file mode 100644 index 000000000000..ab888dbfa22c --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } +} + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json new file mode 100644 index 000000000000..3260f212a47a --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1" + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"verion\":\"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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json new file mode 100644 index 000000000000..5683bfe1ce4c --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json @@ -0,0 +1,541 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights workbook type.", + "version": "2015-05-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "get": { + "description": "Get all Workbooks defined within a specified resource group and category.", + "operationId": "Workbooks_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "$ref": "#/definitions/Workbooks" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbook_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + }, + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbook_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "The workbook has been successfully deleted." + }, + "204": { + "description": "The resource doens't exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookDelete": { + "$ref": "./examples/WorkbookDelete.json" + } + } + }, + "put": { + "description": "Create a new workbook.", + "operationId": "Workbook_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "201": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/WorkbookAdd.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbook_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The workbook definition updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookUpdate": { + "$ref": "./examples/WorkbookUpdate.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "Workbooks": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + }, + "description": "An array of workbooks." + } + }, + "description": "Workbook list result." + }, + "Workbook": { + "description": "An Application Insights workbook definition.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a web test for an Azure resource.", + "$ref": "#/definitions/WorkbookProperties" + } + } + }, + "LinkProperties": { + "description": "Contains a sourceId and workbook resource id to link two resources.", + "properties": { + "sourceId": { + "type": "string", + "description": "The source Azure resource id" + }, + "targetId": { + "type": "string", + "description": "The workbook Azure resource id" + }, + "category": { + "type": "string", + "description": "The category of workbook" + } + } + }, + "WorkbookProperties": { + "description": "Properties that contain a workbook.", + "required": [ + "name", + "kind", + "category", + "workbookId", + "serializedData", + "userId" + ], + "properties": { + "name": { + "type": "string", + "description": "The user-defined name of the workbook." + }, + "serializedData": { + "type": "string", + "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" + }, + "version": { + "type": "string", + "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." + }, + "workbookId": { + "type": "string", + "description": "Internally assigned unique id of the workbook definition." + }, + "kind": { + "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", + "x-ms-client-name": "SharedTypeKind", + "default": "shared", + "type": "string", + "enum": [ + "shared", + "user" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "timeModified": { + "type": "string", + "description": "Date and time in UTC of the last modification that was made to this workbook definition.", + "readOnly": true + }, + "category": { + "type": "string", + "description": "Workbook category, as defined by the user at creation time." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of 0 or more tags that are associated with this workbook definition" + }, + "userId": { + "type": "string", + "description": "Unique user id of the specific user that owns this workbook." + }, + "sourceResourceId": { + "type": "string", + "description": "Optional resourceId for a source resource." + } + } + }, + "ErrorFieldContract": { + "properties": { + "code": { + "type": "string", + "description": "Property level error code." + }, + "message": { + "type": "string", + "description": "Human-readable representation of property-level error." + }, + "target": { + "type": "string", + "description": "Property name." + } + }, + "description": "Error Field contract." + }, + "WorkbookError": { + "properties": { + "code": { + "type": "string", + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorFieldContract" + }, + "description": "The list of invalid fields send in request, in case of validation error." + } + }, + "description": "Error message body that will indicate why the operation failed." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "WorkbookResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "CategoryParameter": { + "name": "category", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "workbook", + "TSG", + "performance", + "retention" + ], + "x-ms-enum": { + "name": "CategoryType", + "modelAsString": true + }, + "description": "Category of workbook to return.", + "x-ms-parameter-location": "method" + }, + "SourceIdParameter": { + "name": "sourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id that will fetch all related workbooks.", + "x-ms-parameter-location": "method" + }, + "CanFetchWorkbookContentParameter": { + "name": "canFetchContent", + "in": "query", + "required": false, + "type": "boolean", + "description": "Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks.", + "x-ms-parameter-location": "method" + }, + "TagsParameter": { + "name": "tags", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Tags presents on each workbook returned.", + "x-ms-parameter-location": "method" + } + } +} From 86e578d0e5f6edf3e30f207b1ea355a7b5c5b22d Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 13 Jun 2018 16:10:02 -0700 Subject: [PATCH 16/53] Added Microsoft/Insights/Operations --- .../2018-04-01/examples/WorkbookAdd.json | 74 --- .../2018-04-01/examples/WorkbookDelete.json | 14 - .../2018-04-01/examples/WorkbookGet.json | 32 -- .../2018-04-01/examples/WorkbookUpdate.json | 51 -- .../2018-04-01/examples/WorkbooksList.json | 49 -- .../preview/2018-04-01/workbooks_API.json | 541 ------------------ 6 files changed, 761 deletions(-) delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json delete mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json deleted file mode 100644 index 10ca702f796b..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookAdd.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "subscriptionId": "subid", - "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", - "workbookProperties": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "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}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - } - }, - "responses": { - "200": { - "body": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - } - }, - "201": { - "body": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - } - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json deleted file mode 100644 index c9fc249f8b4c..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookDelete.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "subid", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" - }, - "responses": { - "201": { - }, - "204": { - } - } -} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json deleted file mode 100644 index 2ca735abb836..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookGet.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" - }, - "responses": { - "200": { - "body": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "type": "", - "location": "westus", - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - }, - "tags": [ - "TagSample01", - "TagSample02" - ] - } - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json deleted file mode 100644 index ab888dbfa22c..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbookUpdate.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", - "resourceGroupName": "my-resource-group", - "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "location": "west us", - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } -} - }, - "responses": { - "200": { - "body": { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [ - "TagSample01", - "TagSample02" - ], - "properties": { - "name": "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json deleted file mode 100644 index 3260f212a47a..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/examples/WorkbooksList.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "api-version": "2015-05-01", - "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", - "resourceGroupName": "my-resource-group", - "category": "workbook", - "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1" - }, - "responses": { - "200": { - "body": [ - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [], - "properties": { - "name": "My Workbook 1", - "userId": "userId", - "serializedData": "{\"verion\":\"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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - }, - { - "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - "type": "", - "location": "westus", - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": ["SampleTag01", "SampleTag2"], - "properties": { - "name": "My Workbook 2", - "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", - "category": "workbook", - "timeModified": null - } - } - ] - } - } -} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json deleted file mode 100644 index 5683bfe1ce4c..000000000000 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-04-01/workbooks_API.json +++ /dev/null @@ -1,541 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ApplicationInsightsManagementClient", - "description": "Azure Application Insights workbook type.", - "version": "2015-05-01" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow.", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { - "get": { - "description": "Get all Workbooks defined within a specified resource group and category.", - "operationId": "Workbooks_ListByResourceGroup", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/CategoryParameter" - }, - { - "$ref": "#/parameters/TagsParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/CanFetchWorkbookContentParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A list containing 0 or more workbook definitions.", - "schema": { - "$ref": "#/definitions/Workbooks" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbooksList": { - "$ref": "./examples/WorkbooksList.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { - "get": { - "description": "Get a single workbook by its resourceName.", - "operationId": "Workbook_Get", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "A workbook definition.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookGet": { - "$ref": "./examples/WorkbookGet.json" - } - } - }, - "delete": { - "description": "Delete a workbook.", - "operationId": "Workbook_Delete", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "201": { - "description": "The workbook has been successfully deleted." - }, - "204": { - "description": "The resource doens't exist." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookDelete": { - "$ref": "./examples/WorkbookDelete.json" - } - } - }, - "put": { - "description": "Create a new workbook.", - "operationId": "Workbook_CreateOrUpdate", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Workbook" - } - } - ], - "responses": { - "200": { - "description": "The newly created workbook.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "201": { - "description": "The newly created workbook.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookAdd": { - "$ref": "./examples/WorkbookAdd.json" - } - } - }, - "patch": { - "description": "Updates a workbook that has already been added.", - "operationId": "Workbook_Update", - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/WorkbookResourceNameParameter" - }, - { - "$ref": "#/parameters/SourceIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "workbookProperties", - "description": "Properties that need to be specified to create a new workbook.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Workbook" - } - } - ], - "responses": { - "200": { - "description": "The workbook definition updated.", - "schema": { - "$ref": "#/definitions/Workbook" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/WorkbookError" - } - } - }, - "x-ms-examples": { - "WorkbookUpdate": { - "$ref": "./examples/WorkbookUpdate.json" - } - } - } - } - }, - "definitions": { - "Resource": { - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Azure resource Id" - }, - "name": { - "type": "string", - "description": "Azure resource name", - "readOnly": true - }, - "type": { - "type": "string", - "readOnly": true, - "description": "Azure resource type" - }, - "location": { - "type": "string", - "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] - }, - "tags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - } - }, - "x-ms-azure-resource": true, - "description": "An azure resource object" - }, - "Workbooks": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Workbook" - }, - "description": "An array of workbooks." - } - }, - "description": "Workbook list result." - }, - "Workbook": { - "description": "An Application Insights workbook definition.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "kind": { - "type": "string", - "description": "The kind of workbook. Choices are user and shared.", - "enum": [ - "user", - "shared" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, - "properties": { - "x-ms-client-flatten": true, - "description": "Metadata describing a web test for an Azure resource.", - "$ref": "#/definitions/WorkbookProperties" - } - } - }, - "LinkProperties": { - "description": "Contains a sourceId and workbook resource id to link two resources.", - "properties": { - "sourceId": { - "type": "string", - "description": "The source Azure resource id" - }, - "targetId": { - "type": "string", - "description": "The workbook Azure resource id" - }, - "category": { - "type": "string", - "description": "The category of workbook" - } - } - }, - "WorkbookProperties": { - "description": "Properties that contain a workbook.", - "required": [ - "name", - "kind", - "category", - "workbookId", - "serializedData", - "userId" - ], - "properties": { - "name": { - "type": "string", - "description": "The user-defined name of the workbook." - }, - "serializedData": { - "type": "string", - "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" - }, - "version": { - "type": "string", - "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." - }, - "workbookId": { - "type": "string", - "description": "Internally assigned unique id of the workbook definition." - }, - "kind": { - "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", - "x-ms-client-name": "SharedTypeKind", - "default": "shared", - "type": "string", - "enum": [ - "shared", - "user" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, - "timeModified": { - "type": "string", - "description": "Date and time in UTC of the last modification that was made to this workbook definition.", - "readOnly": true - }, - "category": { - "type": "string", - "description": "Workbook category, as defined by the user at creation time." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "A list of 0 or more tags that are associated with this workbook definition" - }, - "userId": { - "type": "string", - "description": "Unique user id of the specific user that owns this workbook." - }, - "sourceResourceId": { - "type": "string", - "description": "Optional resourceId for a source resource." - } - } - }, - "ErrorFieldContract": { - "properties": { - "code": { - "type": "string", - "description": "Property level error code." - }, - "message": { - "type": "string", - "description": "Human-readable representation of property-level error." - }, - "target": { - "type": "string", - "description": "Property name." - } - }, - "description": "Error Field contract." - }, - "WorkbookError": { - "properties": { - "code": { - "type": "string", - "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." - }, - "message": { - "type": "string", - "description": "Human-readable representation of the error." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorFieldContract" - }, - "description": "The list of invalid fields send in request, in case of validation error." - } - }, - "description": "Error message body that will indicate why the operation failed." - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The Azure subscription ID." - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group.", - "x-ms-parameter-location": "method" - }, - "WorkbookResourceNameParameter": { - "name": "resourceName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the Application Insights component resource.", - "x-ms-parameter-location": "method" - }, - "CategoryParameter": { - "name": "category", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "workbook", - "TSG", - "performance", - "retention" - ], - "x-ms-enum": { - "name": "CategoryType", - "modelAsString": true - }, - "description": "Category of workbook to return.", - "x-ms-parameter-location": "method" - }, - "SourceIdParameter": { - "name": "sourceId", - "in": "query", - "required": true, - "type": "string", - "description": "Azure Resource Id that will fetch all related workbooks.", - "x-ms-parameter-location": "method" - }, - "CanFetchWorkbookContentParameter": { - "name": "canFetchContent", - "in": "query", - "required": false, - "type": "boolean", - "description": "Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks.", - "x-ms-parameter-location": "method" - }, - "TagsParameter": { - "name": "tags", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "csv", - "description": "Tags presents on each workbook returned.", - "x-ms-parameter-location": "method" - } - } -} From 1f479eb5145a73c3a86af486cca747aff5b2d348 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 13 Jun 2018 16:10:09 -0700 Subject: [PATCH 17/53] Added Microsoft/Insights/Operations --- .../2018-06-01/examples/WorkbookAdd.json | 74 +++ .../2018-06-01/examples/WorkbookDelete.json | 14 + .../2018-06-01/examples/WorkbookGet.json | 32 ++ .../2018-06-01/examples/WorkbookUpdate.json | 51 ++ .../2018-06-01/examples/WorkbooksList.json | 49 ++ .../2018-06-01/workbookOperations_API.json | 137 +++++ .../preview/2018-06-01/workbooks_API.json | 541 ++++++++++++++++++ 7 files changed, 898 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json new file mode 100644 index 000000000000..ec51a08c3287 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "subscriptionId": "subid", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", + "workbookProperties": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "properties": { + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", + "name": "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}", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + }, + "201": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json new file mode 100644 index 000000000000..ee1b090666f3 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "201": { + }, + "204": { + } + } +} diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json new file mode 100644 index 000000000000..6335fec73476 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "type": "", + "location": "westus", + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + }, + "tags": [ + "TagSample01", + "TagSample02" + ] + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json new file mode 100644 index 000000000000..c269e66b4542 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "location": "west us", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } +} + }, + "responses": { + "200": { + "body": { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [ + "TagSample01", + "TagSample02" + ], + "properties": { + "name": "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json new file mode 100644 index 000000000000..38bee1e14a69 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2018-06-01", + "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", + "resourceGroupName": "my-resource-group", + "category": "workbook", + "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1" + }, + "responses": { + "200": { + "body": [ + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": [], + "properties": { + "name": "My Workbook 1", + "userId": "userId", + "serializedData": "{\"verion\":\"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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + }, + { + "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", + "type": "", + "location": "westus", + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "tags": ["SampleTag01", "SampleTag2"], + "properties": { + "name": "My Workbook 2", + "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": "ME", + "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", + "category": "workbook", + "timeModified": null + } + } + ] + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json new file mode 100644 index 000000000000..602d586bb6a4 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json @@ -0,0 +1,137 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-06-01-preview", + "title": "WorkbookClient", + "description": "Azure client for Workbook." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Insights/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available insights REST API operations.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Insights error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ] + } + } + }, + "definitions": { + "ErrorResponse": { + "description": "Error response indicates Insights service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "Operation": { + "description": "CDN REST API operation", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Cdn", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: Profile, endpoint, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + } + } + } + } + }, + "OperationListResult": { + "description": "Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of CDN operations supported by the CDN resource provider." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json new file mode 100644 index 000000000000..65cd446e6d31 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json @@ -0,0 +1,541 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights workbook type.", + "version": "2018-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks": { + "get": { + "description": "Get all Workbooks defined within a specified resource group and category.", + "operationId": "Workbooks_ListByResourceGroup", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/CategoryParameter" + }, + { + "$ref": "#/parameters/TagsParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/CanFetchWorkbookContentParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more workbook definitions.", + "schema": { + "$ref": "#/definitions/Workbooks" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbooksList": { + "$ref": "./examples/WorkbooksList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { + "get": { + "description": "Get a single workbook by its resourceName.", + "operationId": "Workbook_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A workbook definition.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookGet": { + "$ref": "./examples/WorkbookGet.json" + } + } + }, + "delete": { + "description": "Delete a workbook.", + "operationId": "Workbook_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "The workbook has been successfully deleted." + }, + "204": { + "description": "The resource doens't exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookDelete": { + "$ref": "./examples/WorkbookDelete.json" + } + } + }, + "put": { + "description": "Create a new workbook.", + "operationId": "Workbook_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "201": { + "description": "The newly created workbook.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookAdd": { + "$ref": "./examples/WorkbookAdd.json" + } + } + }, + "patch": { + "description": "Updates a workbook that has already been added.", + "operationId": "Workbook_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/WorkbookResourceNameParameter" + }, + { + "$ref": "#/parameters/SourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "workbookProperties", + "description": "Properties that need to be specified to create a new workbook.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Workbook" + } + } + ], + "responses": { + "200": { + "description": "The workbook definition updated.", + "schema": { + "$ref": "#/definitions/Workbook" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/WorkbookError" + } + } + }, + "x-ms-examples": { + "WorkbookUpdate": { + "$ref": "./examples/WorkbookUpdate.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name", + "readOnly": true + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "Workbooks": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Workbook" + }, + "description": "An array of workbooks." + } + }, + "description": "Workbook list result." + }, + "Workbook": { + "description": "An Application Insights workbook definition.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a web test for an Azure resource.", + "$ref": "#/definitions/WorkbookProperties" + } + } + }, + "LinkProperties": { + "description": "Contains a sourceId and workbook resource id to link two resources.", + "properties": { + "sourceId": { + "type": "string", + "description": "The source Azure resource id" + }, + "targetId": { + "type": "string", + "description": "The workbook Azure resource id" + }, + "category": { + "type": "string", + "description": "The category of workbook" + } + } + }, + "WorkbookProperties": { + "description": "Properties that contain a workbook.", + "required": [ + "name", + "kind", + "category", + "workbookId", + "serializedData", + "userId" + ], + "properties": { + "name": { + "type": "string", + "description": "The user-defined name of the workbook." + }, + "serializedData": { + "type": "string", + "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" + }, + "version": { + "type": "string", + "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." + }, + "workbookId": { + "type": "string", + "description": "Internally assigned unique id of the workbook definition." + }, + "kind": { + "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", + "x-ms-client-name": "SharedTypeKind", + "default": "shared", + "type": "string", + "enum": [ + "shared", + "user" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "timeModified": { + "type": "string", + "description": "Date and time in UTC of the last modification that was made to this workbook definition.", + "readOnly": true + }, + "category": { + "type": "string", + "description": "Workbook category, as defined by the user at creation time." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of 0 or more tags that are associated with this workbook definition" + }, + "userId": { + "type": "string", + "description": "Unique user id of the specific user that owns this workbook." + }, + "sourceResourceId": { + "type": "string", + "description": "Optional resourceId for a source resource." + } + } + }, + "ErrorFieldContract": { + "properties": { + "code": { + "type": "string", + "description": "Property level error code." + }, + "message": { + "type": "string", + "description": "Human-readable representation of property-level error." + }, + "target": { + "type": "string", + "description": "Property name." + } + }, + "description": "Error Field contract." + }, + "WorkbookError": { + "properties": { + "code": { + "type": "string", + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorFieldContract" + }, + "description": "The list of invalid fields send in request, in case of validation error." + } + }, + "description": "Error message body that will indicate why the operation failed." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "WorkbookResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "CategoryParameter": { + "name": "category", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "workbook", + "TSG", + "performance", + "retention" + ], + "x-ms-enum": { + "name": "CategoryType", + "modelAsString": true + }, + "description": "Category of workbook to return.", + "x-ms-parameter-location": "method" + }, + "SourceIdParameter": { + "name": "sourceId", + "in": "query", + "required": true, + "type": "string", + "description": "Azure Resource Id that will fetch all related workbooks.", + "x-ms-parameter-location": "method" + }, + "CanFetchWorkbookContentParameter": { + "name": "canFetchContent", + "in": "query", + "required": false, + "type": "boolean", + "description": "Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks.", + "x-ms-parameter-location": "method" + }, + "TagsParameter": { + "name": "tags", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Tags presents on each workbook returned.", + "x-ms-parameter-location": "method" + } + } +} From 2f52c4e9dd9b1e43aa0dff06dfba949c97c281b6 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 13 Jun 2018 16:13:41 -0700 Subject: [PATCH 18/53] Corrected the api version. --- .../preview/2018-06-01/examples/WorkbookAdd.json | 2 +- .../preview/2018-06-01/examples/WorkbookDelete.json | 2 +- .../preview/2018-06-01/examples/WorkbookGet.json | 2 +- .../preview/2018-06-01/examples/WorkbookUpdate.json | 2 +- .../preview/2018-06-01/examples/WorkbooksList.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json index ec51a08c3287..d9adb2186123 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01", + "api-version": "2018-06-01-preview", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json index ee1b090666f3..2376d9a266ed 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01", + "api-version": "2018-06-01-preview", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json index 6335fec73476..4016f2fb4730 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01", + "api-version": "2018-06-01-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json index c269e66b4542..1efe0a289027 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01", + "api-version": "2018-06-01-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json index 38bee1e14a69..a5e8fe15fdfc 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01", + "api-version": "2018-06-01-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "category": "workbook", From 4dca63c83b7b05a0f7fc92783ca7b34831d676c5 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 25 Jun 2018 14:35:44 -0700 Subject: [PATCH 19/53] Made properties of PATCH operation as not required. Updated the version number to reflect the actual production one. --- .../examples/WorkbookAdd.json | 2 +- .../examples/WorkbookDelete.json | 2 +- .../examples/WorkbookGet.json | 2 +- .../examples/WorkbookUpdate.json | 2 +- .../examples/WorkbooksList.json | 2 +- .../workbookOperations_API.json | 2 +- .../{2018-06-01 => 2018-06-17-preview}/workbooks_API.json | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/examples/WorkbookAdd.json (99%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/examples/WorkbookDelete.json (85%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/examples/WorkbookGet.json (97%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/examples/WorkbookUpdate.json (98%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/examples/WorkbooksList.json (98%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/workbookOperations_API.json (98%) rename specification/applicationinsights/resource-manager/Microsoft.Insights/preview/{2018-06-01 => 2018-06-17-preview}/workbooks_API.json (99%) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json similarity index 99% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json index d9adb2186123..1f14b4e65502 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01-preview", + "api-version": "2018-06-17-preview", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-8bee-4d3b-a059-9be8dac93960", "subscriptionId": "subid", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookDelete.json similarity index 85% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookDelete.json index 2376d9a266ed..27006a5cd642 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookDelete.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookDelete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01-preview", + "api-version": "2018-06-17-preview", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json similarity index 97% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json index 4016f2fb4730..941e4f35f77a 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01-preview", + "api-version": "2018-06-17-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2" diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json similarity index 98% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json index 1efe0a289027..0097e2f8bcc4 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01-preview", + "api-version": "2018-06-17-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json similarity index 98% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json index a5e8fe15fdfc..1b1e14c25b68 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-06-01-preview", + "api-version": "2018-06-17-preview", "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "category": "workbook", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbookOperations_API.json similarity index 98% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbookOperations_API.json index 602d586bb6a4..7e84c44985a1 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbookOperations_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbookOperations_API.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2018-06-01-preview", + "version": "2018-06-17-preview", "title": "WorkbookClient", "description": "Azure client for Workbook." }, diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json similarity index 99% rename from specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json rename to specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json index 65cd446e6d31..db4ef6c2857e 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-01/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json @@ -3,7 +3,7 @@ "info": { "title": "ApplicationInsightsManagementClient", "description": "Azure Application Insights workbook type.", - "version": "2018-06-01-preview" + "version": "2018-06-17-preview" }, "host": "management.azure.com", "schemes": [ @@ -235,7 +235,7 @@ "name": "workbookProperties", "description": "Properties that need to be specified to create a new workbook.", "in": "body", - "required": true, + "required": false, "schema": { "$ref": "#/definitions/Workbook" } From f59f9fe9d4d22ffee805a7e8bbd6cf349b12acb6 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 25 Jun 2018 21:28:13 -0700 Subject: [PATCH 20/53] Updated Resource properties with the correct fields. Created new definition for PATCH operation since location is not required field --- .../examples/WorkbookAdd.json | 36 ++--- .../examples/WorkbookGet.json | 12 +- .../examples/WorkbookUpdate.json | 24 +-- .../examples/WorkbooksList.json | 14 +- .../2018-06-17-preview/workbooks_API.json | 150 ++++++++++-------- 5 files changed, 117 insertions(+), 119 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json index 1f14b4e65502..cb2ebaf080cb 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookAdd.json @@ -9,20 +9,16 @@ "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "location": "west us", + "kind": "shared", "properties": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - "name": "Blah Blah Blah", + "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}", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "tags": null } }, "responses": { @@ -30,44 +26,36 @@ "body": { "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "type": "", + "kind": "shared", "location": "westus", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "properties": { - "name": "Blah Blah Blah", + "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "tags": null } }, "201": { "body": { "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "type": "", + "kind": "shared", "location": "westus", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "properties": { - "name": "Blah Blah Blah", + "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "tags": null } } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json index 941e4f35f77a..c137d3e4f721 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookGet.json @@ -11,21 +11,17 @@ "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "type": "", + "kind": "shared", "location": "westus", "properties": { - "name": "My New Workbook", + "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null }, - "tags": [ - "TagSample01", - "TagSample02" - ] + "tags": null } } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json index 0097e2f8bcc4..92ad9371962f 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbookUpdate.json @@ -7,19 +7,15 @@ "sourceId": "/subscriptions/ad2f1a83-caac-4e21-9d2a-9ca3f87105e2/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/MyTestApp-CodeLens1", "workbookProperties": { "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "kind": "shared", "location": "west us", - "tags": [ - "TagSample01", - "TagSample02" - ], + "tags": null, "properties": { - "name": "Blah Blah Blah", + "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null } } @@ -29,20 +25,16 @@ "body": { "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "type": "", + "kind": "shared", "location": "westus", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "tags": [ - "TagSample01", - "TagSample02" - ], + "tags": null, "properties": { - "name": "Blah Blah Blah", + "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json index 1b1e14c25b68..496bf3f4e5c2 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/examples/WorkbooksList.json @@ -12,34 +12,32 @@ { "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "type": "", + "kind": "shared", "location": "westus", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "tags": [], "properties": { - "name": "My Workbook 1", + "displayName": "My Workbook 1", "userId": "userId", "serializedData": "{\"verion\":\"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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null } }, { "id": "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", "type": "", + "kind": "shared", "location": "westus", "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "tags": ["SampleTag01", "SampleTag2"], "properties": { - "name": "My Workbook 2", + "displayName": "My Workbook 2", "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": "ME", - "workbookId": "deadb33f-8bee-4d3b-a059-9be8dac93960", - "kind": "shared", "category": "workbook", + "version": "ME", "timeModified": null } } diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json index db4ef6c2857e..5b0e18356d82 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json @@ -232,12 +232,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", + "name": "WorkbookUpdateParameters", "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": false, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookUpdateParameters" } } ], @@ -273,14 +273,26 @@ }, "name": { "type": "string", - "description": "Azure resource name", - "readOnly": true + "readOnly": true, + "description": "Azure resource name. This is GUID value. The display name should be assigned within properties field." }, "type": { "type": "string", "readOnly": true, "description": "Azure resource type" }, + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, "location": { "type": "string", "description": "Resource location", @@ -290,12 +302,16 @@ ] }, "tags": { + "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "An azure resource object" }, @@ -319,83 +335,30 @@ } ], "properties": { - "kind": { - "type": "string", - "description": "The kind of workbook. Choices are user and shared.", - "enum": [ - "user", - "shared" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, "properties": { "x-ms-client-flatten": true, - "description": "Metadata describing a web test for an Azure resource.", + "description": "Metadata describing a workbook for an Azure resource.", "$ref": "#/definitions/WorkbookProperties" } } }, - "LinkProperties": { - "description": "Contains a sourceId and workbook resource id to link two resources.", - "properties": { - "sourceId": { - "type": "string", - "description": "The source Azure resource id" - }, - "targetId": { - "type": "string", - "description": "The workbook Azure resource id" - }, - "category": { - "type": "string", - "description": "The category of workbook" - } - } - }, "WorkbookProperties": { "description": "Properties that contain a workbook.", "required": [ - "name", - "kind", + "displayName", "category", - "workbookId", "serializedData", "userId" ], "properties": { - "name": { + "displayName": { "type": "string", - "description": "The user-defined name of the workbook." + "description": "The user-defined name (display name) of the workbook." }, "serializedData": { "type": "string", "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" }, - "version": { - "type": "string", - "description": "This instance's version of the data model. This can change as new features are added that can be marked workbook." - }, - "workbookId": { - "type": "string", - "description": "Internally assigned unique id of the workbook definition." - }, - "kind": { - "description": "Enum indicating if this workbook definition is owned by a specific user or is shared between all users with access to the Application Insights component.", - "x-ms-client-name": "SharedTypeKind", - "default": "shared", - "type": "string", - "enum": [ - "shared", - "user" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, "timeModified": { "type": "string", "description": "Date and time in UTC of the last modification that was made to this workbook definition.", @@ -405,6 +368,10 @@ "type": "string", "description": "Workbook category, as defined by the user at creation time." }, + "version": { + "type": "string", + "description": "Workbook version" + }, "tags": { "type": "array", "items": { @@ -415,10 +382,67 @@ "userId": { "type": "string", "description": "Unique user id of the specific user that owns this workbook." + } + } + }, + "WorkbookUpdateParameters": { + "properties": { + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" }, - "sourceResourceId": { + "location": { "type": "string", - "description": "Optional resourceId for a source resource." + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a workbook for an Azure resource.", + "$ref": "#/definitions/WorkbookPropertiesUpdateParameters" + } + }, + "description": "The parameters that can be provided when updating workbook properties properties." + }, + "WorkbookPropertiesUpdateParameters": { + "description": "Properties that contain a workbook for PATCH operation.", + "properties": { + "displayName": { + "type": "string", + "description": "The user-defined name (display name) of the workbook." + }, + "serializedData": { + "type": "string", + "description": "Configuration of this particular workbook. Configuration data is a string containing valid JSON" + }, + "category": { + "type": "string", + "description": "Workbook category, as defined by the user at creation time." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of 0 or more tags that are associated with this workbook definition" } } }, From eb7483095a753330a67968fa61b04ebeec2b0eb0 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 25 Jun 2018 22:26:49 -0700 Subject: [PATCH 21/53] Update readme file --- .../resource-manager/readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specification/applicationinsights/resource-manager/readme.md b/specification/applicationinsights/resource-manager/readme.md index 1367e03a92b5..4f594ee447d7 100644 --- a/specification/applicationinsights/resource-manager/readme.md +++ b/specification/applicationinsights/resource-manager/readme.md @@ -268,6 +268,14 @@ input-file: - Microsoft.Insights/preview/2017-10-01/componentFeaturesAndPricing_API.json ``` +### Tag: package-2018-06-17-preview + +These settings apply only when `--tag=package-2018-06-17-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-06-17-preview' +input-file: +- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json +``` --- # Code Generation @@ -391,4 +399,13 @@ input-file: override-info: title: ApplicationInsightsManagementClient +``` + +### Tag: schema-2018-06-17-preview + +These settings apply only when `--tag=schema-2018-06-17-preview` is specified on the command line. + +``` yaml $(tag) == 'schema-2018-06-17-preview' +input-file: +- Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json ``` \ No newline at end of file From 3fcc797b4b04ba68ff1afa1fe9e51c84db888ab5 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 2 Jul 2018 15:47:48 -0700 Subject: [PATCH 22/53] Uses plural for operation group name --- .../2018-06-17-preview/workbooks_API.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json index 5b0e18356d82..7f8f07f1b648 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json @@ -65,7 +65,7 @@ "200": { "description": "A list containing 0 or more workbook definitions.", "schema": { - "$ref": "#/definitions/Workbooks" + "$ref": "#/definitions/WorkbooksListResult" } }, "default": { @@ -73,7 +73,10 @@ "schema": { "$ref": "#/definitions/WorkbookError" } - } + } + }, + "x-ms-pageable": { + "nextLinkName": null }, "x-ms-examples": { "WorkbooksList": { @@ -85,7 +88,7 @@ "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { "get": { "description": "Get a single workbook by its resourceName.", - "operationId": "Workbook_Get", + "operationId": "Workbooks_Get", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -122,7 +125,7 @@ }, "delete": { "description": "Delete a workbook.", - "operationId": "Workbook_Delete", + "operationId": "Workbooks_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -159,7 +162,7 @@ }, "put": { "description": "Create a new workbook.", - "operationId": "Workbook_CreateOrUpdate", + "operationId": "Workbooks_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -214,7 +217,7 @@ }, "patch": { "description": "Updates a workbook that has already been added.", - "operationId": "Workbook_Update", + "operationId": "Workbooks_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -315,7 +318,7 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "Workbooks": { + "WorkbooksListResult": { "properties": { "value": { "type": "array", From bd29c56a2bded4aea91ca603d5a9dd2cf01a84b1 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 2 Jul 2018 16:14:54 -0700 Subject: [PATCH 23/53] Removed x-ms-mutability settings --- .../preview/2018-06-17-preview/workbooks_API.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json index 7f8f07f1b648..5edf32009b36 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json @@ -411,11 +411,7 @@ }, "location": { "type": "string", - "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] + "description": "Resource location" }, "properties": { "x-ms-client-flatten": true, From 46c31d1746c049e2b4774c2368a80890349e6606 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 2 Jul 2018 16:19:45 -0700 Subject: [PATCH 24/53] Removed the location settings for PATCH --- .../preview/2018-06-17-preview/workbooks_API.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json index 5edf32009b36..8767c21df81d 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-06-17-preview/workbooks_API.json @@ -409,10 +409,6 @@ }, "description": "Resource tags" }, - "location": { - "type": "string", - "description": "Resource location" - }, "properties": { "x-ms-client-flatten": true, "description": "Metadata describing a workbook for an Azure resource.", From 9f5758c06ab4ff31de1c15decee1151a7ef1abab Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 15 Mar 2019 14:31:35 -0700 Subject: [PATCH 25/53] Added Microsoft.ResourceGraph/SavedQuery resource type --- .../examples/OperationsList.json | 22 + .../examples/SavedQueryAdd.json | 83 +++ .../examples/SavedQueryDelete.json | 14 + .../examples/SavedQueryGet.json | 37 ++ .../examples/SavedQueryList.json | 63 ++ .../examples/SavedQueryUpdate.json | 79 +++ .../2019-03-01-preview/savedquery.json | 601 ++++++++++++++++++ 7 files changed, 899 insertions(+) create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json new file mode 100644 index 000000000000..7c518f331172 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.ResourceGraph/savedQuery/action", + "display": { + "provider": "Microsoft Resource Graph", + "resource": "SavedQuery", + "operation": "Query savedQuery", + "description": "Submits a query on resources within specified subscription and resource group." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json new file mode 100644 index 000000000000..da2e4ecbb561 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -0,0 +1,83 @@ +{ + "title": "Create a saved query", + "description": "Create new saved query resource.", + "parameters": { + "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", + "resourceGroupName": "My Resource Group", + "resourceName": "MyDockerVMs", + "api-version": "2019-03-01-preview", + "savedQueryProperties": { + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "modifiedBy": "userId1" + } + } + }, + "responses": { + "200": { + "body": { + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "userId1" + } + } + }, + "201": { + "body": { + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "type": "Microsoft.ResourceGraph/savedQueries", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "userId1" + } + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json new file mode 100644 index 000000000000..bb88d998b5e6 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json @@ -0,0 +1,14 @@ +{ + "title": "Delete a saved query", + "description": "Delete a saved query resource by subscription id, resource group, and resource name.", + "parameters": { + "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", + "resourceGroupName": "My Resource Group", + "resourceName": "MyDockerVM", + "api-version": "2019-03-01-preview" + }, + "responses": { + "201": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json new file mode 100644 index 000000000000..8917e2359282 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json @@ -0,0 +1,37 @@ +{ + "title": "Get a saved query", + "description": "Get a saved query resource by subid, resource group, and resource name.", + "parameters": { + "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", + "resourceGroupName": "My Resource Group", + "resourceName": "MyDockerVMs", + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "{userId}" + } + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json new file mode 100644 index 000000000000..0ccabf349498 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json @@ -0,0 +1,63 @@ +{ + "title": "Get a list of saved queries", + "description": "Get a list of saved queries within subscription id and resource group.", + "parameters": { + "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", + "resourceGroupName": "My Resource Group", + "api-version": "2019-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "{userId}" + } + }, + { + "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/savedQueries/MyTestVMs", + "name": "MyTestVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Test VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "type": "sub" + }, + "timeModified": "2019-03-13T13:51:13-07:00", + "modifiedBy": "{userId}" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json new file mode 100644 index 000000000000..6d6982ae8f99 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json @@ -0,0 +1,79 @@ +{ + "title": "Update a saved query", + "description": "Update the existing saved query resource.", + "parameters": { + "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", + "resourceGroupName": "My Resource Group", + "resourceName": "MyDockerVMs", + "api-version": "2019-03-01-preview", + "savedQueryProperties": { + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Modified description", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef" + ], + "type": "sub" + }, + "modifiedBy": "{userId123}" + } + } + }, + "responses": { + "200": { + "body": { + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Modified description", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef" + ], + "type": "sub" + }, + "timeModified": "2019-03-14T13:51:13-07:00", + "modifiedBy": "{userId123}" + } + } + }, + "201": { + "body": { + "id": " /subscriptions/{sid}/resources/{rid}/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": null, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "{sid1}", + "{sid2}", + "{sid3}" + ], + "type": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "{userId}" + } + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json new file mode 100644 index 000000000000..ba7ce408360e --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -0,0 +1,601 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Resource Graph Saved Query", + "description": "Azure Resource Graph Saved Query API Reference", + "version": "2019-03-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/savedQuery": { + "get": { + "description": "Get all saved query defined within a specified subscription and resource group.", + "operationId": "SavedQuery_List", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A list containing 0 or more saved queries.", + "schema": { + "$ref": "#/definitions/SavedQueryListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SavedQueryError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Get a list of Saved Queries": { + "$ref": "./examples/SavedQueryList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/savedQuery/{resourceName}": { + "get": { + "description": "Get a single saved query by its resourceName.", + "operationId": "SavedQuery_Get", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SavedQueryResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A saved query definition.", + "schema": { + "$ref": "#/definitions/SavedQueryResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SavedQueryError" + } + } + }, + "x-ms-examples": { + "Get Saved Query": { + "$ref": "./examples/SavedQueryGet.json" + } + } + }, + "delete": { + "description": "Delete a saved query.", + "operationId": "SavedQuery_Delete", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SavedQueryResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "The saved query has been successfully deleted." + }, + "204": { + "description": "The resource doesn't exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SavedQueryError" + } + } + }, + "x-ms-examples": { + "Delete Saved Query": { + "$ref": "./examples/SavedQueryDelete.json" + } + } + }, + "put": { + "description": "Create a new saved query.", + "operationId": "SavedQuery_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SavedQueryResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "savedQueryProperties", + "description": "Properties that need to be specified to create a new saved query.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SavedQueryResource" + } + } + ], + "responses": { + "200": { + "description": "The newly created saved query.", + "schema": { + "$ref": "#/definitions/SavedQueryResource" + } + }, + "201": { + "description": "The newly created saved query.", + "schema": { + "$ref": "#/definitions/SavedQueryResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SavedQueryError" + } + } + }, + "x-ms-examples": { + "Create Saved Query": { + "$ref": "./examples/SavedQueryAdd.json" + } + } + }, + "patch": { + "description": "Updates a saved query that has already been added.", + "operationId": "SavedQuery_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SavedQueryResourceNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "SavedQueryUpdateParameters", + "description": "Properties that need to be specified to create a new saved query.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SavedQueryUpdateParameters" + } + } + ], + "responses": { + "200": { + "description": "The saved query definition updated.", + "schema": { + "$ref": "#/definitions/SavedQueryResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SavedQueryError" + } + } + }, + "x-ms-examples": { + "Update Saved Query": { + "$ref": "./examples/SavedQueryUpdate.json" + } + } + } + }, + "/providers/Microsoft.ResourceGraph/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available REST API operations.", + "operationId": "Operations_List", + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/OperationsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name. This is GUID value. The display name should be assigned within properties field." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "kind": { + "type": "string", + "description": "The kind of workbook. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "SavedQueryListResult": { + "properties": { + "value": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SavedQueryResource" + }, + "description": "An array of saved queries." + } + }, + "description": "Saved query list result." + }, + "SavedQueryResource": { + "description": "Saved Query entity definition.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a saved query for an Azure resource.", + "$ref": "#/definitions/SavedQueryProperties" + } + } + }, + "Scope": { + "description": "Contains a list of subscriptions or management groups.", + "properties": { + "list": { + "type": "string", + "description": "The list of subscriptions or management groups." + }, + "type": { + "description": "Enum indicating a type of a list. it is 'sub' for subscriptions or 'mg' for management group", + "x-ms-client-name": "type", + "default": "sub", + "type": "string", + "enum": [ + "sub", + "mg" + ], + "x-ms-enum": { + "name": "type", + "modelAsString": true + } + } + } + }, + "SavedQueryProperties": { + "description": "Properties that contain a saved query.", + "required": [ + "query", + "queryType" + ], + "properties": { + "timeModified": { + "type": "string", + "description": "Date and time in UTC of the last modification that was made to this saved query definition.", + "readOnly": true + }, + "modifiedBy": { + "type": "string", + "description": "Unique user id of the specific user that owns this saved query." + }, + "description": { + "type": "string", + "description": "The description of a saved query." + }, + "scope": { + "description": "Scope of saved query.", + "$ref": "#/definitions/Scope" + }, + "query": { + "type": "string", + "description": "KQL query that will be saved." + }, + "queryType": { + "description": "Enum indicating a type saved query.", + "x-ms-client-name": "queryType", + "default": "basic", + "type": "string", + "enum": [ + "basic", + "extended" + ], + "x-ms-enum": { + "name": "QueryType", + "modelAsString": true + } + } + } + }, + "SavedQueryUpdateParameters": { + "properties": { + "kind": { + "type": "string", + "description": "The kind of saved query. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "description": "Metadata describing a saved query for an Azure resource.", + "$ref": "#/definitions/SavedQueryPropertiesUpdateParameters" + } + }, + "description": "The parameters that can be provided when updating workbook properties properties." + }, + "SavedQueryPropertiesUpdateParameters": { + "description": "Properties that contain a workbook for PATCH operation.", + "properties": { + "modifiedBy": { + "type": "string", + "description": "Unique user id of the specific user that owns this saved query." + }, + "description": { + "type": "string", + "description": "The description of a saved query." + }, + "scope": { + "description": "Scope of saved query.", + "$ref": "#/definitions/Scope" + }, + "query": { + "type": "string", + "description": "KQL query that will be saved." + }, + "queryType": { + "description": "Enum indicating a type saved query.", + "x-ms-client-name": "queryType", + "default": "basic", + "type": "string", + "enum": [ + "basic", + "extended" + ], + "x-ms-enum": { + "name": "QueryType", + "modelAsString": true + } + } + } + }, + "ErrorFieldContract": { + "properties": { + "code": { + "type": "string", + "description": "Property level error code." + }, + "message": { + "type": "string", + "description": "Human-readable representation of property-level error." + }, + "target": { + "type": "string", + "description": "Property name." + } + }, + "description": "Error Field contract." + }, + "SavedQueryError": { + "properties": { + "code": { + "type": "string", + "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorFieldContract" + }, + "description": "The list of invalid fields send in request, in case of validation error." + } + }, + "description": "Error message body that will indicate why the operation failed." + }, + "OperationListResult": { + "description": "Result of the request to list Resource Graph operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of Resource Graph operations supported by the Resource Graph resource provider." + } + } + }, + "Operation": { + "description": "Resource Graph REST API operation definition.", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft Resource Graph.", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed etc.", + "type": "string" + }, + "operation": { + "description": "Type of operation: get, read, delete, etc.", + "type": "string" + }, + "description": { + "description": "Description for the operation.", + "type": "string" + } + } + }, + "origin": { + "type": "string", + "description": "The origin of operations." + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "SavedQueryResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Saved Query resource.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file From 81c09b42525f923c74dc9e2092a410059387d516 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 15 Mar 2019 18:52:45 -0700 Subject: [PATCH 26/53] Fixed various validation errors --- .../examples/SavedQueryAdd.json | 23 +++-- .../examples/SavedQueryDelete.json | 4 +- .../examples/SavedQueryGet.json | 8 +- .../examples/SavedQueryList.json | 98 +++++++++---------- .../examples/SavedQueryUpdate.json | 40 ++------ .../2019-03-01-preview/savedquery.json | 55 ++++++----- 6 files changed, 104 insertions(+), 124 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json index da2e4ecbb561..e56cd05b6241 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -3,15 +3,14 @@ "description": "Create new saved query resource.", "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", - "resourceGroupName": "My Resource Group", + "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview", - "savedQueryProperties": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "properties": { "name": "MyDockerVMs", "location": "west us", "kind": "shared", - "tags": null, + "tags": {}, "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", @@ -22,7 +21,7 @@ "f6a1a30a-a540-4465-be3c-d842fa368cef", "b2ce8b12-33b9-4b52-b735-3d04a6389687" ], - "type": "sub" + "scopeType": "sub" }, "modifiedBy": "userId1" } @@ -31,12 +30,12 @@ "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", "name": "MyDockerVMs", "type": "Microsoft.ResourceGraph/savedQueries", "location": "west us", "kind": "shared", - "tags": null, + "tags": {}, "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", @@ -47,7 +46,7 @@ "f6a1a30a-a540-4465-be3c-d842fa368cef", "b2ce8b12-33b9-4b52-b735-3d04a6389687" ], - "type": "sub" + "scopeType": "sub" }, "timeModified": "2019-03-12T13:51:13-07:00", "modifiedBy": "userId1" @@ -56,14 +55,14 @@ }, "201": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", "location": "west us", "kind": "shared", - "tags": null, + "tags": {}, "properties": { "description": "Docker VMs in PROD", - "type": "Microsoft.ResourceGraph/savedQueries", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", "queryType": "basic", "scope": { @@ -72,7 +71,7 @@ "f6a1a30a-a540-4465-be3c-d842fa368cef", "b2ce8b12-33b9-4b52-b735-3d04a6389687" ], - "type": "sub" + "scopeType": "sub" }, "timeModified": "2019-03-12T13:51:13-07:00", "modifiedBy": "userId1" diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json index bb88d998b5e6..3f6e5eb042f4 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json @@ -1,9 +1,9 @@ { "title": "Delete a saved query", - "description": "Delete a saved query resource by subscription id, resource group, and resource name.", + "description": "Delete a saved query resource by subid, resource group, and resource name.", "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", - "resourceGroupName": "My Resource Group", + "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVM", "api-version": "2019-03-01-preview" }, diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json index 8917e2359282..f44056d2ddcd 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json @@ -3,14 +3,14 @@ "description": "Get a saved query resource by subid, resource group, and resource name.", "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", - "resourceGroupName": "My Resource Group", + "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview" }, "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", "name": "MyDockerVMs", "type": "Microsoft.ResourceGraph/savedQueries", "location": "west us", @@ -26,10 +26,10 @@ "f6a1a30a-a540-4465-be3c-d842fa368cef", "b2ce8b12-33b9-4b52-b735-3d04a6389687" ], - "type": "sub" + "scopeType": "sub" }, "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "{userId}" + "modifiedBy": "userId1" } } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json index 0ccabf349498..763aa4e34ed4 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json @@ -3,61 +3,59 @@ "description": "Get a list of saved queries within subscription id and resource group.", "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", - "resourceGroupName": "My Resource Group", + "resourceGroupName": "my-resource-group", "api-version": "2019-03-01-preview" }, "responses": { "200": { - "body": { - "value": [ - { - "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", - "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", - "location": "west us", - "kind": "shared", - "tags": null, - "properties": { - "description": "Docker VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "type": "sub" - }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "{userId}" - } - }, - { - "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/savedQueries/MyTestVMs", - "name": "MyTestVMs", - "type": "Microsoft.ResourceGraph/savedQueries", - "location": "west us", - "kind": "shared", - "tags": null, - "properties": { - "description": "Test VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "type": "sub" - }, - "timeModified": "2019-03-13T13:51:13-07:00", - "modifiedBy": "{userId}" - } + "body": [ + { + "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": {}, + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "scopeType": "sub" + }, + "timeModified": "2019-03-12T13:51:13-07:00", + "modifiedBy": "userId1" } - ] - } + }, + { + "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/savedQueries/MyTestVMs", + "name": "MyTestVMs", + "type": "Microsoft.ResourceGraph/savedQueries", + "location": "west us", + "kind": "shared", + "tags": {}, + "properties": { + "description": "Test VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", + "queryType": "basic", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "scopeType": "sub" + }, + "timeModified": "2019-03-13T13:51:13-07:00", + "modifiedBy": "userId2" + } + } + ] } } } \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json index 6d6982ae8f99..b7d1efa2ae28 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json @@ -3,11 +3,10 @@ "description": "Update the existing saved query resource.", "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", - "resourceGroupName": "My Resource Group", + "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview", - "savedQueryProperties": { - "location": "west us", + "body": { "kind": "shared", "tags": null, "properties": { @@ -19,16 +18,16 @@ "55cfeab8-a07c-4e98-a527-a885fd696771", "f6a1a30a-a540-4465-be3c-d842fa368cef" ], - "type": "sub" + "scopeType": "sub" }, - "modifiedBy": "{userId123}" + "modifiedBy": "userId1" } } }, "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/My Resource Group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", "name": "MyDockerVMs", "type": "Microsoft.ResourceGraph/savedQueries", "location": "west us", @@ -43,35 +42,10 @@ "55cfeab8-a07c-4e98-a527-a885fd696771", "f6a1a30a-a540-4465-be3c-d842fa368cef" ], - "type": "sub" + "scopeType": "sub" }, "timeModified": "2019-03-14T13:51:13-07:00", - "modifiedBy": "{userId123}" - } - } - }, - "201": { - "body": { - "id": " /subscriptions/{sid}/resources/{rid}/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", - "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", - "location": "west us", - "kind": "shared", - "tags": null, - "properties": { - "description": "Docker VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "{sid1}", - "{sid2}", - "{sid3}" - ], - "type": "sub" - }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "{userId}" + "modifiedBy": "userId1" } } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json index ba7ce408360e..878043ee9a47 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -165,7 +165,7 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "savedQueryProperties", + "name": "properties", "description": "Properties that need to be specified to create a new saved query.", "in": "body", "required": true, @@ -217,7 +217,7 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "SavedQueryUpdateParameters", + "name": "body", "description": "Properties that need to be specified to create a new saved query.", "in": "body", "required": true, @@ -359,13 +359,17 @@ } }, "Scope": { + "type": "object", "description": "Contains a list of subscriptions or management groups.", "properties": { "list": { - "type": "string", + "type": "array", + "items": { + "type": "string" + }, "description": "The list of subscriptions or management groups." }, - "type": { + "scopeType": { "description": "Enum indicating a type of a list. it is 'sub' for subscriptions or 'mg' for management group", "x-ms-client-name": "type", "default": "sub", @@ -375,7 +379,7 @@ "mg" ], "x-ms-enum": { - "name": "type", + "name": "ScopeType", "modelAsString": true } } @@ -411,7 +415,6 @@ }, "queryType": { "description": "Enum indicating a type saved query.", - "x-ms-client-name": "queryType", "default": "basic", "type": "string", "enum": [ @@ -428,26 +431,33 @@ "SavedQueryUpdateParameters": { "properties": { "kind": { - "type": "string", - "description": "The kind of saved query. Choices are user and shared.", - "enum": [ - "user", - "shared" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } + "type": "string", + "description": "The kind of saved query. Choices are user and shared.", + "enum": [ + "user", + "shared" + ], + "x-ms-enum": { + "name": "SharedTypeKind", + "modelAsString": true + } + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" }, "properties": { - "x-ms-client-flatten": true, - "description": "Metadata describing a saved query for an Azure resource.", - "$ref": "#/definitions/SavedQueryPropertiesUpdateParameters" + "x-ms-client-flatten": true, + "description": "Metadata describing a saved query for an Azure resource.", + "$ref": "#/definitions/SavedQueryPropertiesUpdateParameters" } + }, + "description": "The parameters that can be provided when updating workbook properties properties." }, - "description": "The parameters that can be provided when updating workbook properties properties." - }, - "SavedQueryPropertiesUpdateParameters": { + "SavedQueryPropertiesUpdateParameters": { "description": "Properties that contain a workbook for PATCH operation.", "properties": { "modifiedBy": { @@ -468,7 +478,6 @@ }, "queryType": { "description": "Enum indicating a type saved query.", - "x-ms-client-name": "queryType", "default": "basic", "type": "string", "enum": [ From 70ea7d1079d90f8b2dabb846d7b691d463a363ff Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 20 Mar 2019 17:46:04 -0700 Subject: [PATCH 27/53] Updated ARG/resources to add a saved query support along with examples --- .../examples/ResourcesSavedQueryWithMG.json | 78 ++++++++++++++++++ .../examples/ResourcesSavedQueryWithSub.json | 81 +++++++++++++++++++ .../2018-09-01-preview/resourcegraph.json | 50 +++++++++++- .../examples/SavedQueryAdd.json | 37 ++------- .../examples/SavedQueryGet.json | 9 +-- .../examples/SavedQueryList.json | 18 ++--- .../examples/SavedQueryUpdate.json | 10 +-- .../2019-03-01-preview/savedquery.json | 36 +-------- 8 files changed, 231 insertions(+), 88 deletions(-) create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json create mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json new file mode 100644 index 000000000000..0711fb90c094 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json @@ -0,0 +1,78 @@ +{ + "title": "Basic Query", + "description": "A simple resources query.", + "parameters": { + "api-version": "2019-03-01-preview", + "query": { + "savedQuery": { + "savedQueryId": "/subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "scope": { + "list": [ + "mg1", + "mg2", + "mg3" + ], + "scopeType": "mg" + } + } + } + }, + "responses": { + "200": { + "body": { + "totalRecords": 3, + "count": 3, + "resultTruncated": "false", + "data": { + "columns": [ + { + "name": "id", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "location", + "type": "string" + }, + { + "name": "tags", + "type": "object" + } + ], + "rows": [ + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", + "myNetworkInterface", + "microsoft.network/networkinterfaces", + "centralus", + { + "tag1": "Value1" + } + ], + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/virtualNetworks/myVnet", + "myVnet", + "microsoft.network/virtualnetworks", + "westus", + {} + ], + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/publicIPAddresses/myPublicIp", + "myPublicIp", + "microsoft.network/publicipaddresses", + "westus", + {} + ] + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json new file mode 100644 index 000000000000..2b015d937f98 --- /dev/null +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json @@ -0,0 +1,81 @@ +{ + "title": "Basic Query", + "description": "A simple resources query.", + "parameters": { + "api-version": "2018-09-01-preview", + "query": { + "subscriptions": [ + "cfbbd179-59d2-4052-aa06-9270a38aa9d6" + ], + "savedQuery": { + "savedQueryId": "/subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "scope": { + "list": [ + "55cfeab8-a07c-4e98-a527-a885fd696771", + "f6a1a30a-a540-4465-be3c-d842fa368cef", + "b2ce8b12-33b9-4b52-b735-3d04a6389687" + ], + "scopeType": "sub" + } + } + } + }, + "responses": { + "200": { + "body": { + "totalRecords": 3, + "count": 3, + "resultTruncated": "false", + "data": { + "columns": [ + { + "name": "id", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "location", + "type": "string" + }, + { + "name": "tags", + "type": "object" + } + ], + "rows": [ + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", + "myNetworkInterface", + "microsoft.network/networkinterfaces", + "centralus", + { + "tag1": "Value1" + } + ], + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/virtualNetworks/myVnet", + "myVnet", + "microsoft.network/virtualnetworks", + "westus", + {} + ], + [ + "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/publicIPAddresses/myPublicIp", + "myPublicIp", + "microsoft.network/publicipaddresses", + "westus", + {} + ] + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index 14f879b17922..ea3a20ca5c91 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -84,7 +84,9 @@ "Query options": { "$ref": "./examples/ResourcesQueryOptions.json" }, "First page query": { "$ref": "./examples/ResourcesFirstPageQuery.json" }, "Next page query": { "$ref": "./examples/ResourcesNextPageQuery.json" }, - "Random page query": { "$ref": "./examples/ResourcesRandomPageQuery.json" } + "Random page query": { "$ref": "./examples/ResourcesRandomPageQuery.json" }, + "Saved query with subscriptions": {"$ref": "./examples/ResourcesSavedQueryWithMG.json"}, + "Saved query with management groups": {"$ref": "./examples/ResourcesSavedQueryWithSub.json"} } } }, @@ -144,6 +146,13 @@ "items": { "$ref": "#/definitions/FacetRequest" } + }, + "savedQuery": { + "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", + "type": "object", + "items": { + "$ref": "#/definitions/SavedQuery" + } } }, "required": [ @@ -389,6 +398,43 @@ } ] }, + "SavedQuery": { + "type":"object", + "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", + "properties": { + "savedQueryId": { + "description": "The saved query id that will be used to fetch the content of query.", + "type": "string" + }, + "scope": { + "type": "object", + "description": "Contains a list of subscriptions or management groups.", + "properties": { + "list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of subscriptions or management groups." + }, + "scopeType": { + "description": "Enum indicating a type of a list. it is 'sub' for subscriptions or 'mg' for management group", + "x-ms-client-name": "type", + "default": "sub", + "type": "string", + "enum": [ + "sub", + "mg" + ], + "x-ms-enum": { + "name": "ScopeType", + "modelAsString": true + } + } + } + } + } + }, "FacetError" : { "x-ms-discriminator-value": "FacetError", "description": "A facet whose execution resulted in an error.", @@ -528,4 +574,4 @@ "description": "API version." } } -} +} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json index e56cd05b6241..e7602f6c91e5 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -9,7 +9,6 @@ "properties": { "name": "MyDockerVMs", "location": "west us", - "kind": "shared", "tags": {}, "properties": { "description": "Docker VMs in PROD", @@ -23,18 +22,17 @@ ], "scopeType": "sub" }, - "modifiedBy": "userId1" + "lastModifiedBy": "userId1" } } }, "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", + "type": "Microsoft.ResourceGraph/queries", "location": "west us", - "kind": "shared", "tags": {}, "properties": { "description": "Docker VMs in PROD", @@ -48,33 +46,8 @@ ], "scopeType": "sub" }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "userId1" - } - } - }, - "201": { - "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", - "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", - "location": "west us", - "kind": "shared", - "tags": {}, - "properties": { - "description": "Docker VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "userId1" + "lastModifiedBy": "userId1", + "timeModified": "2019-03-12T13:51:13-07:00" } } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json index f44056d2ddcd..f04d61d92edd 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json @@ -10,11 +10,10 @@ "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", + "type": "Microsoft.ResourceGraph/queries", "location": "west us", - "kind": "shared", "tags": null, "properties": { "description": "Docker VMs in PROD", @@ -28,8 +27,8 @@ ], "scopeType": "sub" }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "userId1" + "lastModifiedBy": "userId1", + "timeModified": "2019-03-12T13:51:13-07:00" } } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json index 763aa4e34ed4..ae0bf96cc18a 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json @@ -10,11 +10,10 @@ "200": { "body": [ { - "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", + "type": "Microsoft.ResourceGraph/queries", "location": "west us", - "kind": "shared", "tags": {}, "properties": { "description": "Docker VMs in PROD", @@ -28,16 +27,15 @@ ], "scopeType": "sub" }, - "timeModified": "2019-03-12T13:51:13-07:00", - "modifiedBy": "userId1" + "lastModifiedBy": "userId1", + "timeModified": "2019-03-12T13:51:13-07:00" } }, { - "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/savedQueries/MyTestVMs", + "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/queries/MyTestVMs", "name": "MyTestVMs", - "type": "Microsoft.ResourceGraph/savedQueries", + "type": "Microsoft.ResourceGraph/queries", "location": "west us", - "kind": "shared", "tags": {}, "properties": { "description": "Test VMs in PROD", @@ -51,8 +49,8 @@ ], "scopeType": "sub" }, - "timeModified": "2019-03-13T13:51:13-07:00", - "modifiedBy": "userId2" + "lastModifiedBy": "userId2", + "timeModified": "2019-03-13T13:51:13-07:00" } } ] diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json index b7d1efa2ae28..31835e3473cf 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json @@ -7,7 +7,6 @@ "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview", "body": { - "kind": "shared", "tags": null, "properties": { "description": "Modified description", @@ -27,11 +26,10 @@ "responses": { "200": { "body": { - "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", + "id": " /subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/savedQueries", + "type": "Microsoft.ResourceGraph/queries", "location": "west us", - "kind": "shared", "tags": null, "properties": { "description": "Modified description", @@ -44,8 +42,8 @@ ], "scopeType": "sub" }, - "timeModified": "2019-03-14T13:51:13-07:00", - "modifiedBy": "userId1" + "lastModifiedBy": "userId1", + "timeModified": "2019-03-14T13:51:13-07:00" } } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json index 878043ee9a47..f708ea3a652c 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/savedQuery": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries": { "get": { "description": "Get all saved query defined within a specified subscription and resource group.", "operationId": "SavedQuery_List", @@ -73,7 +73,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/savedQuery/{resourceName}": { + "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}": { "get": { "description": "Get a single saved query by its resourceName.", "operationId": "SavedQuery_Get", @@ -181,12 +181,6 @@ "$ref": "#/definitions/SavedQueryResource" } }, - "201": { - "description": "The newly created saved query.", - "schema": { - "$ref": "#/definitions/SavedQueryResource" - } - }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -296,18 +290,6 @@ "readOnly": true, "description": "Azure resource type" }, - "kind": { - "type": "string", - "description": "The kind of workbook. Choices are user and shared.", - "enum": [ - "user", - "shared" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, "location": { "type": "string", "description": "Resource location", @@ -397,7 +379,7 @@ "description": "Date and time in UTC of the last modification that was made to this saved query definition.", "readOnly": true }, - "modifiedBy": { + "lastModifiedBy": { "type": "string", "description": "Unique user id of the specific user that owns this saved query." }, @@ -430,18 +412,6 @@ }, "SavedQueryUpdateParameters": { "properties": { - "kind": { - "type": "string", - "description": "The kind of saved query. Choices are user and shared.", - "enum": [ - "user", - "shared" - ], - "x-ms-enum": { - "name": "SharedTypeKind", - "modelAsString": true - } - }, "tags": { "type": "object", "additionalProperties": { From 1c559d964e889bc77b15fc4a749e24db29fd5fda Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 21 Mar 2019 11:23:08 -0700 Subject: [PATCH 28/53] Updated ARM/resources based on the feedback --- .../examples/ResourcesSavedQueryWithMG.json | 78 ------------------- .../examples/ResourcesSavedQueryWithSub.json | 4 +- .../2018-09-01-preview/resourcegraph.json | 18 ++--- 3 files changed, 11 insertions(+), 89 deletions(-) delete mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json deleted file mode 100644 index 0711fb90c094..000000000000 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithMG.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "title": "Basic Query", - "description": "A simple resources query.", - "parameters": { - "api-version": "2019-03-01-preview", - "query": { - "savedQuery": { - "savedQueryId": "/subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", - "scope": { - "list": [ - "mg1", - "mg2", - "mg3" - ], - "scopeType": "mg" - } - } - } - }, - "responses": { - "200": { - "body": { - "totalRecords": 3, - "count": 3, - "resultTruncated": "false", - "data": { - "columns": [ - { - "name": "id", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "type", - "type": "string" - }, - { - "name": "location", - "type": "string" - }, - { - "name": "tags", - "type": "object" - } - ], - "rows": [ - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", - "myNetworkInterface", - "microsoft.network/networkinterfaces", - "centralus", - { - "tag1": "Value1" - } - ], - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/virtualNetworks/myVnet", - "myVnet", - "microsoft.network/virtualnetworks", - "westus", - {} - ], - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/publicIPAddresses/myPublicIp", - "myPublicIp", - "microsoft.network/publicipaddresses", - "westus", - {} - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json index 2b015d937f98..5d114ac87c46 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json @@ -6,7 +6,9 @@ "query": { "subscriptions": [ "cfbbd179-59d2-4052-aa06-9270a38aa9d6" - ], + ] + }, + "option": { "savedQuery": { "savedQueryId": "/subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", "scope": { diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index ea3a20ca5c91..ce3808b82f75 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -85,7 +85,6 @@ "First page query": { "$ref": "./examples/ResourcesFirstPageQuery.json" }, "Next page query": { "$ref": "./examples/ResourcesNextPageQuery.json" }, "Random page query": { "$ref": "./examples/ResourcesRandomPageQuery.json" }, - "Saved query with subscriptions": {"$ref": "./examples/ResourcesSavedQueryWithMG.json"}, "Saved query with management groups": {"$ref": "./examples/ResourcesSavedQueryWithSub.json"} } } @@ -146,13 +145,6 @@ "items": { "$ref": "#/definitions/FacetRequest" } - }, - "savedQuery": { - "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", - "type": "object", - "items": { - "$ref": "#/definitions/SavedQuery" - } } }, "required": [ @@ -179,6 +171,13 @@ "type": "integer", "format": "int32", "minimum": 0 + }, + "savedQuery": { + "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", + "type": "object", + "items": { + "$ref": "#/definitions/SavedQuery" + } } } }, @@ -423,8 +422,7 @@ "default": "sub", "type": "string", "enum": [ - "sub", - "mg" + "sub" ], "x-ms-enum": { "name": "ScopeType", From 46f9eedeb7bd818f43d8a9a26c054750367eed84 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 26 Mar 2019 10:17:36 -0700 Subject: [PATCH 29/53] Prepared for Swagger submittion --- .../examples/ResourcesSavedQueryWithSub.json | 83 ------------------- .../2018-09-01-preview/resourcegraph.json | 46 +--------- .../examples/SavedQueryAdd.json | 23 +---- .../examples/SavedQueryGet.json | 11 +-- .../examples/SavedQueryList.json | 22 +---- .../examples/SavedQueryUpdate.json | 21 +---- .../2019-03-01-preview/savedquery.json | 59 ++----------- 7 files changed, 16 insertions(+), 249 deletions(-) delete mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json deleted file mode 100644 index 5d114ac87c46..000000000000 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourcesSavedQueryWithSub.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "title": "Basic Query", - "description": "A simple resources query.", - "parameters": { - "api-version": "2018-09-01-preview", - "query": { - "subscriptions": [ - "cfbbd179-59d2-4052-aa06-9270a38aa9d6" - ] - }, - "option": { - "savedQuery": { - "savedQueryId": "/subscriptions/024e2271-06fa-46b6-9079-f1ed3c7b070e/resources/my-resource-group/providers/Microsoft.ResourceGraph/savedQueries/MyDockerVMs", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - } - } - } - }, - "responses": { - "200": { - "body": { - "totalRecords": 3, - "count": 3, - "resultTruncated": "false", - "data": { - "columns": [ - { - "name": "id", - "type": "string" - }, - { - "name": "name", - "type": "string" - }, - { - "name": "type", - "type": "string" - }, - { - "name": "location", - "type": "string" - }, - { - "name": "tags", - "type": "object" - } - ], - "rows": [ - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG1/providers/Microsoft.Network/networkInterfaces/myNetworkInterface", - "myNetworkInterface", - "microsoft.network/networkinterfaces", - "centralus", - { - "tag1": "Value1" - } - ], - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/virtualNetworks/myVnet", - "myVnet", - "microsoft.network/virtualnetworks", - "westus", - {} - ], - [ - "/subscriptions/cfbbd179-59d2-4052-aa06-9270a38aa9d6/resourceGroups/RG2/providers/Microsoft.Network/publicIPAddresses/myPublicIp", - "myPublicIp", - "microsoft.network/publicipaddresses", - "westus", - {} - ] - ] - } - } - } - } -} \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index ce3808b82f75..4c0a11149ead 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -84,8 +84,7 @@ "Query options": { "$ref": "./examples/ResourcesQueryOptions.json" }, "First page query": { "$ref": "./examples/ResourcesFirstPageQuery.json" }, "Next page query": { "$ref": "./examples/ResourcesNextPageQuery.json" }, - "Random page query": { "$ref": "./examples/ResourcesRandomPageQuery.json" }, - "Saved query with management groups": {"$ref": "./examples/ResourcesSavedQueryWithSub.json"} + "Random page query": { "$ref": "./examples/ResourcesRandomPageQuery.json" } } } }, @@ -171,13 +170,6 @@ "type": "integer", "format": "int32", "minimum": 0 - }, - "savedQuery": { - "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", - "type": "object", - "items": { - "$ref": "#/definitions/SavedQuery" - } } } }, @@ -397,42 +389,6 @@ } ] }, - "SavedQuery": { - "type":"object", - "description": "Optional. When it is presented, it will be used to get a saved query by id and execute the query to fetch data", - "properties": { - "savedQueryId": { - "description": "The saved query id that will be used to fetch the content of query.", - "type": "string" - }, - "scope": { - "type": "object", - "description": "Contains a list of subscriptions or management groups.", - "properties": { - "list": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The list of subscriptions or management groups." - }, - "scopeType": { - "description": "Enum indicating a type of a list. it is 'sub' for subscriptions or 'mg' for management group", - "x-ms-client-name": "type", - "default": "sub", - "type": "string", - "enum": [ - "sub" - ], - "x-ms-enum": { - "name": "ScopeType", - "modelAsString": true - } - } - } - } - } - }, "FacetError" : { "x-ms-discriminator-value": "FacetError", "description": "A facet whose execution resulted in an error.", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json index e7602f6c91e5..4a1a6f9aa370 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -12,17 +12,7 @@ "tags": {}, "properties": { "description": "Docker VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId1" + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'" } } }, @@ -37,16 +27,7 @@ "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId1", + "resultKind": "basic", "timeModified": "2019-03-12T13:51:13-07:00" } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json index f04d61d92edd..bccb1551a910 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json @@ -18,16 +18,7 @@ "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId1", + "resultKind": "basic", "timeModified": "2019-03-12T13:51:13-07:00" } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json index ae0bf96cc18a..a2fd4f41fa0a 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json @@ -18,16 +18,7 @@ "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId1", + "resultKind": "basic", "timeModified": "2019-03-12T13:51:13-07:00" } }, @@ -40,16 +31,7 @@ "properties": { "description": "Test VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef", - "b2ce8b12-33b9-4b52-b735-3d04a6389687" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId2", + "resultKind": "basic", "timeModified": "2019-03-13T13:51:13-07:00" } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json index 31835e3473cf..e1b24a672eff 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json @@ -10,16 +10,7 @@ "tags": null, "properties": { "description": "Modified description", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef" - ], - "scopeType": "sub" - }, - "modifiedBy": "userId1" + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'" } } }, @@ -34,15 +25,7 @@ "properties": { "description": "Modified description", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "queryType": "basic", - "scope": { - "list": [ - "55cfeab8-a07c-4e98-a527-a885fd696771", - "f6a1a30a-a540-4465-be3c-d842fa368cef" - ], - "scopeType": "sub" - }, - "lastModifiedBy": "userId1", + "resultKind": "basic", "timeModified": "2019-03-14T13:51:13-07:00" } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json index f708ea3a652c..41dc30f00e5c 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -340,38 +340,10 @@ } } }, - "Scope": { - "type": "object", - "description": "Contains a list of subscriptions or management groups.", - "properties": { - "list": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The list of subscriptions or management groups." - }, - "scopeType": { - "description": "Enum indicating a type of a list. it is 'sub' for subscriptions or 'mg' for management group", - "x-ms-client-name": "type", - "default": "sub", - "type": "string", - "enum": [ - "sub", - "mg" - ], - "x-ms-enum": { - "name": "ScopeType", - "modelAsString": true - } - } - } - }, "SavedQueryProperties": { "description": "Properties that contain a saved query.", "required": [ - "query", - "queryType" + "query" ], "properties": { "timeModified": { @@ -379,24 +351,17 @@ "description": "Date and time in UTC of the last modification that was made to this saved query definition.", "readOnly": true }, - "lastModifiedBy": { - "type": "string", - "description": "Unique user id of the specific user that owns this saved query." - }, "description": { "type": "string", "description": "The description of a saved query." }, - "scope": { - "description": "Scope of saved query.", - "$ref": "#/definitions/Scope" - }, "query": { "type": "string", "description": "KQL query that will be saved." }, - "queryType": { - "description": "Enum indicating a type saved query.", + "resultKind": { + "description": "Enum indicating a type of saved query.", + "readOnly": true, "default": "basic", "type": "string", "enum": [ @@ -404,7 +369,7 @@ "extended" ], "x-ms-enum": { - "name": "QueryType", + "name": "ResultKind", "modelAsString": true } } @@ -430,24 +395,16 @@ "SavedQueryPropertiesUpdateParameters": { "description": "Properties that contain a workbook for PATCH operation.", "properties": { - "modifiedBy": { - "type": "string", - "description": "Unique user id of the specific user that owns this saved query." - }, "description": { "type": "string", "description": "The description of a saved query." }, - "scope": { - "description": "Scope of saved query.", - "$ref": "#/definitions/Scope" - }, "query": { "type": "string", "description": "KQL query that will be saved." }, - "queryType": { - "description": "Enum indicating a type saved query.", + "resultKind": { + "description": "Enum indicating a type of saved query.", "default": "basic", "type": "string", "enum": [ @@ -455,7 +412,7 @@ "extended" ], "x-ms-enum": { - "name": "QueryType", + "name": "ResultKind", "modelAsString": true } } From 499cdf5e16ddfb7edac13cbc6ffe95927c98a24d Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 26 Mar 2019 11:00:47 -0700 Subject: [PATCH 30/53] Added saved query entry in readme.md --- specification/resourcegraph/resource-manager/readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/resourcegraph/resource-manager/readme.md b/specification/resourcegraph/resource-manager/readme.md index 583bec8477de..24e532be7eef 100644 --- a/specification/resourcegraph/resource-manager/readme.md +++ b/specification/resourcegraph/resource-manager/readme.md @@ -49,6 +49,15 @@ input-file: - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json ``` +### Tag: package-2019-03-preview + +These settings apply only when `--tag=package-2019-03-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2019-03-preview' +input-file: +- Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +``` + # Code Generation From 87aed5b6870ae4780a87a021dcc8017d9d70ec16 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 12 Apr 2019 12:16:42 -0700 Subject: [PATCH 31/53] Changed HTTP status code of 201 to 200 for DELETE --- .../preview/2019-03-01-preview/examples/SavedQueryDelete.json | 2 +- .../preview/2019-03-01-preview/savedquery.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json index 3f6e5eb042f4..14deadf5023e 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json @@ -8,7 +8,7 @@ "api-version": "2019-03-01-preview" }, "responses": { - "201": {}, + "200": {}, "204": {} } } \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json index 41dc30f00e5c..e1753f51cf03 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -129,7 +129,7 @@ } ], "responses": { - "201": { + "200": { "description": "The saved query has been successfully deleted." }, "204": { From 84fed1d15b1ae766459c6bc63377e7d9192f2b8c Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 12 Apr 2019 12:25:00 -0700 Subject: [PATCH 32/53] Removed a name from payload since it is already specified in url --- .../preview/2019-03-01-preview/examples/SavedQueryAdd.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json index 4a1a6f9aa370..9a9601a54347 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -7,7 +7,6 @@ "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview", "properties": { - "name": "MyDockerVMs", "location": "west us", "tags": {}, "properties": { From bebd7e449a29e0702dbd14b43a332dbd85bf834c Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 09:48:28 -0700 Subject: [PATCH 33/53] Removed location since it is a global resource and added eTag --- .../examples/SavedQueryAdd.json | 3 +-- .../examples/SavedQueryGet.json | 2 +- .../examples/SavedQueryList.json | 4 ++-- .../examples/SavedQueryUpdate.json | 3 ++- .../preview/2019-03-01-preview/savedquery.json | 17 ++++++++--------- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json index 9a9601a54347..18b204ece5e6 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json @@ -7,7 +7,6 @@ "resourceName": "MyDockerVMs", "api-version": "2019-03-01-preview", "properties": { - "location": "west us", "tags": {}, "properties": { "description": "Docker VMs in PROD", @@ -21,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", - "location": "west us", + "eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa", "tags": {}, "properties": { "description": "Docker VMs in PROD", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json index bccb1551a910..3b2bcfdc93a7 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json @@ -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", - "location": "west us", + "eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa", "tags": null, "properties": { "description": "Docker VMs in PROD", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json index a2fd4f41fa0a..0285cdc1bdb0 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json @@ -13,8 +13,8 @@ "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", "name": "MyDockerVMs", "type": "Microsoft.ResourceGraph/queries", - "location": "west us", "tags": {}, + "eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa", "properties": { "description": "Docker VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", @@ -26,8 +26,8 @@ "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/queries/MyTestVMs", "name": "MyTestVMs", "type": "Microsoft.ResourceGraph/queries", - "location": "west us", "tags": {}, + "eTag": "b0809832-ca62-4133-8f13-0c46580f9db1", "properties": { "description": "Test VMs in PROD", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json index e1b24a672eff..0effc2f50d7f 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json @@ -8,6 +8,7 @@ "api-version": "2019-03-01-preview", "body": { "tags": null, + "eTag": "b0809832-ca62-4133-8f13-0c46580f9db1", "properties": { "description": "Modified description", "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'" @@ -20,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", - "location": "west us", + "eTag": "73811091-6188-4523-97b7-b5e7134e7fd9", "tags": null, "properties": { "description": "Modified description", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json index e1753f51cf03..66145f9c74e7 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json @@ -290,13 +290,10 @@ "readOnly": true, "description": "Azure resource type" }, - "location": { + "eTag": { "type": "string", - "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] + "readOnly": true, + "description": "This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict." }, "tags": { "type": "object", @@ -306,9 +303,6 @@ "description": "Resource tags" } }, - "required": [ - "location" - ], "x-ms-azure-resource": true, "description": "An azure resource object" }, @@ -384,6 +378,11 @@ }, "description": "Resource tags" }, + "eTag": { + "type": "string", + "readOnly": true, + "description": "This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict." + }, "properties": { "x-ms-client-flatten": true, "description": "Metadata describing a saved query for an Azure resource.", From b66223393414a755602f6a66fc653e2baf4eb7c8 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 13:28:46 -0700 Subject: [PATCH 34/53] Moved savedquery.json along with all examples into 2018-09-01-preview folder --- .../examples/OperationsList.json | 9 ++++++++ .../examples/SavedQueryAdd.json | 0 .../examples/SavedQueryDelete.json | 0 .../examples/SavedQueryGet.json | 2 +- .../examples/SavedQueryList.json | 2 +- .../examples/SavedQueryUpdate.json | 2 +- .../savedquery.json | 0 .../examples/OperationsList.json | 22 ------------------- 8 files changed, 12 insertions(+), 25 deletions(-) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/examples/SavedQueryAdd.json (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/examples/SavedQueryDelete.json (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/examples/SavedQueryGet.json (95%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/examples/SavedQueryList.json (97%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/examples/SavedQueryUpdate.json (96%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/{2019-03-01-preview => 2018-09-01-preview}/savedquery.json (100%) delete mode 100644 specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json index 8e2165b092e8..3866c1b076de 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json @@ -14,6 +14,15 @@ "operation": "Query resources", "description": "Submits a query on resources within specified subscriptions" } + }, + { + "name": "Microsoft.ResourceGraph/queries/action", + "display": { + "provider": "Microsoft Resource Graph", + "resource": "Saved Query", + "operation": "Query savedQuery", + "description": "Submits a query on resources within specified subscription and resource group." + } } ] } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryAdd.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryDelete.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryGet.json similarity index 95% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryGet.json index 3b2bcfdc93a7..c9fc0f4bb736 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryGet.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryGet.json @@ -5,7 +5,7 @@ "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", - "api-version": "2019-03-01-preview" + "api-version": "2018-09-01-preview" }, "responses": { "200": { diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryList.json similarity index 97% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryList.json index 0285cdc1bdb0..490f6dfc4de9 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryList.json @@ -4,7 +4,7 @@ "parameters": { "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", "resourceGroupName": "my-resource-group", - "api-version": "2019-03-01-preview" + "api-version": "2018-09-01-preview" }, "responses": { "200": { diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryUpdate.json similarity index 96% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryUpdate.json index 0effc2f50d7f..c7a0b88d640f 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/SavedQueryUpdate.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryUpdate.json @@ -5,7 +5,7 @@ "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", - "api-version": "2019-03-01-preview", + "api-version": "2018-09-01-preview", "body": { "tags": null, "eTag": "b0809832-ca62-4133-8f13-0c46580f9db1", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json deleted file mode 100644 index 7c518f331172..000000000000 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2019-03-01-preview/examples/OperationsList.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parameters": { - "api-version": "2019-03-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.ResourceGraph/savedQuery/action", - "display": { - "provider": "Microsoft Resource Graph", - "resource": "SavedQuery", - "operation": "Query savedQuery", - "description": "Submits a query on resources within specified subscription and resource group." - } - } - ] - } - } - } -} \ No newline at end of file From fbcceb7c1d4e9b30c6707159c9eed290e8f0a58c Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 13:33:44 -0700 Subject: [PATCH 35/53] Update saved query metadata in OperationsList.json --- .../preview/2018-09-01-preview/examples/OperationsList.json | 6 +++--- .../2018-09-01-preview/examples/SavedQueryDelete.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json index 3866c1b076de..5de758617d50 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json @@ -19,9 +19,9 @@ "name": "Microsoft.ResourceGraph/queries/action", "display": { "provider": "Microsoft Resource Graph", - "resource": "Saved Query", - "operation": "Query savedQuery", - "description": "Submits a query on resources within specified subscription and resource group." + "resource": "Queries", + "operation": "CRUD operations of saved queries", + "description": "Create/Update/Retrieve a query within specified subscription and resource group." } } ] diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json index 14deadf5023e..1288229841cf 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json @@ -5,7 +5,7 @@ "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVM", - "api-version": "2019-03-01-preview" + "api-version": "2018-09-01-preview" }, "responses": { "200": {}, From 0c3fd3127f17feedaf12b9f011fb2be8e21b7a86 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 13:35:43 -0700 Subject: [PATCH 36/53] Updated readme.md file to address a version --- .../2018-09-01-preview/examples/OperationsList.json | 2 +- specification/resourcegraph/resource-manager/readme.md | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json index 5de758617d50..5c2c58c0898c 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json @@ -21,7 +21,7 @@ "provider": "Microsoft Resource Graph", "resource": "Queries", "operation": "CRUD operations of saved queries", - "description": "Create/Update/Retrieve a query within specified subscription and resource group." + "description": "Create/Update/Retrieve a query within specified subscription and resource group." } } ] diff --git a/specification/resourcegraph/resource-manager/readme.md b/specification/resourcegraph/resource-manager/readme.md index 2751750ed136..d24889123364 100644 --- a/specification/resourcegraph/resource-manager/readme.md +++ b/specification/resourcegraph/resource-manager/readme.md @@ -50,6 +50,7 @@ These settings apply only when `--tag=package-2019-04` is specified on the comma input-file: - Microsoft.ResourceGraph/stable/2019-04-01/resourcegraph.json ``` + ### Tag: package-2018-09-preview These settings apply only when `--tag=package-2018-09-preview` is specified on the command line. @@ -57,14 +58,6 @@ These settings apply only when `--tag=package-2018-09-preview` is specified on t ``` yaml $(tag) == 'package-2018-09-preview' input-file: - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json -``` - -### Tag: package-2019-03-preview - -These settings apply only when `--tag=package-2019-03-preview` is specified on the command line. - -``` yaml $(tag) == 'package-2019-03-preview' -input-file: - Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json ``` From bcb4dfe4f084ff79726f19e2ab2d871d94a358be Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 13:46:58 -0700 Subject: [PATCH 37/53] Fixed a version for saved query --- .../preview/2018-09-01-preview/examples/SavedQueryAdd.json | 2 +- .../preview/2018-09-01-preview/savedquery.json | 2 +- specification/resourcegraph/resource-manager/readme.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json index 18b204ece5e6..2f61c242e3ae 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json @@ -5,7 +5,7 @@ "subscriptionId": "024e2271-06fa-46b6-9079-f1ed3c7b070e", "resourceGroupName": "my-resource-group", "resourceName": "MyDockerVMs", - "api-version": "2019-03-01-preview", + "api-version": "2018-09-01-preview", "properties": { "tags": {}, "properties": { diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json index 66145f9c74e7..5c541631fe1a 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Resource Graph Saved Query", "description": "Azure Resource Graph Saved Query API Reference", - "version": "2019-03-01-preview" + "version": "2018-09-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/resourcegraph/resource-manager/readme.md b/specification/resourcegraph/resource-manager/readme.md index d24889123364..632aaa279bbc 100644 --- a/specification/resourcegraph/resource-manager/readme.md +++ b/specification/resourcegraph/resource-manager/readme.md @@ -58,7 +58,7 @@ These settings apply only when `--tag=package-2018-09-preview` is specified on t ``` yaml $(tag) == 'package-2018-09-preview' input-file: - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json -- Microsoft.ResourceGraph/preview/2019-03-01-preview/savedquery.json +- Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json ``` # Code Generation From be69a86c7b65d3a96e3b0287864691352aa8d800 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Tue, 16 Apr 2019 13:50:57 -0700 Subject: [PATCH 38/53] Fixed indentation of -input-file in readme --- specification/resourcegraph/resource-manager/readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/resourcegraph/resource-manager/readme.md b/specification/resourcegraph/resource-manager/readme.md index 632aaa279bbc..cd287d07da2a 100644 --- a/specification/resourcegraph/resource-manager/readme.md +++ b/specification/resourcegraph/resource-manager/readme.md @@ -41,7 +41,6 @@ model-validator: true message-format: json ``` - ### Tag: package-2019-04 These settings apply only when `--tag=package-2019-04` is specified on the command line. @@ -57,8 +56,8 @@ These settings apply only when `--tag=package-2018-09-preview` is specified on t ``` yaml $(tag) == 'package-2018-09-preview' input-file: -- Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json -- Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json + - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json + - Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json ``` # Code Generation From 3cf2ff9b5a67e0523efeb6da9271b7ae0ff2fafb Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 17 Apr 2019 14:19:16 -0700 Subject: [PATCH 39/53] Renamed Saved => Graph --- ...{SavedQueryAdd.json => GraphQueryAdd.json} | 0 ...QueryDelete.json => GraphQueryDelete.json} | 0 ...{SavedQueryGet.json => GraphQueryGet.json} | 0 ...avedQueryList.json => GraphQueryList.json} | 0 ...QueryUpdate.json => GraphQueryUpdate.json} | 0 .../{savedquery.json => graphquery.json} | 136 +++++++++--------- .../resourcegraph/resource-manager/readme.md | 2 +- 7 files changed, 69 insertions(+), 69 deletions(-) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/{SavedQueryAdd.json => GraphQueryAdd.json} (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/{SavedQueryDelete.json => GraphQueryDelete.json} (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/{SavedQueryGet.json => GraphQueryGet.json} (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/{SavedQueryList.json => GraphQueryList.json} (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/{SavedQueryUpdate.json => GraphQueryUpdate.json} (100%) rename specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/{savedquery.json => graphquery.json} (77%) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryAdd.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryAdd.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryAdd.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryDelete.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryDelete.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryDelete.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryGet.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryGet.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryGet.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryGet.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryList.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryUpdate.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryUpdate.json similarity index 100% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/SavedQueryUpdate.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryUpdate.json diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json similarity index 77% rename from specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json rename to specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 5c541631fe1a..d5171256b6b6 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "title": "Azure Resource Graph Saved Query", - "description": "Azure Resource Graph Saved Query API Reference", + "title": "Azure Resource Graph Query", + "description": "Azure Resource Graph Query API Reference", "version": "2018-09-01-preview" }, "host": "management.azure.com", @@ -36,8 +36,8 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries": { "get": { - "description": "Get all saved query defined within a specified subscription and resource group.", - "operationId": "SavedQuery_List", + "description": "Get all graph queries defined within a specified subscription and resource group.", + "operationId": "GraphQuery_List", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -51,15 +51,15 @@ ], "responses": { "200": { - "description": "A list containing 0 or more saved queries.", + "description": "A list containing 0 or more graph queries.", "schema": { - "$ref": "#/definitions/SavedQueryListResult" + "$ref": "#/definitions/GraphQueryListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/SavedQueryError" + "$ref": "#/definitions/GraphQueryError" } } }, @@ -67,16 +67,16 @@ "nextLinkName": null }, "x-ms-examples": { - "Get a list of Saved Queries": { - "$ref": "./examples/SavedQueryList.json" + "Get a list of Graph Queries": { + "$ref": "./examples/GraphQueryList.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName}": { "get": { - "description": "Get a single saved query by its resourceName.", - "operationId": "SavedQuery_Get", + "description": "Get a single graph query by its resourceName.", + "operationId": "GraphQuery_Get", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -85,7 +85,7 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/SavedQueryResourceNameParameter" + "$ref": "#/parameters/GraphQueryResourceNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -93,27 +93,27 @@ ], "responses": { "200": { - "description": "A saved query definition.", + "description": "A graph query definition.", "schema": { - "$ref": "#/definitions/SavedQueryResource" + "$ref": "#/definitions/GraphQueryResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/SavedQueryError" + "$ref": "#/definitions/GraphQueryError" } } }, "x-ms-examples": { - "Get Saved Query": { - "$ref": "./examples/SavedQueryGet.json" + "Get Graph Query": { + "$ref": "./examples/GraphQueryGet.json" } } }, "delete": { - "description": "Delete a saved query.", - "operationId": "SavedQuery_Delete", + "description": "Delete a graph query.", + "operationId": "GraphQuery_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -122,7 +122,7 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/SavedQueryResourceNameParameter" + "$ref": "#/parameters/GraphQueryResourceNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -130,7 +130,7 @@ ], "responses": { "200": { - "description": "The saved query has been successfully deleted." + "description": "The graph query has been successfully deleted." }, "204": { "description": "The resource doesn't exist." @@ -138,19 +138,19 @@ "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/SavedQueryError" + "$ref": "#/definitions/GraphQueryError" } } }, "x-ms-examples": { - "Delete Saved Query": { - "$ref": "./examples/SavedQueryDelete.json" + "Delete Graph Query": { + "$ref": "./examples/GraphQueryDelete.json" } } }, "put": { - "description": "Create a new saved query.", - "operationId": "SavedQuery_CreateOrUpdate", + "description": "Create a new graph query.", + "operationId": "GraphQuery_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -159,44 +159,44 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/SavedQueryResourceNameParameter" + "$ref": "#/parameters/GraphQueryResourceNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "properties", - "description": "Properties that need to be specified to create a new saved query.", + "description": "Properties that need to be specified to create a new graph query.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SavedQueryResource" + "$ref": "#/definitions/GraphQueryResource" } } ], "responses": { "200": { - "description": "The newly created saved query.", + "description": "The newly created graph query.", "schema": { - "$ref": "#/definitions/SavedQueryResource" + "$ref": "#/definitions/GraphQueryResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/SavedQueryError" + "$ref": "#/definitions/GraphQueryError" } } }, "x-ms-examples": { - "Create Saved Query": { - "$ref": "./examples/SavedQueryAdd.json" + "Create Graph Query": { + "$ref": "./examples/GraphQueryAdd.json" } } }, "patch": { - "description": "Updates a saved query that has already been added.", - "operationId": "SavedQuery_Update", + "description": "Updates a graph query that has already been added.", + "operationId": "GraphQuery_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -205,38 +205,38 @@ "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/SavedQueryResourceNameParameter" + "$ref": "#/parameters/GraphQueryResourceNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "body", - "description": "Properties that need to be specified to create a new saved query.", + "description": "Properties that need to be specified to create a new graph query.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/SavedQueryUpdateParameters" + "$ref": "#/definitions/GraphQueryUpdateParameters" } } ], "responses": { "200": { - "description": "The saved query definition updated.", + "description": "The graph query definition updated.", "schema": { - "$ref": "#/definitions/SavedQueryResource" + "$ref": "#/definitions/GraphQueryResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "#/definitions/SavedQueryError" + "$ref": "#/definitions/GraphQueryError" } } }, "x-ms-examples": { - "Update Saved Query": { - "$ref": "./examples/SavedQueryUpdate.json" + "Update Graph Query": { + "$ref": "./examples/GraphQueryUpdate.json" } } } @@ -306,21 +306,21 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "SavedQueryListResult": { + "GraphQueryListResult": { "properties": { "value": { "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/SavedQueryResource" + "$ref": "#/definitions/GraphQueryResource" }, - "description": "An array of saved queries." + "description": "An array of graph queries." } }, - "description": "Saved query list result." + "description": "Graph query list result." }, - "SavedQueryResource": { - "description": "Saved Query entity definition.", + "GraphQueryResource": { + "description": "Graph Query entity definition.", "allOf": [ { "$ref": "#/definitions/Resource" @@ -329,32 +329,32 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "description": "Metadata describing a saved query for an Azure resource.", - "$ref": "#/definitions/SavedQueryProperties" + "description": "Metadata describing a graph query for an Azure resource.", + "$ref": "#/definitions/GraphQueryProperties" } } }, - "SavedQueryProperties": { - "description": "Properties that contain a saved query.", + "GraphQueryProperties": { + "description": "Properties that contain a graph query.", "required": [ "query" ], "properties": { "timeModified": { "type": "string", - "description": "Date and time in UTC of the last modification that was made to this saved query definition.", + "description": "Date and time in UTC of the last modification that was made to this graph query definition.", "readOnly": true }, "description": { "type": "string", - "description": "The description of a saved query." + "description": "The description of a graph query." }, "query": { "type": "string", - "description": "KQL query that will be saved." + "description": "KQL query that will be graph." }, "resultKind": { - "description": "Enum indicating a type of saved query.", + "description": "Enum indicating a type of graph query.", "readOnly": true, "default": "basic", "type": "string", @@ -369,7 +369,7 @@ } } }, - "SavedQueryUpdateParameters": { + "GraphQueryUpdateParameters": { "properties": { "tags": { "type": "object", @@ -385,25 +385,25 @@ }, "properties": { "x-ms-client-flatten": true, - "description": "Metadata describing a saved query for an Azure resource.", - "$ref": "#/definitions/SavedQueryPropertiesUpdateParameters" + "description": "Metadata describing a graph query for an Azure resource.", + "$ref": "#/definitions/GraphQueryPropertiesUpdateParameters" } }, "description": "The parameters that can be provided when updating workbook properties properties." }, - "SavedQueryPropertiesUpdateParameters": { + "GraphQueryPropertiesUpdateParameters": { "description": "Properties that contain a workbook for PATCH operation.", "properties": { "description": { "type": "string", - "description": "The description of a saved query." + "description": "The description of a graph query." }, "query": { "type": "string", - "description": "KQL query that will be saved." + "description": "KQL query that will be graph." }, "resultKind": { - "description": "Enum indicating a type of saved query.", + "description": "Enum indicating a type of graph query.", "default": "basic", "type": "string", "enum": [ @@ -434,7 +434,7 @@ }, "description": "Error Field contract." }, - "SavedQueryError": { + "GraphQueryError": { "properties": { "code": { "type": "string", @@ -524,12 +524,12 @@ "description": "The name of the resource group.", "x-ms-parameter-location": "method" }, - "SavedQueryResourceNameParameter": { + "GraphQueryResourceNameParameter": { "name": "resourceName", "in": "path", "required": true, "type": "string", - "description": "The name of the Saved Query resource.", + "description": "The name of the Graph Query resource.", "x-ms-parameter-location": "method" } } diff --git a/specification/resourcegraph/resource-manager/readme.md b/specification/resourcegraph/resource-manager/readme.md index cd287d07da2a..963374df6af2 100644 --- a/specification/resourcegraph/resource-manager/readme.md +++ b/specification/resourcegraph/resource-manager/readme.md @@ -57,7 +57,7 @@ These settings apply only when `--tag=package-2018-09-preview` is specified on t ``` yaml $(tag) == 'package-2018-09-preview' input-file: - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json - - Microsoft.ResourceGraph/preview/2018-09-01-preview/savedquery.json + - Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json ``` # Code Generation From 8bdf140d7ee99ee3d4a7cb8564eb12ca6143dec6 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Wed, 17 Apr 2019 15:44:39 -0700 Subject: [PATCH 40/53] Applied PR comments --- .../preview/2018-09-01-preview/examples/OperationsList.json | 2 +- .../preview/2018-09-01-preview/graphquery.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json index 5c2c58c0898c..5944d80fcfc5 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json @@ -20,7 +20,7 @@ "display": { "provider": "Microsoft Resource Graph", "resource": "Queries", - "operation": "CRUD operations of saved queries", + "operation": "CRUD operations of graph queries", "description": "Create/Update/Retrieve a query within specified subscription and resource group." } } diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index d5171256b6b6..530a79231d2e 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -359,8 +359,7 @@ "default": "basic", "type": "string", "enum": [ - "basic", - "extended" + "basic" ], "x-ms-enum": { "name": "ResultKind", From 6e867ba17485b61b7015752e7dfbee22b18e5654 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Thu, 18 Apr 2019 12:58:22 -0700 Subject: [PATCH 41/53] Restored extended enum value in ResultKind since we are using it --- .../preview/2018-09-01-preview/graphquery.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 530a79231d2e..d5171256b6b6 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -359,7 +359,8 @@ "default": "basic", "type": "string", "enum": [ - "basic" + "basic", + "extended" ], "x-ms-enum": { "name": "ResultKind", From 2824f349226d22bada62c59c9565a98fb242093f Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 19 Apr 2019 13:56:22 -0700 Subject: [PATCH 42/53] Removed the extended enum value again --- .../preview/2018-09-01-preview/graphquery.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index d5171256b6b6..530a79231d2e 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -359,8 +359,7 @@ "default": "basic", "type": "string", "enum": [ - "basic", - "extended" + "basic" ], "x-ms-enum": { "name": "ResultKind", From e218366d95cc80f10af8f1695029cff733be8376 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 26 Apr 2019 09:58:05 -0700 Subject: [PATCH 43/53] Apply ARM API team comments --- .../examples/GraphQueryList.json | 57 ++++++++++--------- .../2018-09-01-preview/graphquery.json | 7 ++- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json index 490f6dfc4de9..7e5316caa4c8 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/GraphQueryList.json @@ -8,34 +8,37 @@ }, "responses": { "200": { - "body": [ - { - "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", - "name": "MyDockerVMs", - "type": "Microsoft.ResourceGraph/queries", - "tags": {}, - "eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa", - "properties": { - "description": "Docker VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", - "resultKind": "basic", - "timeModified": "2019-03-12T13:51:13-07:00" + "body": { + "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.ResourceGraph/queries?api-version=2019-09-01-preview&$top=10&$skiptoken=skiptoken", + "value": [ + { + "id": "/subscriptions/87f4f8b0-83c1-4aa9-b318-5237aeb15264/resources/rid1/providers/Microsoft.ResourceGraph/queries/MyDockerVMs", + "name": "MyDockerVMs", + "type": "Microsoft.ResourceGraph/queries", + "tags": {}, + "eTag": "5d64408e-4ca3-41f7-b725-6914f3012afa", + "properties": { + "description": "Docker VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'docker'", + "resultKind": "basic", + "timeModified": "2019-03-12T13:51:13-07:00" + } + }, + { + "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/queries/MyTestVMs", + "name": "MyTestVMs", + "type": "Microsoft.ResourceGraph/queries", + "tags": {}, + "eTag": "b0809832-ca62-4133-8f13-0c46580f9db1", + "properties": { + "description": "Test VMs in PROD", + "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", + "resultKind": "basic", + "timeModified": "2019-03-13T13:51:13-07:00" + } } - }, - { - "id": "/subscriptions/6abb2f31-3e6a-4134-9968-219a596012a0/resources/rid2/providers/Microsoft.ResourceGraph/queries/MyTestVMs", - "name": "MyTestVMs", - "type": "Microsoft.ResourceGraph/queries", - "tags": {}, - "eTag": "b0809832-ca62-4133-8f13-0c46580f9db1", - "properties": { - "description": "Test VMs in PROD", - "query": "where isnotnull(tags['Prod']) and properties.extensions[0].Name == 'test'", - "resultKind": "basic", - "timeModified": "2019-03-13T13:51:13-07:00" - } - } - ] + ] + } } } } \ No newline at end of file diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 530a79231d2e..69bc3c800176 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -267,7 +267,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } } @@ -308,6 +308,10 @@ }, "GraphQueryListResult": { "properties": { + "nextLink": { + "description": "URL to fetch the next set of queries.", + "type": "string" + }, "value": { "type": "array", "readOnly": true, @@ -343,6 +347,7 @@ "timeModified": { "type": "string", "description": "Date and time in UTC of the last modification that was made to this graph query definition.", + "format": "date-time", "readOnly": true }, "description": { From 784e767421b9459fb52105f593d7d51fa01d5342 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 26 Apr 2019 13:41:28 -0700 Subject: [PATCH 44/53] Fix examples --- .../2018-09-01-preview/examples/ResourceChangesNextPage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesNextPage.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesNextPage.json index efbd570e98e0..9137145ef488 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesNextPage.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesNextPage.json @@ -9,7 +9,7 @@ "start": "2018-10-30T12:09:03.141Z", "end": "2018-10-31T12:09:03.141Z" }, - "$top": "2", + "$top": 2, "$skipToken": "ew0KICAiJGlkIjogIjEiLA0KICAiRW5kVGltZSI6ICJcL0RhdGUoMTU1MDc0NT" } }, From 6cee3cee7a9f165b33f2c0ec7287c2f864f6618a Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 26 Apr 2019 15:29:31 -0700 Subject: [PATCH 45/53] Fix examples --- .../2018-09-01-preview/examples/ResourceChangesFirstPage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesFirstPage.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesFirstPage.json index 045368463744..46a32929e680 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesFirstPage.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/ResourceChangesFirstPage.json @@ -9,7 +9,7 @@ "start": "2018-10-30T12:09:03.141Z", "end": "2018-10-31T12:09:03.141Z" }, - "$top": "2" + "$top": 2 } }, "responses": { From 2915d7095ea5a43c4f5131bf2540490413656516 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Fri, 26 Apr 2019 17:32:18 -0700 Subject: [PATCH 46/53] Added nextLinkName --- .../preview/2018-09-01-preview/graphquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 69bc3c800176..52c780492568 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -64,7 +64,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" }, "x-ms-examples": { "Get a list of Graph Queries": { From 82256125efcbfd4a022baea2c86633b381e9d4c8 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Mon, 29 Apr 2019 08:11:14 -0700 Subject: [PATCH 47/53] add Go SDK build --- .../resourcegraph/resource-manager/readme.go.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/resourcegraph/resource-manager/readme.go.md b/specification/resourcegraph/resource-manager/readme.go.md index 484e2e980fe7..9c93699bc8af 100644 --- a/specification/resourcegraph/resource-manager/readme.go.md +++ b/specification/resourcegraph/resource-manager/readme.go.md @@ -14,6 +14,7 @@ go: ``` yaml $(go) && $(multiapi) batch: - tag: package-2019-04 + - tag: package-2018-09-preview ``` ### Tag: package-2019-04 and go @@ -24,3 +25,12 @@ Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-09-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2018-09-01/$(namespace) +``` From 4a454fa9e4540d58e50015f4174256827964c7c7 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Mon, 29 Apr 2019 08:20:04 -0700 Subject: [PATCH 48/53] make descriptions match --- .../preview/2018-09-01-preview/resourcegraph.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index 4be516e5ba62..3bb5405c946b 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -27,7 +27,7 @@ "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", + "description": "Azure Active Directory OAuth2 Flow.", "scopes": { "user_impersonation": "impersonate your user account" } From d80fb2462863bf7b3befb8d539183a2090b66f21 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 29 Apr 2019 10:14:33 -0700 Subject: [PATCH 49/53] Added nextLink definition in OperationListResult --- .../preview/2018-09-01-preview/graphquery.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 52c780492568..f2dbd56aa8ce 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -467,7 +467,11 @@ "$ref": "#/definitions/Operation" }, "description": "List of Resource Graph operations supported by the Resource Graph resource provider." - } + }, + "nextLink": { + "description": "The link used to get the next page of results.", + "type": "string" + } } }, "Operation": { From dca15ca184a6d55e010b8b3ae9b5ad9574b6a173 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 29 Apr 2019 12:22:30 -0700 Subject: [PATCH 50/53] Removed a duplicated OperationListResult and reference to resourcegraph.json --- .../2018-09-01-preview/graphquery.json | 52 +------------------ .../2018-09-01-preview/resourcegraph.json | 6 ++- 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index f2dbd56aa8ce..451ff52c992d 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -262,7 +262,7 @@ "200": { "description": "OK. The request has succeeded.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "resourcegraph.json#/definitions/OperationListResult" } } }, @@ -457,56 +457,6 @@ } }, "description": "Error message body that will indicate why the operation failed." - }, - "OperationListResult": { - "description": "Result of the request to list Resource Graph operations. It contains a list of operations and a URL link to get the next set of results.", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of Resource Graph operations supported by the Resource Graph resource provider." - }, - "nextLink": { - "description": "The link used to get the next page of results.", - "type": "string" - } - } - }, - "Operation": { - "description": "Resource Graph REST API operation definition.", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}", - "type": "string" - }, - "display": { - "description": "Display metadata associated with the operation.", - "properties": { - "provider": { - "description": "Service provider: Microsoft Resource Graph.", - "type": "string" - }, - "resource": { - "description": "Resource on which the operation is performed etc.", - "type": "string" - }, - "operation": { - "description": "Type of operation: get, read, delete, etc.", - "type": "string" - }, - "description": { - "description": "Description for the operation.", - "type": "string" - } - } - }, - "origin": { - "type": "string", - "description": "The origin of operations." - } - } } }, "parameters": { diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index 3bb5405c946b..0da16307c344 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -701,7 +701,11 @@ "$ref": "#/definitions/Operation" }, "description": "List of Resource Graph operations supported by the Resource Graph resource provider." - } + }, + "nextLink": { + "description": "The link used to get the next page of results.", + "type": "string" + } } }, "Operation": { From 4032af8ea4de01c5f3827f5f20d478fd3e0f22fb Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 29 Apr 2019 12:52:10 -0700 Subject: [PATCH 51/53] Added nextLinkName: nextLink for x-ms-pageable in operations --- .../preview/2018-09-01-preview/resourcegraph.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index 0da16307c344..71bc8bd4fe64 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -196,7 +196,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } } From b379fcdfdf50d368b0d54e101750fd8acf4b4bc7 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Mon, 29 Apr 2019 12:56:17 -0700 Subject: [PATCH 52/53] fix formatting and description --- .../preview/2018-09-01-preview/resourcegraph.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json index 71bc8bd4fe64..50600b2a8cd8 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json @@ -702,10 +702,10 @@ }, "description": "List of Resource Graph operations supported by the Resource Graph resource provider." }, - "nextLink": { - "description": "The link used to get the next page of results.", - "type": "string" - } + "nextLink": { + "description": "The link used to get the next page of results.", + "type": "string" + } } }, "Operation": { @@ -749,7 +749,7 @@ "in": "query", "required": true, "type": "string", - "description": "API version." + "description": "Client Api Version." } } } \ No newline at end of file From d88ec199afcf4e27e8e1468e445fb2f02a24f443 Mon Sep 17 00:00:00 2001 From: Eric Chong Date: Mon, 29 Apr 2019 13:22:45 -0700 Subject: [PATCH 53/53] Removed extended from enum --- .../preview/2018-09-01-preview/examples/OperationsList.json | 1 + .../preview/2018-09-01-preview/graphquery.json | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json index 5944d80fcfc5..21cf8b809c60 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/examples/OperationsList.json @@ -5,6 +5,7 @@ "responses": { "200": { "body": { + "nextLink": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.ResourceGraph/?api-version=2019-09-01-preview&$top=10&$skiptoken=skiptoken", "value": [ { "name": "Microsoft.ResourceGraph/resources/action", diff --git a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json index 451ff52c992d..bc26c8e4b273 100644 --- a/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json +++ b/specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.json @@ -411,8 +411,7 @@ "default": "basic", "type": "string", "enum": [ - "basic", - "extended" + "basic" ], "x-ms-enum": { "name": "ResultKind",