diff --git a/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetric.json b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetric.json
new file mode 100644
index 000000000000..14a12faa011b
--- /dev/null
+++ b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetric.json
@@ -0,0 +1,95 @@
+{
+ "parameters": {
+ "resourceUri": "subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default",
+ "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
+ "metric": "BlobCapacity",
+ "$filter": "BlobType eq '*'",
+ "top": "3",
+ "orderby": "Average asc",
+ "aggregation": "Average,count",
+ "interval": "PT1M",
+ "api-version": "2017-05-01-preview"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "cost": 0,
+ "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
+ "interval": "PT1M",
+ "value": [
+ {
+ "id": "/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity",
+ "type": "Microsoft.Insights/metrics",
+ "name": {
+ "value": "BlobCapacity",
+ "localizedValue": "Blob Capacity"
+ },
+ "unit": "Bytes",
+ "timeseries": [
+ {
+ "metadatavalues": [
+ {
+ "name": {
+ "value": "blobtype",
+ "localizedValue": "blobtype"
+ },
+ "value": "PageBlob"
+ }
+ ],
+ "data": [
+ {
+ "timeStamp": "2017-04-14T02:20:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:21:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:22:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:23:00Z",
+ "count": 1.0,
+ "average": 0.0
+ }
+ ]
+ },
+ {
+ "metadatavalues": [
+ {
+ "name": {
+ "value": "blobtype",
+ "localizedValue": "blobtype"
+ },
+ "value": "BlockBlob"
+ }
+ ],
+ "data": [
+ {
+ "timeStamp": "2017-04-14T02:20:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:21:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:22:00Z",
+ "count": 0.0
+ },
+ {
+ "timeStamp": "2017-04-14T02:23:00Z",
+ "count": 1.0,
+ "average": 245.0
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricDefinitions.json b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricDefinitions.json
new file mode 100644
index 000000000000..213550d9e048
--- /dev/null
+++ b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricDefinitions.json
@@ -0,0 +1,383 @@
+{
+ "parameters": {
+ "resourceUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions",
+ "api-version": "2017-05-01-preview"
+ },
+ "responses": {
+ "200": {
+ "body":
+ {
+ "value": [{
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/CpuTime",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "CpuTime",
+ "localizedValue": "CPU Time"
+ },
+ "isDimensionRequired": false,
+ "unit": "Seconds",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Requests",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Requests",
+ "localizedValue": "Requests"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesReceived",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "BytesReceived",
+ "localizedValue": "Data In"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesSent",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "BytesSent",
+ "localizedValue": "Data Out"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http101",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http101",
+ "localizedValue": "Http 101"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http2xx",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http2xx",
+ "localizedValue": "Http 2xx"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http3xx",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http3xx",
+ "localizedValue": "Http 3xx"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http401",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http401",
+ "localizedValue": "Http 401"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http403",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http403",
+ "localizedValue": "Http 403"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http404",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http404",
+ "localizedValue": "Http 404"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http406",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http406",
+ "localizedValue": "Http 406"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http4xx",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http4xx",
+ "localizedValue": "Http 4xx"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http5xx",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "Http5xx",
+ "localizedValue": "Http Server Errors"
+ },
+ "isDimensionRequired": false,
+ "unit": "Count",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/MemoryWorkingSet",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "MemoryWorkingSet",
+ "localizedValue": "Memory working set"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Average",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageMemoryWorkingSet",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "AverageMemoryWorkingSet",
+ "localizedValue": "Average memory working set"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Average",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageResponseTime",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "AverageResponseTime",
+ "localizedValue": "Average Response Time"
+ },
+ "isDimensionRequired": false,
+ "unit": "Seconds",
+ "primaryAggregationType": "Average",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricMetadata.json b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricMetadata.json
new file mode 100644
index 000000000000..ef66c6b3e529
--- /dev/null
+++ b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/examples/GetMetricMetadata.json
@@ -0,0 +1,56 @@
+{
+ "parameters": {
+ "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
+ "metric": "BlobCapacity",
+ "$filter": "BlobType eq '*'",
+ "top": "3",
+ "orderby": "Average asc",
+ "aggregation": "Average,count",
+ "interval": "PT1M",
+ "resulttype": "metadata",
+ "resourceUri": "/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default",
+ "api-version": "2017-05-01-preview"
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "timespan": "2017-04-14T02:20:00Z/2017-04-14T04:20:00Z",
+ "value": [
+ {
+ "id": "/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity",
+ "type": "Microsoft.Insights/metrics",
+ "name": {
+ "value": "BlobCapacity",
+ "localizedValue": "Blob Capacity"
+ },
+ "unit": "Bytes",
+ "timeseries": [
+ {
+ "metadatavalues": [
+ {
+ "name": {
+ "value": "blobtype",
+ "localizedValue": "blobtype"
+ },
+ "value": "BlockBlob"
+ }
+ ]
+ },
+ {
+ "metadatavalues": [
+ {
+ "name": {
+ "value": "blobtype",
+ "localizedValue": "blobtype"
+ },
+ "value": "PageBlob"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metricDefinitions_API.json b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metricDefinitions_API.json
new file mode 100644
index 000000000000..f6498a6249da
--- /dev/null
+++ b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metricDefinitions_API.json
@@ -0,0 +1,297 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "MonitorClient",
+ "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/metricDefinitions": {
+ "get": {
+ "tags": [
+ "MetricDefinitions"
+ ],
+ "operationId": "MetricDefinitions_List",
+ "description": "Lists the metric definitions for the 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 the list of metric definitions",
+ "schema": {
+ "$ref": "#/definitions/MetricDefinitionCollection"
+ },
+ "examples": {
+ "application/json": {
+ "value": [{
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/CpuTime",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "CpuTime",
+ "localizedValue": "CPU Time"
+ },
+ "isDimensionRequired": false,
+ "unit": "Seconds",
+ "primaryAggregationType": "Total",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/MemoryWorkingSet",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "MemoryWorkingSet",
+ "localizedValue": "Memory working set"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Average",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }, {
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageMemoryWorkingSet",
+ "resourceId": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest",
+ "name": {
+ "value": "AverageMemoryWorkingSet",
+ "localizedValue": "Average memory working set"
+ },
+ "isDimensionRequired": false,
+ "unit": "Bytes",
+ "primaryAggregationType": "Average",
+ "metricAvailabilities": [{
+ "timeGrain": "PT1M",
+ "retention": "P30D"
+ }, {
+ "timeGrain": "PT1H",
+ "retention": "P30D"
+ }
+ ],
+ "dimensions": [{
+ "value": "Instance",
+ "localizedValue": "Instance"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "x-ms-examples": {
+ "Get Metric Definitions without filter": { "$ref": "./examples/GetMetricDefinitions.json" }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "LocalizableString": {
+ "required": [ "value" ],
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "the invariant value."
+ },
+ "localizedValue": {
+ "type": "string",
+ "description": "the locale specific value."
+ }
+ },
+ "description": "The localizable string class."
+ },
+ "MetricAvailability": {
+ "properties": {
+ "timeGrain": {
+ "type": "string",
+ "format": "duration",
+ "description": "the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc."
+ },
+ "retention": {
+ "type": "string",
+ "format": "duration",
+ "description": "the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc."
+ }
+ },
+ "description": "Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain."
+ },
+ "Unit": {
+ "type": "string",
+ "description": "the unit of the metric.",
+ "enum": [
+ "Count",
+ "Bytes",
+ "Seconds",
+ "CountPerSecond",
+ "BytesPerSecond",
+ "Percent",
+ "MilliSeconds"
+ ],
+ "x-ms-enum": {
+ "name": "Unit",
+ "modelAsString": false
+ }
+ },
+ "MetricDefinition": {
+ "properties": {
+ "isDimensionRequired": {
+ "type": "boolean",
+ "description": "Flag to indicate whether the dimension is required."
+ },
+ "resourceId": {
+ "type": "string",
+ "description": "the resource identifier of the resource that emitted the metric."
+ },
+ "name": {
+ "$ref": "#/definitions/LocalizableString",
+ "description": "the name and the display name of the metric, i.e. it is a localizable string."
+ },
+ "unit": {
+ "$ref": "#/definitions/Unit",
+ "description": "the unit of the metric."
+ },
+ "primaryAggregationType": {
+ "type": "string",
+ "description": "the primary aggregation type value defining how to use the values for display.",
+ "enum": [
+ "None",
+ "Average",
+ "Count",
+ "Minimum",
+ "Maximum",
+ "Total"
+ ],
+ "x-ms-enum": {
+ "name": "AggregationType",
+ "modelAsString": false
+ }
+ },
+ "metricAvailabilities": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MetricAvailability"
+ },
+ "description": "the collection of what aggregation intervals are available to be queried."
+ },
+ "id": {
+ "type": "string",
+ "description": "the resource identifier of the metric definition."
+ },
+ "dimensions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/LocalizableString"
+ },
+ "description": "the name and the display name of the dimension, i.e. it is a localizable string."
+ }
+ },
+ "description": "Metric definition class specifies the metadata for a metric."
+ },
+ "MetricDefinitionCollection": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MetricDefinition"
+ },
+ "description": "the values for the metric definitions."
+ }
+ },
+ "required": ["value"],
+ "description": "Represents collection of metric definitions."
+ },
+ "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",
+ "x-ms-skip-url-encoding": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metrics_API.json b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metrics_API.json
new file mode 100644
index 000000000000..9ed9f64f50ae
--- /dev/null
+++ b/specification/monitor/data-plane/microsoft.insights/2017-05-01-preview/metrics_API.json
@@ -0,0 +1,404 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "MonitorClient",
+ "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/metrics": {
+ "get": {
+ "tags": [
+ "Metrics"
+ ],
+ "operationId": "Metrics_List",
+ "description": "**Lists the metric values for a resource**.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/ResourceUriParameter"
+ },
+ {
+ "$ref": "#/parameters/TimespanParameter"
+ },
+ {
+ "$ref": "#/parameters/IntervalParameter"
+ },
+ {
+ "$ref": "#/parameters/MetricParameter"
+ },
+ {
+ "$ref": "#/parameters/AggregationsParameter"
+ },
+ {
+ "$ref": "#/parameters/TopParameter"
+ },
+ {
+ "$ref": "#/parameters/OrderByParameter"
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "type": "string",
+ "description": "The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.",
+ "required": false
+ },
+ {
+ "$ref": "#/parameters/ResultTypeParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "default": {
+ "description": "Error response describing why the operation failed.",
+ "schema": {
+ "$ref": "#/definitions/ErrorResponse"
+ }
+ },
+ "200": {
+ "description": "Successful request to get the list of metric values.",
+ "schema": {
+ "$ref": "#/definitions/Response"
+ },
+ "examples": {
+ "application/json": {
+ "cost": 0,
+ "timespan": "2017-08-10T21:44:34Z/2017-08-10T22:44:34Z",
+ "interval": "PT1M",
+ "value": [{
+ "id": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/Microsoft.Insights/metrics/CpuTime",
+ "type": "Microsoft.Insights/metrics",
+ "name": {
+ "value": "CpuTime",
+ "localizedValue": "CPU Time"
+ },
+ "unit": "Seconds",
+ "timeseries": [{
+ "metadatavalues": [],
+ "data": [{
+ "timeStamp": "2017-08-10T21:44:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:45:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:46:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:47:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:48:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:49:00Z",
+ "total": 0.0
+ }, {
+ "timeStamp": "2017-08-10T21:50:00Z",
+ "total": 0.0
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ },
+ "x-ms-odata": "#/definitions/MetadataValue",
+ "x-ms-examples": {
+ "Get Metric for data": { "$ref": "./examples/GetMetric.json" },
+ "Get Metric for metadata": { "$ref": "./examples/GetMetricMetadata.json" }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "LocalizableString": {
+ "required": [ "value" ],
+ "properties": {
+ "value": {
+ "type": "string",
+ "description": "the invariant value."
+ },
+ "localizedValue": {
+ "type": "string",
+ "description": "the locale specific value."
+ }
+ },
+ "description": "The localizable string class."
+ },
+ "Unit": {
+ "type": "string",
+ "description": "the unit of the metric.",
+ "enum": [
+ "Count",
+ "Bytes",
+ "Seconds",
+ "CountPerSecond",
+ "BytesPerSecond",
+ "Percent",
+ "MilliSeconds"
+ ],
+ "x-ms-enum": {
+ "name": "Unit",
+ "modelAsString": false
+ }
+ },
+ "MetricValue": {
+ "required": [ "timeStamp" ],
+ "properties": {
+ "timeStamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "the timestamp for the metric value in ISO 8601 format."
+ },
+ "average": {
+ "type": "number",
+ "format": "double",
+ "description": "the average value in the time range."
+ },
+ "minimum": {
+ "type": "number",
+ "format": "double",
+ "description": "the least value in the time range."
+ },
+ "maximum": {
+ "type": "number",
+ "format": "double",
+ "description": "the greatest value in the time range."
+ },
+ "total": {
+ "type": "number",
+ "format": "double",
+ "description": "the sum of all of the values in the time range."
+ },
+ "count": {
+ "type": "integer",
+ "format": "int64",
+ "description": "the number of samples in the time range. Can be used to determine the number of values that contributed to the average value."
+ }
+ },
+ "description": "Represents a metric value."
+ },
+ "MetadataValue": {
+ "properties": {
+ "name": {
+ "$ref": "#/definitions/LocalizableString",
+ "description": "the name of the metadata."
+ },
+ "value": {
+ "type": "string",
+ "description": "the value of the metadata."
+ }
+ },
+ "description": "Represents a metric metadata value."
+ },
+ "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"
+ }
+ }
+ },
+ "Response": {
+ "type": "object",
+ "properties": {
+ "cost": {
+ "type": "number",
+ "format": "int32",
+ "minimum": 0,
+ "description": "The integer value representing the cost of the query, for data case."
+ },
+ "timespan": {
+ "type": "string",
+ "description": "The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested."
+ },
+ "interval": {
+ "type": "string",
+ "format": "duration",
+ "description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made."
+ },
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Metric"
+ },
+ "description": "the value of the collection."
+ }
+ },
+ "required": [ "timespan", "value" ],
+ "description": "The response to a metrics query."
+ },
+ "Metric": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "the metric Id."
+ },
+ "type": {
+ "type": "string",
+ "description": "the resource type of the metric resource."
+ },
+ "name": {
+ "$ref": "#/definitions/LocalizableString",
+ "description": "the name and the display name of the metric, i.e. it is localizable string."
+ },
+ "unit": {
+ "$ref": "#/definitions/Unit",
+ "description": "the unit of the metric."
+ },
+ "timeseries": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TimeSeriesElement"
+ },
+ "description": "the time series returned when a data query is performed."
+ }
+ },
+ "required": [ "id", "type", "name", "unit", "timeseries" ],
+ "description": "The result data of a query."
+ },
+ "TimeSeriesElement": {
+ "type": "object",
+ "properties": {
+ "metadatavalues": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MetadataValue"
+ },
+ "description": "the metadata values returned if $filter was specified in the call."
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/MetricValue"
+ },
+ "description": "An array of data points representing the metric values. This is only returned if a result type of data is specified."
+ }
+ },
+ "description": "A time series result type. The discriminator value is always TimeSeries in this case."
+ }
+ },
+ "parameters": {
+ "ResourceUriParameter": {
+ "name": "resourceUri",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The identifier of the resource.",
+ "x-ms-parameter-location": "method",
+ "x-ms-skip-url-encoding": true
+ },
+ "TimespanParameter": {
+ "name": "timespan",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.",
+ "x-ms-parameter-location": "method"
+ },
+ "IntervalParameter": {
+ "name": "interval",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "duration",
+ "description": "The interval (i.e. timegrain) of the query.",
+ "x-ms-parameter-location": "method"
+ },
+ "MetricParameter": {
+ "name": "metric",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The name of the metric to retrieve.",
+ "x-ms-parameter-location": "method"
+ },
+ "AggregationsParameter": {
+ "name": "aggregation",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The list of aggregation types (comma separated) to retrieve.",
+ "x-ms-parameter-location": "method"
+ },
+ "TopParameter": {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "number",
+ "format": "int32",
+ "description": "The maximum number of records to retrieve.\nValid only if $filter is specified.\nDefaults to 10.",
+ "x-ms-parameter-location": "method"
+ },
+ "OrderByParameter": {
+ "name": "$orderby",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The aggregation to use for sorting results and the direction of the sort.\nOnly one order can be specified.\nExamples: sum asc.",
+ "x-ms-parameter-location": "method"
+ },
+ "ResultTypeParameter": {
+ "name": "resultType",
+ "in": "query",
+ "type": "string",
+ "enum": [
+ "Data",
+ "Metadata"
+ ],
+ "x-ms-enum": {
+ "name": "ResultType",
+ "modelAsString": false
+ },
+ "description": "Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.",
+ "x-ms-parameter-location": "method",
+ "required": false
+ },
+ "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/data-plane/readme.md b/specification/monitor/data-plane/readme.md
index 5d75d21b2f96..e71806bd62c9 100644
--- a/specification/monitor/data-plane/readme.md
+++ b/specification/monitor/data-plane/readme.md
@@ -28,9 +28,22 @@ These are the global settings for the MonitorClient API.
title: MonitorClient
description: Monitor Client
openapi-type: data-plane
-tag: package-2016-09
+tag: package-2017-05
```
+### Tag: package-2017-05
+
+These settings apply only when `--tag=package-2017-05` is specified on the command line.
+
+``` yaml $(tag) == 'package-2017-05'
+input-file:
+- microsoft.insights/2014-04-01/usageMetrics_API.json
+- microsoft.insights/2015-04-01/activityLogs_API.json
+- microsoft.insights/2015-04-01/eventCategories_API.json
+- microsoft.insights/2015-04-01/tenantActivityLogs_API.json
+- microsoft.insights/2017-05-01-preview/metricDefinitions_API.json
+- microsoft.insights/2017-05-01-preview/metrics_API.json
+```
### Tag: package-2016-09
diff --git a/specification/monitor/resource-manager/microsoft.insights/2017-04-01/activityLogAlerts_API.json b/specification/monitor/resource-manager/microsoft.insights/2017-04-01/activityLogAlerts_API.json
index 0da68f559dda..1fa4b24856c0 100644
--- a/specification/monitor/resource-manager/microsoft.insights/2017-04-01/activityLogAlerts_API.json
+++ b/specification/monitor/resource-manager/microsoft.insights/2017-04-01/activityLogAlerts_API.json
@@ -204,7 +204,7 @@
}
},
"x-ms-examples": {
- "Path an activity log alert": {
+ "Patch an activity log alert": {
"$ref": "./examples/patchActivityLogAlert.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
```