From c9766b7b985d1025f25704b5bd43e374c63a41f4 Mon Sep 17 00:00:00 2001 From: Aviram Leder Date: Wed, 13 Jun 2018 10:10:02 +0300 Subject: [PATCH 1/5] add new version for proactive detection config --- .../componentProactiveDetection_API.json | 315 ++++++++++++++++++ .../ProactiveDetectionConfigurationGet.json | 37 ++ ...ProactiveDetectionConfigurationUpdate.json | 58 ++++ .../ProactiveDetectionConfigurationsList.json | 62 ++++ 4 files changed, 472 insertions(+) create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json create mode 100644 specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json new file mode 100644 index 000000000000..0209bd849d51 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json @@ -0,0 +1,315 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApplicationInsightsManagementClient", + "description": "Azure Application Insights client for ProactiveDetection configurations of a component.", + "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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs": + { + "get": { + "description": "Gets a list of ProactiveDetection configurations of an Application Insights component.", + "operationId": "ProactiveDetectionConfigurations_List", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + } + ], + "responses": { + "200": { + "description": + "A list containing 0 or more ProactiveDetection configurations of an Application Insights component.", + "schema": { + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfigurationListResult" + } + } + }, + "x-ms-examples": { + "ProactiveDetectionConfigurationsList": { + "$ref": "./examples/ProactiveDetectionConfigurationsList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}": + { + "get": { + "description": "Get the ProactiveDetection configuration for this configuration id.", + "operationId": "ProactiveDetectionConfigurations_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationId" + } + ], + "responses": { + "200": { + "description": "The ProactiveDetection configuration for this configuration id.", + "schema": { + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfiguration" + } + } + }, + "x-ms-examples": { + "ProactiveDetectionConfigurationGet": { + "$ref": "./examples/ProactiveDetectionConfigurationGet.json" + } + } + }, + "put": { + "description": "Update the ProactiveDetection configuration for this configuration id.", + "operationId": "ProactiveDetectionConfigurations_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceNameParameter" + }, + { + "$ref": "#/parameters/ConfigurationId" + }, + { + "name": "ProactiveDetectionProperties", + "description": "Properties that need to be specified to update the ProactiveDetection configuration.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfiguration" + } + } + ], + "responses": { + "200": { + "description": "The ProactiveDetection configuration that was successfully updated.", + "schema": { + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfiguration" + } + } + }, + "x-ms-examples": { + "ProactiveDetectionConfigurationUpdate": { + "$ref": "./examples/ProactiveDetectionConfigurationUpdate.json" + } + } + } + } + }, + "definitions": { + "ApplicationInsightsComponentProactiveDetectionConfigurationListResult": { + "description": "A list of ProactiveDetection configurations.", + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfiguration" + } + }, + "ApplicationInsightsComponentProactiveDetectionConfiguration": { + "description": "A ProactiveDetection configuration definition.", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "properties": { + "description": "Properties that define a ProactiveDetection configuration.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ApplicationInsightsComponentProactiveDetectionConfigurationProperties" + } + } + }, + "ApplicationInsightsComponentProactiveDetectionConfigurationProperties": { + "description": "Properties that define a ProactiveDetection configuration.", + "type": "object", + "properties": { + "Name": { + "type": "string", + "readOnly": false, + "description": "The rule name" + }, + "Enabled": { + "type": "boolean", + "readOnly": false, + "description": "A flag that indicates whether this rule is enabled by the user" + }, + "SendEmailsToSubscriptionOwners": { + "type": "boolean", + "readOnly": false, + "description": + "A flag that indicated whether notifications on this rule should be sent to subscription owners" + }, + "CustomEmails": { + "type": "array", + "readOnly": false, + "description": "Custom email addresses for this rule notifications", + "items": { + "type": "string" + } + }, + "LastUpdatedTime": { + "type": "string", + "readOnly": false, + "description": "The last time this rule was updated" + }, + "RuleDefinitions": { + "type": "object", + "readOnly": false, + "description": + "Static definitions of the ProactiveDetection configuration rule (same values for all components).", + "properties": { + "Name": { + "type": "string", + "readOnly": false, + "description": "The rule name" + }, + "DisplayName": { + "type": "string", + "readOnly": false, + "description": "The rule name as it is displayed in UI" + }, + "Description": { + "type": "string", + "readOnly": false, + "description": "The rule description" + }, + "HelpUrl": { + "type": "string", + "readOnly": false, + "description": "URL which displays aditional info about the proactive detection rule" + }, + "IsHidden": { + "type": "boolean", + "readOnly": false, + "description": "A flag indicating whether the rule is hidden (from the UI)" + }, + "IsEnabledByDefault": { + "type": "boolean", + "readOnly": false, + "description": "A flag indicating whether the rule is enabled by default" + }, + "IsInPreview": { + "type": "boolean", + "readOnly": false, + "description": "A flag indicating whether the rule is in preview" + }, + "SupportsEmailNotifications": { + "type": "boolean", + "readOnly": false, + "description": "A flag indicating whether email notifications are supported for detections for this rule" + } + } + } + } + } + }, + "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" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Application Insights component resource.", + "x-ms-parameter-location": "method" + }, + "ConfigurationId": { + "name": "ConfigurationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ProactiveDetection configuration ID. This is unique within a Application Insights component.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json new file mode 100644 index 000000000000..6654ceb78b8d --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "ConfigurationId": "slowpageloadtime" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-component/ProactiveDetectionConfigs/slowpageloadtime", + "type": "Microsoft.Insights/components/ProactiveDetectionConfigs", + "name": "slowpageloadtime", + "location": "South Central US", + "properties": { + "Name": "slowpageloadtime", + "Enabled": true, + "SendEmailsToSubscriptionOwners": true, + "CustomEmails": [ "foo@microsoft.com", "foo2@microsoft.com" ], + "LastUpdatedTime": null, + "RuleDefinitions": { + "Name": "slowpageloadtime", + "DisplayName": "Slow page load time", + "Description": "Smart Detection rules notify you of performance anomaly issues.", + "HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics", + "IsHidden": false, + "IsEnabledByDefault": true, + "IsInPreview": false, + "SupportsEmailNotifications": true + } + } + } + } + } +} + diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json new file mode 100644 index 000000000000..fa9ca0fe7034 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component", + "ConfigurationId": "slowpageloadtime", + "ProactiveDetectionProperties": { + "name": "slowpageloadtime", + "location": "South Central US", + "properties": { + "Name": "slowpageloadtime", + "Enabled": true, + "SendEmailsToSubscriptionOwners": true, + "CustomEmails": [ "foo@microsoft.com", "foo2@microsoft.com" ], + "LastUpdatedTime": null, + "RuleDefinitions": { + "Name": "slowpageloadtime", + "DisplayName": "Slow page load time", + "Description": "Smart Detection rules notify you of performance anomaly issues.", + "HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics", + "IsHidden": false, + "IsEnabledByDefault": true, + "IsInPreview": false, + "SupportsEmailNotifications": true + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-component/ProactiveDetectionConfigs/slowpageloadtime", + "type": "Microsoft.Insights/components/ProactiveDetectionConfigs", + "name": "slowpageloadtime", + "location": "South Central US", + "properties": { + "Name": "slowpageloadtime", + "Enabled": true, + "SendEmailsToSubscriptionOwners": true, + "CustomEmails": [ "foo@microsoft.com", "foo2@microsoft.com" ], + "LastUpdatedTime": null, + "RuleDefinitions": { + "Name": "slowpageloadtime", + "DisplayName": "Slow page load time", + "Description": "Smart Detection rules notify you of performance anomaly issues.", + "HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics", + "IsHidden": false, + "IsEnabledByDefault": true, + "IsInPreview": false, + "SupportsEmailNotifications": true + } + } + } + } + } +} + diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json new file mode 100644 index 000000000000..d34474b8f023 --- /dev/null +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2015-05-01", + "subscriptionId": "subid", + "resourceGroupName": "my-resource-group", + "resourceName": "my-component" + }, + "responses": { + "200": { + "body": + [ + { + "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-component/ProactiveDetectionConfigs/slowpageloadtime", + "type": "Microsoft.Insights/components/ProactiveDetectionConfigs", + "name": "slowpageloadtime", + "location": "South Central US", + "properties": { + "Name": "slowpageloadtime", + "Enabled": true, + "SendEmailsToSubscriptionOwners": true, + "CustomEmails": [ "foo@microsoft.com", "foo2@microsoft.com" ], + "LastUpdatedTime": null, + "RuleDefinitions": { + "Name": "slowpageloadtime", + "DisplayName": "Slow page load time", + "Description": "Smart Detection rules notify you of performance anomaly issues.", + "HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics", + "IsHidden": false, + "IsEnabledByDefault": true, + "IsInPreview": false, + "SupportsEmailNotifications": true + } + } + }, + { + "id": "/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.insights/components/my-component/ProactiveDetectionConfigs/slowserverresponsetime", + "type": "Microsoft.Insights/components/ProactiveDetectionConfigs", + "name": "slowserverresponsetime", + "location": "South Central US", + "properties": { + "Name": "slowserverresponsetime", + "Enabled": true, + "SendEmailsToSubscriptionOwners": true, + "CustomEmails": [], + "LastUpdatedTime": null, + "RuleDefinitions": { + "Name": "slowserverresponsetime", + "DisplayName": "Slow server response time", + "Description": "Smart Detection rules notify you of performance anomaly issues.", + "HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics", + "IsHidden": false, + "IsEnabledByDefault": true, + "IsInPreview": false, + "SupportsEmailNotifications": true + } + } + } + ] + } + } +} + From 414b059da2d4c0b2bbb7b4a6c9acad7c5fd383e7 Mon Sep 17 00:00:00 2001 From: Aviram Leder Date: Wed, 13 Jun 2018 10:57:25 +0300 Subject: [PATCH 2/5] fixing api-version --- .../preview/2018-05-01/componentProactiveDetection_API.json | 2 +- .../2018-05-01/examples/ProactiveDetectionConfigurationGet.json | 2 +- .../examples/ProactiveDetectionConfigurationUpdate.json | 2 +- .../examples/ProactiveDetectionConfigurationsList.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json index 0209bd849d51..46710ee5d600 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/componentProactiveDetection_API.json @@ -3,7 +3,7 @@ "info": { "title": "ApplicationInsightsManagementClient", "description": "Azure Application Insights client for ProactiveDetection configurations of a component.", - "version": "2015-05-01" + "version": "2018-05-01-preview" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json index 6654ceb78b8d..fd69623de146 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationGet.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-05-01", + "api-version": "2018-05-01-preview", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json index fa9ca0fe7034..82b10c7c77b9 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-05-01", + "api-version": "2018-05-01-preview", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component", diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json index d34474b8f023..f662cf6a9da6 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2018-05-01/examples/ProactiveDetectionConfigurationsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-05-01", + "api-version": "2018-05-01-preview", "subscriptionId": "subid", "resourceGroupName": "my-resource-group", "resourceName": "my-component" From f013ccb70bb6f2428ebfccb11e9b46f54beb9e17 Mon Sep 17 00:00:00 2001 From: Aviram Leder Date: Thu, 21 Jun 2018 10:47:34 +0300 Subject: [PATCH 3/5] alligning resource definition --- .../stable/2015-05-01/components_API.json | 6 +++++- .../Microsoft.Insights/stable/2015-05-01/workbooks_API.json | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/components_API.json b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/components_API.json index 41e0462a4688..5cd6ce1f4988 100644 --- a/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/components_API.json +++ b/specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/components_API.json @@ -308,7 +308,11 @@ }, "location": { "type": "string", - "description": "Resource location" + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "additionalProperties": { 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 722aa6c9e079..bcd6cb244012 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 @@ -287,6 +287,9 @@ "description": "Resource tags" } }, + "required": [ + "location" + ], "x-ms-azure-resource": true, "description": "An azure resource object" }, From d88a6c0dcaa870b5c315ce8eca79798363fb5361 Mon Sep 17 00:00:00 2001 From: Aviram Leder Date: Tue, 3 Jul 2018 17:16:54 +0300 Subject: [PATCH 4/5] fix workbook patch operation --- .../2015-05-01/examples/WorkbookUpdate.json | 15 +--- .../stable/2015-05-01/workbooks_API.json | 85 ++++++++++++++++--- 2 files changed, 75 insertions(+), 25 deletions(-) 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 472a88653122..6c95501e234c 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,22 +4,15 @@ "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookProperties": { - "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", + "workbookUpdateParameters": { "location": "west us", - "tags": [ - "TagSample01", - "TagSample02" - ], + "kind": "shared", + "tags": null, "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": null } } }, 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 bcf6d0df9574..c1a9a2e1c7c7 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 @@ -62,7 +62,7 @@ "200": { "description": "A list containing 0 or more workbook definitions.", "schema": { - "$ref": "#/definitions/WorkbooksListResult" + "$ref": "#/definitions/Workbooks" } }, "default": { @@ -72,9 +72,6 @@ } } }, - "x-ms-pageable": { - "nextLinkName": null - }, "x-ms-examples": { "WorkbooksList": { "$ref": "./examples/WorkbooksList.json" @@ -85,7 +82,7 @@ "/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}": { "get": { "description": "Get a single workbook by its resourceName.", - "operationId": "Workbooks_Get", + "operationId": "Workbook_Get", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -122,7 +119,7 @@ }, "delete": { "description": "Delete a workbook.", - "operationId": "Workbooks_Delete", + "operationId": "Workbook_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -159,7 +156,7 @@ }, "put": { "description": "Create a new workbook.", - "operationId": "Workbooks_CreateOrUpdate", + "operationId": "Workbook_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -211,7 +208,7 @@ }, "patch": { "description": "Updates a workbook that has already been added.", - "operationId": "Workbooks_Update", + "operationId": "Workbook_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -226,12 +223,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookProperties", + "name": "workbookUpdateParameters", "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/Workbook" + "$ref": "#/definitions/WorkbookUpdateParameters" } } ], @@ -258,7 +255,7 @@ } }, "definitions": { - "WorkbookResource": { + "Resource": { "properties": { "id": { "type": "string", @@ -296,11 +293,10 @@ "x-ms-azure-resource": true, "description": "An azure resource object" }, - "WorkbooksListResult": { + "Workbooks": { "properties": { "value": { "type": "array", - "readOnly": true, "items": { "$ref": "#/definitions/Workbook" }, @@ -313,7 +309,7 @@ "description": "An Application Insights workbook definition.", "allOf": [ { - "$ref": "#/definitions/WorkbookResource" + "$ref": "#/definitions/Resource" } ], "properties": { @@ -420,6 +416,67 @@ } } }, + "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": "array", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "location": { + "type": "string", + "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": { + "name": { + "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" + } + } + }, "ErrorFieldContract": { "properties": { "code": { From 1d21250cb41a0fc249ded45441e19f6a1d30a28d Mon Sep 17 00:00:00 2001 From: Aviram Leder Date: Wed, 4 Jul 2018 10:18:00 +0300 Subject: [PATCH 5/5] reverting eric changes --- .../2015-05-01/examples/WorkbookUpdate.json | 15 +++- .../stable/2015-05-01/workbooks_API.json | 88 +++---------------- 2 files changed, 25 insertions(+), 78 deletions(-) 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 6c95501e234c..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 @@ -4,15 +4,22 @@ "subscriptionId": "6b643656-33eb-422f-aee8-3ac145d124af", "resourceGroupName": "my-resource-group", "resourceName": "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", - "workbookUpdateParameters": { + "workbookProperties": { + "name": "deadb33f-8bee-4d3b-a059-9be8dac93960", "location": "west us", - "kind": "shared", - "tags": 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", - "tags": null + "timeModified": null } } }, 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 c1a9a2e1c7c7..60b4f9f28063 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 @@ -62,7 +62,7 @@ "200": { "description": "A list containing 0 or more workbook definitions.", "schema": { - "$ref": "#/definitions/Workbooks" + "$ref": "#/definitions/WorkbooksListResult" } }, "default": { @@ -72,6 +72,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": null + }, "x-ms-examples": { "WorkbooksList": { "$ref": "./examples/WorkbooksList.json" @@ -82,7 +85,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" @@ -119,7 +122,7 @@ }, "delete": { "description": "Delete a workbook.", - "operationId": "Workbook_Delete", + "operationId": "Workbooks_Delete", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -156,7 +159,7 @@ }, "put": { "description": "Create a new workbook.", - "operationId": "Workbook_CreateOrUpdate", + "operationId": "Workbooks_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -208,7 +211,7 @@ }, "patch": { "description": "Updates a workbook that has already been added.", - "operationId": "Workbook_Update", + "operationId": "Workbooks_Update", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" @@ -223,12 +226,12 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "name": "workbookUpdateParameters", + "name": "workbookProperties", "description": "Properties that need to be specified to create a new workbook.", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkbookUpdateParameters" + "$ref": "#/definitions/Workbook" } } ], @@ -255,7 +258,7 @@ } }, "definitions": { - "Resource": { + "WorkbookResource": { "properties": { "id": { "type": "string", @@ -287,16 +290,14 @@ "description": "Resource tags" } }, - "required": [ - "location" - ], "x-ms-azure-resource": true, "description": "An azure resource object" }, - "Workbooks": { + "WorkbooksListResult": { "properties": { "value": { "type": "array", + "readOnly": true, "items": { "$ref": "#/definitions/Workbook" }, @@ -309,7 +310,7 @@ "description": "An Application Insights workbook definition.", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "#/definitions/WorkbookResource" } ], "properties": { @@ -416,67 +417,6 @@ } } }, - "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": "array", - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, - "location": { - "type": "string", - "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": { - "name": { - "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" - } - } - }, "ErrorFieldContract": { "properties": { "code": {