From a47419e24b1e1616cc5e1b9be57d11e6177a2863 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 29 Aug 2017 17:02:27 -0700 Subject: [PATCH 1/6] Named DiagnosticSettings --- .../diagnosticsSettingsCategories_API.json | 266 ++++++++++ .../diagnosticsSettings_API.json | 499 ++++++++++++++++++ .../createOrUpdateDiagnosticSetting.json | 73 +++ .../examples/deleteDiagnosticSetting.json | 17 + .../examples/getDiagnosticSetting.json | 43 ++ .../getDiagnosticSettingsCategory.json | 22 + .../examples/listDiagnosticSettings.json | 47 ++ .../listDiagnosticSettingsCategories.json | 35 ++ .../monitor/resource-manager/readme.md | 9 +- 9 files changed, 1007 insertions(+), 4 deletions(-) create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/deleteDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettings.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json new file mode 100644 index 000000000000..7997cdf59784 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json @@ -0,0 +1,266 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2017-05-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": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}": { + "get": { + "tags": [ + "DiagnosticSettingsCategories" + ], + "operationId": "DiagnosticSettingsCategory_Get", + "description": "Gets the diagnostic settings category for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get more information about diagnostic setting category", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsCategoryResource" + }, + "examples": { + "application/json": + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowRuntime", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Logs" + } + } + } + } + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/getDiagnosticSettingsCategory.json" + } + } + } + }, + "/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories": { + "get": { + "tags": [ + "DiagnosticSettingsCategories" + ], + "operationId": "DiagnosticSettingsCategory_List", + "description": "Lists the diagnostic settings categories for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get more information about diagnostic setting category", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsCategoryResourceCollection" + }, + "examples": { + "application/json": { + "value": [ + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowRuntime", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Logs" + } + }, + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowMetric", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowMetric", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Metrics" + } + } + ] + } + } + } + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/listDiagnosticSettingsCategories.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "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" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "DiagnosticSettingsCategory": { + "properties": { + "categoryType": { + "type": "string", + "description": "The type of the diagnostic settings category. Can be 'Logs' or 'Metrics'." + } + }, + "description": "The diagnostic settings Category." + }, + "DiagnosticSettingsCategoryResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DiagnosticSettingsCategory" + } + }, + "description": "Description of diagnostic setting category." + }, + "DiagnosticSettingsCategoryResourceCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DiagnosticSettingsCategoryResource" + }, + "description": "The collection of diagnostic settings category resources." + } + }, + "description": "Represents a collection of diagnostic setting category resources." + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method" + }, + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json new file mode 100644 index 000000000000..da506aa65d1a --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json @@ -0,0 +1,499 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2017-05-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": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}": { + "get": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_Get", + "description": "Gets the active diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get more information about diagnostic setting", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", + "type":"microsoft.logic/workflows", + "name":"mysetting", + "location":"eastus", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "eventHubAuthorizationRuleId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId":"", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/getDiagnosticSetting.json" + } + } + }, + "put": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_CreateOrUpdate", + "description": "Creates or updates diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to create a diagnostic setting", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", + "type":"microsoft.logic/workflows", + "name":"mysetting", + "location":"eastus", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "eventHubAuthorizationRuleId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId":"", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + }, + "x-ms-examples": { + "Creates or Updates the diagnostic setting": { + "$ref": "./examples/createOrUpdateDiagnosticSetting.json" + } + } + }, + "delete": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_Delete", + "description": "Deletes existing diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to remove a diagnostic setting" + }, + "204": { + "description": "Successful request to remove a diagnostic setting" + } + }, + "x-ms-examples": { + "Deletes the diagnostic setting": { + "$ref": "./examples/deleteDiagnosticSetting.json" + } + } + } + }, + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings": { + "get": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_List", + "description": "Gets the active diagnostic settings list for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get more information about diagnostic setting", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResourceCollection" + }, + "examples": { + "application/json": { + "value": [ + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", + "type":"microsoft.logic/workflows", + "name":"mysetting", + "location":"eastus", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "eventHubAuthorizationRuleId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId":"", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + ] + } + } + } + }, + "x-ms-examples": { + "Gets the diagnostic setting": { + "$ref": "./examples/listDiagnosticSettings.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "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" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "RetentionPolicy": { + "properties": { + "enabled": { + "type": "boolean", + "description": "a value indicating whether the retention policy is enabled." + }, + "days": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely." + } + }, + "required": [ "enabled", "days" ], + "description": "Specifies the retention policy for the log." + }, + "MetricSettings": { + "properties": { + "timeGrain": { + "type": "string", + "format": "duration", + "description": "the timegrain of the metric in ISO8601 format." + }, + "category": { + "type": "string", + "description": "Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this category is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this category." + } + }, + "required": [ "enabled" ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." + }, + "LogSettings": { + "properties": { + "category": { + "type": "string", + "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this log." + } + }, + "required": [ "enabled" ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." + }, + "DiagnosticSettings": { + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "eventHubName": { + "type": "string", + "description": "The name of the event hub. If none is specified, the default event hub will be selected." + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricSettings" + }, + "description": "the list of metric settings." + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/LogSettings" + }, + "description": "the list of logs settings." + }, + "workspaceId": { + "type": "string", + "description": "The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The diagnostic settings." + }, + "DiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DiagnosticSettings" + } + }, + "description": "Description of diagnostic setting resource." + }, + "DiagnosticSettingsResourceCollection": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DiagnosticSettingsResource" + }, + "description": "The collection of diagnostic settings resources;." + } + }, + "description": "Represents a collection of alert rule resources." + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method" + }, + "NameParameter": { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the diagnostic setting.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json new file mode 100644 index 000000000000..9d197db3ff62 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2017-05-01-preview", + "parameters": { + "location":"", + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId":"", + "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"mysetting", + "location":"", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId":"", + "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/deleteDiagnosticSetting.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/deleteDiagnosticSetting.json new file mode 100644 index 000000000000..cfac0670258c --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/deleteDiagnosticSetting.json @@ -0,0 +1,17 @@ +{ + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version" : "2017-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json new file mode 100644 index 000000000000..5d6a55b8a125 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json @@ -0,0 +1,43 @@ +{ + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version" : "2017-05-01-preview" + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "id" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type" : "", + "name" : "mysetting", + "location" : "", + "tags" : null, + "properties" : { + "storageAccountId" : "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "serviceBusRuleId" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId" : "", + "eventHubAuthorizationRuleId" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "metrics" : [{ + "category" : "WorkflowMetrics", + "enabled" : true, + "retentionPolicy" : { + "enabled" : false, + "days" : 0 + } + } + ], + "logs" : [{ + "category" : "WorkflowRuntime", + "enabled" : true, + "retentionPolicy" : { + "enabled" : false, + "days" : 0 + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json new file mode 100644 index 000000000000..26aeb64f748a --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json @@ -0,0 +1,22 @@ +{ + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "WorkflowRuntime", + "api-version" : "2017-05-01-preview" + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowRuntime", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Logs" + } + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettings.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettings.json new file mode 100644 index 000000000000..eebe40062579 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettings.json @@ -0,0 +1,47 @@ +{ + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version" : "2017-05-01-preview" + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "value": [ + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", + "type":"microsoft.logic/workflows", + "name":"mysetting", + "location":"eastus", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "eventHubAuthorizationRuleId":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId":"", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json new file mode 100644 index 000000000000..5b5545066b43 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json @@ -0,0 +1,35 @@ +{ + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version" : "2017-05-01-preview" + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "value": [ + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowRuntime", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Logs" + } + }, + { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowMetric", + "type":"microsoft.insights/diagnosticSettingsCategories", + "name":"WorkflowMetric", + "location":"eastus", + "tags":null, + "properties": { + "categoryType":"Metrics" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 97bc18aba2bd..fa4789d0ce88 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -28,21 +28,22 @@ These are the global settings for the MonitorClient API. title: MonitorClient description: Monitor Management Client openapi-type: arm -tag: package-2017-03 +tag: package-2017-08 ``` ### Tag: package-2017-03 -These settings apply only when `--tag=package-2017-03` is specified on the command line. +These settings apply only when `--tag=package-2017-08` is specified on the command line. -``` yaml $(tag) == 'package-2017-03' +``` yaml $(tag) == 'package-2017-08' input-file: - microsoft.insights/2015-04-01/autoscale_API.json - microsoft.insights/2016-03-01/alertRulesIncidents_API.json - microsoft.insights/2016-03-01/alertRules_API.json - microsoft.insights/2016-03-01/logProfiles_API.json -- microsoft.insights/2016-09-01/serviceDiagnosticsSettings_API.json +- microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json +- microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json - microsoft.insights/2017-04-01/actionGroups_API.json - microsoft.insights/2017-04-01/activityLogAlerts_API.json ``` From 1b3202610194d5d172eb140bd021978188776c99 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 12 Sep 2017 12:38:18 -0700 Subject: [PATCH 2/6] [Monitor] Making CategoryType enum --- .../diagnosticsSettingsCategories_API.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json index 7997cdf59784..4744dc4b70b1 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json @@ -190,8 +190,13 @@ "DiagnosticSettingsCategory": { "properties": { "categoryType": { + "enum": ["Metrics", "Logs"], "type": "string", - "description": "The type of the diagnostic settings category. Can be 'Logs' or 'Metrics'." + "x-ms-enum": { + "name": "categoryType" + }, + "x-nullable": false, + "description": "The type of the diagnostic settings category." } }, "description": "The diagnostic settings Category." From b5b15f200436cb7609853afc92c826b91cb3fe1a Mon Sep 17 00:00:00 2001 From: Vinicius Date: Wed, 13 Sep 2017 14:09:07 -0700 Subject: [PATCH 3/6] [Monitor] Removing serviceBusRuleId from getDiagnosticSettings example. --- .../2017-05-01-preview/examples/getDiagnosticSetting.json | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json index 5d6a55b8a125..6c3d46bde39f 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/getDiagnosticSetting.json @@ -15,7 +15,6 @@ "tags" : null, "properties" : { "storageAccountId" : "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - "serviceBusRuleId" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", "workspaceId" : "", "eventHubAuthorizationRuleId" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", "metrics" : [{ From 40082bfa8db614628dc7318cced30e702e0ef7a3 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Wed, 13 Sep 2017 16:35:11 -0700 Subject: [PATCH 4/6] [Monitor] Fix validation errors regarding operations api --- .../2015-04-01/examples/OperationList.json | 678 ++++++++++++++++++ .../2015-04-01/operations_API.json | 116 +++ .../diagnosticsSettingsCategories_API.json | 25 +- .../diagnosticsSettings_API.json | 25 +- .../createOrUpdateDiagnosticSetting.json | 133 ++-- .../monitor/resource-manager/readme.md | 1 + 6 files changed, 870 insertions(+), 108 deletions(-) create mode 100644 specification/monitor/resource-manager/microsoft.insights/2015-04-01/examples/OperationList.json create mode 100644 specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json diff --git a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/examples/OperationList.json b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/examples/OperationList.json new file mode 100644 index 000000000000..ecb517307f53 --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/examples/OperationList.json @@ -0,0 +1,678 @@ +{ + "parameters":{ + "api-version":"2015-04-01" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "name":"Microsoft.Insights/Operations/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Operations", + "operation":"Operations read", + "description":"Reading operations" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/MetricDefinitions/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metric Definitions", + "operation":"Metric definitions read", + "description":"Read metric definitions" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Metrics/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metrics", + "operation":"Metrics read", + "description":"Read metrics" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule write", + "description":"Writing to an alert rule configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule delete", + "description":"Deleting an alert rule configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule read", + "description":"Reading an alert rule configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/MetricAlerts/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metric alerts", + "operation":"Metric alert write", + "description":"Writing a metric alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/MetricAlerts/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metric alerts", + "operation":"Metric alert delete", + "description":"Deleting a metric alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/MetricAlerts/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metric alerts", + "operation":"Metric alert read", + "description":"Reading a metric alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Autoscale", + "operation":"Autoscale Setting write", + "description":"Writing to an autoscale setting configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Autoscale", + "operation":"Autoscale Setting delete", + "description":"Deleting an autoscale setting configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Autoscale", + "operation":"Autoscale Setting read", + "description":"Reading an autoscale setting configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Incidents/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rule Incident resource", + "operation":"Alert Rule Incidents read", + "description":"Reading an alert rule incident configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/providers/Microsoft.Insights/MetricDefinitions/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Metric Definitions", + "operation":"Metric definitions read", + "description":"Read metric definitions" + }, + "properties":{ + "serviceSpecification":{ + "metricSpecifications":[ + { + "name":"ObservedMetricValue", + "displayName":"Observed Metric Value", + "displayDescription":"The value computed by autoscale when executed", + "unit":"Count", + "aggregationType":"Average", + "availabilities":null, + "fillGapWithZero":false, + "category":"Metric", + "dimensions":[ + { + "name":"MetricTriggerSource", + "displayName":"Metric Trigger Source", + "toBeExportedForShoebox":true + } + ] + }, + { + "name":"MetricThreshold", + "displayName":"Metric Threshold", + "displayDescription":"The configured autoscale threshold when autoscale ran.", + "unit":"Count", + "aggregationType":"Average", + "availabilities":null, + "fillGapWithZero":false, + "category":"Metric", + "dimensions":[ + { + "name":"MetricTriggerRule", + "displayName":"Metric Trigger Rule", + "toBeExportedForShoebox":true + } + ] + }, + { + "name":"ObservedCapacity", + "displayName":"Observed Capacity", + "displayDescription":"The capacity reported to autoscale when it executed.", + "unit":"Count", + "aggregationType":"Average", + "availabilities":null, + "fillGapWithZero":false, + "category":"ScaleAction", + "dimensions":null + }, + { + "name":"ScaleActionsInitiated", + "displayName":"Scale Actions Initiated", + "displayDescription":"The direction of the scale operation.", + "unit":"Count", + "aggregationType":"Total", + "availabilities":null, + "fillGapWithZero":true, + "category":"ScaleAction", + "dimensions":[ + { + "name":"ScaleDirection", + "displayName":"Scale Direction", + "toBeExportedForShoebox":true + } + ] + } + ], + "logSpecifications":null, + "legacyMetricSpecifications":null + } + } + }, + { + "name":"Microsoft.Insights/ActionGroups/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Action groups", + "operation":"Action group write", + "description":"Writing an action group" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActionGroups/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Action groups", + "operation":"Action group delete", + "description":"Deleting an action group" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActionGroups/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Action groups", + "operation":"Action group read", + "description":"Reading an action group" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActivityLogAlerts/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Activity log alert", + "operation":"Activity log alert read", + "description":"Reading an activity log alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActivityLogAlerts/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Activity log alert", + "operation":"Activity log alert delete", + "description":"Deleting an activity log alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActivityLogAlerts/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Activity log alert", + "operation":"Activity log alert read", + "description":"Reading an activity log alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ActivityLogAlerts/Activated/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Activity Log Alert", + "operation":"Activity Log Alert Activated", + "description":"Triggered the Activity Log Alert" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/EventCategories/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Event category", + "operation":"Event category read", + "description":"Reading an event category" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/eventtypes/values/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Events", + "operation":"Event types management values read", + "description":"Read management event type values" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/eventtypes/digestevents/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Digest events", + "operation":"Event types management digest read", + "description":"Read management event type digest" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/DiagnosticSettings/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Diagnostic settings", + "operation":"Diagnostic settings write", + "description":"Writing to diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/DiagnosticSettings/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Diagnostic settings", + "operation":"Diagnostic settings delete", + "description":"Deleting diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/DiagnosticSettings/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Diagnostic settings", + "operation":"Diagnostic settings read", + "description":"Reading a diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ExtendedDiagnosticSettings/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Extended Diagnostic settings", + "operation":"Extended Diagnostic settings write", + "description":"Writing to extended diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ExtendedDiagnosticSettings/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Extended Diagnostic settings", + "operation":"Extended Diagnostic settings delete", + "description":"Deleting extended diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/ExtendedDiagnosticSettings/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Extended Diagnostic settings", + "operation":"Extended Diagnostic settings read", + "description":"Reading a extended diagnostic settings configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/LogProfiles/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Log Profiles", + "operation":"Log profile write", + "description":"Writing to a log profile configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/LogProfiles/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Log Profiles", + "operation":"Log profile delete", + "description":"Delete log profiles configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/LogProfiles/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Log Profiles", + "operation":"Log profile read", + "description":"Read log profiles" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/LogDefinitions/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Log Definitions", + "operation":"Log Definitions read", + "description":"Read log definitions" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/Scaleup/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Autoscale", + "operation":"Autoscale scale up operation", + "description":"Autoscale scale up operation" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AutoscaleSettings/Scaledown/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Autoscale", + "operation":"Autoscale scale down operation", + "description":"Autoscale scale down operation" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Activated/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule activated", + "description":"Alert Rule activated" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Resolved/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule resolved", + "description":"Alert Rule resolved" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/AlertRules/Throttled/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Alert Rules", + "operation":"Alert Rule throttled", + "description":"Alert rule is throttled" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Register/Action", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Microsoft.Insights", + "operation":"Register Microsoft.Insights", + "description":"Register the microsoft insights provider" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Components/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Application insights components", + "operation":"Application insights component write", + "description":"Writing to an application insights component configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Components/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Application insights components", + "operation":"Application insights component delete", + "description":"Deleting an application insights component configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Components/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Application insights components", + "operation":"Application insights component read", + "description":"Reading an application insights component configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Webtests/Write", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Web tests", + "operation":"Webtest write", + "description":"Writing to a webtest configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Webtests/Delete", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Web tests", + "operation":"Webtest delete", + "description":"Deleting a webtest configuration" + }, + "properties":{ + + } + }, + { + "name":"Microsoft.Insights/Webtests/Read", + "display":{ + "publisher":"Microsoft", + "provider":"Microsoft Monitoring Insights", + "resource":"Web tests", + "operation":"Webtest read", + "description":"Reading a webtest configuration" + }, + "properties":{ + + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json new file mode 100644 index 000000000000..d7bb4d30467b --- /dev/null +++ b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json @@ -0,0 +1,116 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2015-04-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": { + "/providers/microsoft.insights/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available operations from Microsoft.Insights provider.", + "operationId": "Operations_List", + "x-ms-examples": { + "Get a list of operations for a resource provider": { + "$ref": "./examples/OperationList.json" + } + }, + "parameters": [{ + "$ref": "#/parameters/ApiVersionParameter" + }], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + } + } + } + } + }, + "definitions": { + "OperationListResult": { + "description": "Result of the request to list Microsoft.Insights 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 operations supported by the Microsoft.Insights provider." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + }, + "Operation": { + "description": "Microsoft Insights API operation definition.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Insights", + "type": "string" + }, + "resource": { + "description": "Resource on which the operation is performed: AlertRules, Autoscale, etc.", + "type": "string" + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string" + } + } + } + } + }, + }, + "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/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json index 4744dc4b70b1..a650ffab3b8c 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettingsCategories_API.json @@ -149,7 +149,7 @@ } }, "definitions": { - "Resource": { + "ProxyOnlyResource": { "properties": { "id": { "type": "string", @@ -165,27 +165,10 @@ "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" } }, - "required": [ - "location" - ], "x-ms-azure-resource": true, - "description": "An azure resource object" + "description": "A proxy only azure resource object" }, "DiagnosticSettingsCategory": { "properties": { @@ -205,7 +188,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "#/definitions/ProxyOnlyResource" } ], "properties": { @@ -214,7 +197,7 @@ "$ref": "#/definitions/DiagnosticSettingsCategory" } }, - "description": "Description of diagnostic setting category." + "description": "The diagnostic settings category resource." }, "DiagnosticSettingsCategoryResourceCollection": { "properties": { diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json index da506aa65d1a..b205da22247c 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/diagnosticsSettings_API.json @@ -299,7 +299,7 @@ } }, "definitions": { - "Resource": { + "ProxyOnlyResource": { "properties": { "id": { "type": "string", @@ -315,27 +315,10 @@ "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" } }, - "required": [ - "location" - ], "x-ms-azure-resource": true, - "description": "An azure resource object" + "description": "A proxy only azure resource object" }, "RetentionPolicy": { "properties": { @@ -433,7 +416,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/Resource" + "$ref": "#/definitions/ProxyOnlyResource" } ], "properties": { @@ -442,7 +425,7 @@ "$ref": "#/definitions/DiagnosticSettings" } }, - "description": "Description of diagnostic setting resource." + "description": "The diagnostic setting resource." }, "DiagnosticSettingsResourceCollection": { "properties": { diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json index 9d197db3ff62..004d79e69c17 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json +++ b/specification/monitor/resource-manager/microsoft.insights/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json @@ -1,73 +1,74 @@ { + "parameters": { + "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "name": "mysetting", + "api-version": "2017-05-01-preview", "parameters": { - "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", - "api-version": "2017-05-01-preview", - "parameters": { - "location":"", - "properties": { - "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - "workspaceId":"", - "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", - "eventHubName": "myeventhub", - "metrics": [ - { - "category":"WorkflowMetrics", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ], - "logs": [ - { - "category":"WorkflowRuntime", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ] + "location":"", + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId":"", + "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 } - } - }, - "responses": { - "200": { - "headers": { }, - "body": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type":"", - "name":"mysetting", - "location":"", - "tags":null, - "properties": { - "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - "workspaceId":"", - "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", - "eventHubName": "myeventhub", - "metrics": [ - { - "category":"WorkflowMetrics", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ], - "logs": [ - { - "category":"WorkflowRuntime", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ] - } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", + "type":"", + "name":"mysetting", + "location":"", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "workspaceId":"", + "eventHubAuthorizationRuleId":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule", + "eventHubName": "myeventhub", + "metrics": [ + { + "category":"WorkflowMetrics", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] } + } } + } } \ No newline at end of file diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index fa4789d0ce88..bc774f514e63 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -39,6 +39,7 @@ These settings apply only when `--tag=package-2017-08` is specified on the comma ``` yaml $(tag) == 'package-2017-08' input-file: - microsoft.insights/2015-04-01/autoscale_API.json +- microsoft.insights/2015-04-01/operations_API.json - microsoft.insights/2016-03-01/alertRulesIncidents_API.json - microsoft.insights/2016-03-01/alertRules_API.json - microsoft.insights/2016-03-01/logProfiles_API.json From ece23e40218c3e6b9bb42bfd19cfe12fd371a305 Mon Sep 17 00:00:00 2001 From: Sergey Shandar Date: Fri, 15 Sep 2017 17:53:37 -0700 Subject: [PATCH 5/6] Fix JSON errors --- .../microsoft.insights/2015-04-01/operations_API.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json index d7bb4d30467b..fac4713384e6 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json @@ -47,8 +47,7 @@ }, "parameters": [{ "$ref": "#/parameters/ApiVersionParameter" - }], - "responses": { + }],z "responses": { "200": { "description": "OK. The request has succeeded.", "schema": { @@ -102,7 +101,7 @@ } } } - }, + } }, "parameters": { "ApiVersionParameter": { @@ -113,4 +112,4 @@ "description": "Client Api Version." } } -} \ No newline at end of file +} From 15c38b04012b3167f1bc358671f1ddadf2496e00 Mon Sep 17 00:00:00 2001 From: Sergey Shandar Date: Fri, 15 Sep 2017 18:05:40 -0700 Subject: [PATCH 6/6] Fix JSON --- .../microsoft.insights/2015-04-01/operations_API.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json index fac4713384e6..1aac87411341 100644 --- a/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json +++ b/specification/monitor/resource-manager/microsoft.insights/2015-04-01/operations_API.json @@ -47,7 +47,8 @@ }, "parameters": [{ "$ref": "#/parameters/ApiVersionParameter" - }],z "responses": { + }], + "responses": { "200": { "description": "OK. The request has succeeded.", "schema": {