From 0e0a07ba9e7d94b5d32f5417a2c96bd4449dfd40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 23 Nov 2016 15:15:46 -0800 Subject: [PATCH 01/46] Improving examples captured using Fiddler and changing the type for two parameters to fix a serialization/deserialization bug --- .../insightsManagementClient_Autoscale.json | 833 ++++++++++++------ ...sManagementClient_DiagnosticsSettings.json | 111 ++- .../insightsManagementClient_AlertRules.json | 263 +++--- .../insightsManagementClient_LogProfiles.json | 78 +- .../insightsClient_MetricDefinitions.json | 82 +- .../swagger/insightsClient_Metrics.json | 44 +- 6 files changed, 906 insertions(+), 505 deletions(-) diff --git a/arm-insights/2015-04-01/swagger/insightsManagementClient_Autoscale.json b/arm-insights/2015-04-01/swagger/insightsManagementClient_Autoscale.json index d465c17c8544..e3bf47260700 100644 --- a/arm-insights/2015-04-01/swagger/insightsManagementClient_Autoscale.json +++ b/arm-insights/2015-04-01/swagger/insightsManagementClient_Autoscale.json @@ -44,79 +44,142 @@ }, "examples": { "application/json": { - "value": [ { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/Microsoft.insights/autoscalesettings/webfrontend-norapp-norapp", - "name": "webfrontend-norapp-norapp", - "type": "Microsoft.Insights/autoscaleSettings", - "location": "East US", - "tags": { }, - "profiles": [ { - "name": "Day", - "capacity": { - "minimum": "1", - "maximum": "5", - "default": "4" + "value" : [ + { + "id" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name" : "MySetting", + "type" : "Microsoft.Insights/autoscaleSettings", + "location" : "West US", + "tags" : { + "$type" : "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" }, - "rules": [ { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "timeGrain": "PT5M", - "statistic": "Average", - "timeWindow": "PT45M", - "timeAggregation": "Average", - "operator": "GreaterThanOrEqual", - "threshold": 60 - }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "2", - "cooldown": "PT20M" - } - } ], - "recurrence": { - "frequency": "Week", - "schedule": { - "timeZone": "Pacific Standard Time", - "days": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" - ], - "hours": [ 8 ], - "minutes": [ 0 ] - } - } - } ], - "enabled": true, - "targetResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/icrosoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "notifications": [ - { - "operation": "Scale", - "email": { - "sendToSubscriptionAdministrator": false, - "sendToSubscriptionCoAdministrators": false, - "customEmails": [ - "user1@mycompany.com", - "user2@mycompany.com" - ] - }, - "webhooks": [ - { - "serviceUri": "https://foo.webhook.example.com?token=abcd1234", - "properties": { - "optional_key1": "optional_value1", - "optional_key2": "optional_value2" + "properties" : { + "profiles" : [{ + "name" : "adios", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricNamespace" : "", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricNamespace" : "", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "fixedDate" : { + "timeZone" : "UTC", + "start" : "2015-03-05T14:00:00Z", + "end" : "2015-03-05T14:30:00Z" } + }, { + "name" : "saludos", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricNamespace" : "", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricNamespace" : "", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "recurrence" : { + "frequency" : "Week", + "schedule" : { + "timeZone" : "UTC", + "days" : ["1"], + "hours" : [5], + "minutes" : [15] + } + } + } + ], + "enabled" : true, + "name" : "MySetting", + "targetResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications" : [{ + "operation" : "Scale", + "email" : { + "sendToSubscriptionAdministrator" : true, + "sendToSubscriptionCoAdministrators" : true, + "customEmails" : ["gu@ms.com", "ge@ns.net"] + }, + "webhooks" : [{ + "serviceUri" : "http://myservice.com", + "properties" : {} + } + ] } ] } - ] - }], + } + ], "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" } } @@ -166,77 +229,155 @@ }, "examples": { "application/json": { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.insights/autoscalesettings/webfrontend-norapp-norapp", - "name": "webfrontend-norapp-norapp", - "type": "Microsoft.Insights/autoscaleSettings", - "location": "East US", - "tags": { }, - "profiles": [ { - "name": "Day", - "capacity": { - "minimum": "1", - "maximum": "5", - "default": "4" - }, - "rules": [ { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "timeGrain": "PT5M", - "statistic": "Average", - "timeWindow": "PT45M", - "timeAggregation": "Average", - "operator": "GreaterThanOrEqual", - "threshold": 60 + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "2", - "cooldown": "PT20M" - } - } ], - "recurrence": { - "frequency": "Week", - "schedule": { - "timeZone": "Pacific Standard Time", - "days": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } ], - "hours": [ 8 ], - "minutes": [ 0 ] - } - } - } ], - "enabled": true, - "targetResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "notifications": [ - { - "operation": "Scale", - "email": { - "sendToSubscriptionAdministrator": false, - "sendToSubscriptionCoAdministrators": false, - "customEmails": [ - "user1@mycompany.com", - "user2@mycompany.com" + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 ] - }, - "webhooks": [ - { - "serviceUri": "https://foo.webhook.example.com?token=abcd1234", - "properties": { - "optional_key1": "optional_value1", - "optional_key2": "optional_value2" } } - ] - } - ] + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } } } }, @@ -247,77 +388,155 @@ }, "examples": { "application/json": { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.insights/autoscalesettings/webfrontend-norapp-norapp", - "name": "webfrontend-norapp-norapp", - "type": "Microsoft.Insights/autoscaleSettings", - "location": "East US", - "tags": { }, - "profiles": [ { - "name": "Day", - "capacity": { - "minimum": "1", - "maximum": "5", - "default": "4" - }, - "rules": [ { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "timeGrain": "PT5M", - "statistic": "Average", - "timeWindow": "PT45M", - "timeAggregation": "Average", - "operator": "GreaterThanOrEqual", - "threshold": 60 + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "2", - "cooldown": "PT20M" - } - } ], - "recurrence": { - "frequency": "Week", - "schedule": { - "timeZone": "Pacific Standard Time", - "days": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } ], - "hours": [ 8 ], - "minutes": [ 0 ] - } - } - } ], - "enabled": true, - "targetResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/microsoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "notifications": [ - { - "operation": "Scale", - "email": { - "sendToSubscriptionAdministrator": false, - "sendToSubscriptionCoAdministrators": false, - "customEmails": [ - "user1@mycompany.com", - "user2@mycompany.com" + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 ] - }, - "webhooks": [ - { - "serviceUri": "https://foo.webhook.example.com?token=abcd1234", - "properties": { - "optional_key1": "optional_value1", - "optional_key2": "optional_value2" } } - ] - } - ] + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } } } } @@ -380,77 +599,155 @@ }, "examples": { "application/json": { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/Microsoft.insights/autoscalesettings/webfrontend-norapp-norapp", - "name": "webfrontend-norapp-norapp", - "type": "Microsoft.Insights/autoscaleSettings", - "location": "East US", - "tags": { }, - "profiles": [ { - "name": "Day", - "capacity": { - "minimum": "1", - "maximum": "5", - "default": "4" - }, - "rules": [ { - "metricTrigger": { - "metricName": "Percentage CPU", - "metricNamespace": "", - "metricResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/icrosoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "timeGrain": "PT5M", - "statistic": "Average", - "timeWindow": "PT45M", - "timeAggregation": "Average", - "operator": "GreaterThanOrEqual", - "threshold": 60 + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } }, - "scaleAction": { - "direction": "Increase", - "type": "ChangeCount", - "value": "2", - "cooldown": "PT20M" - } - } ], - "recurrence": { - "frequency": "Week", - "schedule": { - "timeZone": "Pacific Standard Time", - "days": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday" + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricNamespace":"", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } ], - "hours": [ 8 ], - "minutes": [ 0 ] - } - } - } ], - "enabled": true, - "targetResourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/norapp/providers/icrosoft.classicCompute/domainNames/norapp/availabilitySets/webfrontend", - "notifications": [ - { - "operation": "Scale", - "email": { - "sendToSubscriptionAdministrator": false, - "sendToSubscriptionCoAdministrators": false, - "customEmails": [ - "user1@mycompany.com", - "user2@mycompany.com" + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 ] - }, - "webhooks": [ - { - "serviceUri": "https://foo.webhook.example.com?token=abcd1234", - "properties": { - "optional_key1": "optional_value1", - "optional_key2": "optional_value2" } } - ] - } - ] + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } } } } @@ -654,7 +951,7 @@ "properties": { "timeZone": { "type": "string", - "description": "the time zone of the start and end times for the profile. See examples of valid timezone ids over here: https://msdn.microsoft.com/en-us/library/azure/dn931928.aspx" + "description": "the timezone of the start and end times for the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time" }, "start": { "type": "string", @@ -675,7 +972,7 @@ "properties": { "timeZone": { "type": "string", - "description": "the time zone for the hours of the profile. See examples of valid timezone are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time" + "description": "the timezone for the hours of the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time" }, "days": { "type": "array", diff --git a/arm-insights/2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json b/arm-insights/2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json index 095a96b1a434..32d3f8428f18 100644 --- a/arm-insights/2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json +++ b/arm-insights/2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json @@ -27,7 +27,8 @@ "$ref": "#/parameters/ResourceUriParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" }, + "$ref": "#/parameters/ApiVersionParameter" + }, { "$ref": "#/parameters/SubscriptionIdParameter" } @@ -40,37 +41,36 @@ }, "examples": { "application/json": { - "storageAccountId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/testStorageAcct", - "serviceBusRuleId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.ServiceBus/namespaces/testNamespace/authorizationrules/RootManageSharedAccessKey", - "workspaceId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", - "metrics": [ + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":null, + "name":"service", + "location":null, + "kind":null, + "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":null, + "metrics": [ { - "timeGrain": "PT1M", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } } - ], - "logs": [ - { - "category": "NetworkSecurityGroupEvent", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - }, + ], + "logs": [ { - "category": "NetworkSecurityGroupRuleCounter", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } } - ] + ] + } } } } @@ -94,7 +94,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettings" + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" }, "description": "Parameters supplied to the operation." }, @@ -110,37 +110,36 @@ }, "examples": { "application/json": { - "storageAccountId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/testStorageAcct", - "serviceBusRuleId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.ServiceBus/namespaces/testNamespace/authorizationrules/RootManageSharedAccessKey", - "workspaceId": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", - "metrics": [ + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":null, + "name":"service", + "location":null, + "kind":null, + "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":null, + "metrics": [ { - "timeGrain": "PT1M", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } } - ], - "logs": [ - { - "category": "NetworkSecurityGroupEvent", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - }, + ], + "logs": [ { - "category": "NetworkSecurityGroupRuleCounter", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } } - ] + ] + } } } } diff --git a/arm-insights/2016-03-01/swagger/insightsManagementClient_AlertRules.json b/arm-insights/2016-03-01/swagger/insightsManagementClient_AlertRules.json index 8c45cf8b7273..5a25b93d568a 100644 --- a/arm-insights/2016-03-01/swagger/insightsManagementClient_AlertRules.json +++ b/arm-insights/2016-03-01/swagger/insightsManagementClient_AlertRules.json @@ -47,41 +47,40 @@ ], "responses": { "200": { - "description": "Successful request to create or update an alert rule", + "description": "Successful request to update an alert rule", "schema": { "$ref": "#/definitions/AlertRuleResource" }, "examples": { "application/json": { - "location": "eastus", - "tags": { }, - "name": "CPUHigh Plan", - "description": "The average CPU is high across all the instances of Plan", - "isEnabled": true, - "condition": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Storage-NorthCentralUS/providers/Microsoft.Web/serverfarms/Plan", - "metricName": "CpuPercentage", - "operator": "GreaterThan" - }, - "threshold": 90, - "windowSize": "PT15M", - "timeAggregation": "Average" + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" }, - "actions": [ - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": ["email1@contoso.com","email2@contoso.com" ] + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" }, - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - "serviceUri": "http://contoso.com/", - "properties": { } - } - ] + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "provisioningState":"Succeeded", + "actions":[] + } } } }, @@ -92,35 +91,34 @@ }, "examples": { "application/json": { - "location": "eastus", - "tags": { }, - "name": "CPUHigh Plan", - "description": "The average CPU is high across all the instances of Plan", - "isEnabled": true, - "condition": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Storage-NorthCentralUS/providers/Microsoft.Web/serverfarms/Plan", - "metricName": "CpuPercentage", - "operator": "GreaterThan" - }, - "threshold": 90, - "windowSize": "PT15M", - "timeAggregation": "Average" + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" }, - "actions": [ - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": ["email1@contoso.com","email2@contoso.com" ] + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" }, - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - "serviceUri": "http://contoso.com/", - "properties": { } - } - ] + "lastUpdatedTime":"2016-11-23T21:21:40.3097118Z", + "provisioningState":"Succeeded", + "actions":[] + } } } } @@ -183,38 +181,35 @@ }, "examples": { "application/json": { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Web-NorthCentralUS/providers/microsoft.insights/alertrules/CPUHigh%20Plan", - "location": "eastus", - "tags": { }, - "name": "CPUHigh Plan", - "description": "The average CPU is high across all the instances of Plan", - "isEnabled": true, - "condition": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Storage-NorthCentralUS/providers/Microsoft.Web/serverfarms/Plan", - "metricName": "CpuPercentage", - "operator": "GreaterThan" - }, - "threshold": 90, - "windowSize": "PT15M", - "timeAggregation": "Average" + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin0", + "name":"chiricutin0", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" }, - "actions": [ - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": ["email1@contoso.com","email2@contoso.com" ] + "properties": { + "name":"chiricutin0", + "description":"Pura Vida 0", + "isEnabled":true, + "condition": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricNamespace":"", + "metricName":"Requests" + }, + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" }, - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - "serviceUri": "http://contoso.com/", - "properties": { } - } - ], - "lastUpdatedTime": "2015-01-24T00:21:53.3323416Z", - "provisioningState": "Succeeded" + "lastUpdatedTime":"2016-11-10T21:04:39.1082596Z", + "provisioningState":"Succeeded", + "actions":[] + } } } } @@ -251,39 +246,77 @@ "examples": { "application/json": { "value": [ - { - "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Web-NorthCentralUS/providers/microsoft.insights/alertrules/CPUHigh%20Plan", - "location": "eastus", - "tags": { }, - "name": "CPUHigh Plan", - "description": "The average CPU is high across all the instances of Plan", - "isEnabled": true, - "condition": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/Default-Storage-NorthCentralUS/providers/Microsoft.Web/serverfarms/Plan", - "metricName": "CpuPercentage", - "operator": "GreaterThan" + { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/{ruleName}", + "name":"{ruleName}", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"{ruleName}", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricNamespace":"", + "metricName":"Requests" + }, + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" }, - "threshold": 90, - "windowSize": "PT15M", - "timeAggregation": "Average" + "lastUpdatedTime":"2016-11-10T21:04:39.0005255Z", + "provisioningState":"Succeeded", + "actions": [ + { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners":true, + "customEmails": [ + "gu@ms.com", + "su@ms.net" + ] + } + ] + } + }, + { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin0", + "name":"chiricutin0", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" }, - "actions": [ - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction", - "sendToServiceOwners": true, - "customEmails": ["email1@contoso.com","email2@contoso.com" ] + "properties": { + "name":"chiricutin0", + "description":"Pura Vida 0", + "isEnabled":true, + "condition": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "$type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client", + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricNamespace":"", + "metricName":"Requests" + }, + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" }, - { - "odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction", - "serviceUri": "http://contoso.com/", - "properties": { } - } - ], - "lastUpdatedTime": "2015-01-24T00:21:53.3323416Z", - "provisioningState": "Succeeded" + "lastUpdatedTime":"2016-11-10T21:04:39.1082596Z", + "provisioningState":"Succeeded", + "actions":[] + } } ] } diff --git a/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json b/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json index 30d24e603768..dec2718f3d51 100644 --- a/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json +++ b/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json @@ -64,21 +64,32 @@ }, "examples": { "application/json": { - "storageAccountId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/armlogs1", - "serviceBusRuleId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/myNamespace/RootManageSharedAccessKey", - "locations": [ - "eastus", - "westus" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 1 - } + "value": [ + { + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":null, + "name":"default", + "location":null, + "kind":null, + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":null, + "locations": [ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } + } + } + ] } } } @@ -102,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/LogProfileProperties" + "$ref": "#/definitions/LogProfileResource" }, "description": "Parameters supplied to the operation." }, @@ -118,20 +129,27 @@ }, "examples": { "application/json": { - "storageAccountId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-Storage-WestUS/providers/Microsoft.ClassicStorage/storageAccounts/armlogs1", - "serviceBusRuleId": "/subscriptions/6983c752-c9b8-48dd-b4d4-da739beb7e98/resourceGroups/Default-ServiceBus-WestUS/providers/Microsoft.ServiceBus/namespaces/myNamespace/RootManageSharedAccessKey", - "locations": [ - "eastus", - "westus" - ], - "categories": [ - "Write", - "Delete", - "Action" - ], - "retentionPolicy": { - "enabled": true, - "days": 1 + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":null, + "name":"default", + "location":"", + "kind":null, + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":null, + "locations":[ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } } } } diff --git a/insights/2016-03-01/swagger/insightsClient_MetricDefinitions.json b/insights/2016-03-01/swagger/insightsClient_MetricDefinitions.json index b1a5f922eb36..4429a68d4ca6 100644 --- a/insights/2016-03-01/swagger/insightsClient_MetricDefinitions.json +++ b/insights/2016-03-01/swagger/insightsClient_MetricDefinitions.json @@ -41,46 +41,78 @@ }, "examples": { "application/json": { - "value": [ + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions", + "value":[ { - "resourceId": "/subscriptions/1ef6a1b6-06c8-4dae-8ace-b6bc3f7394a3/resourceGroups/myResourceGroup/providers/Microsoft.Logic/workflows/myLogicApp", + "resourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", "name": { - "value": "RunsStarted", - "localizedValue": "Runs Started" + "value":"RunsStarted", + "localizedValue":"Runs Started" }, - "unit": "Count", - "primaryAggregationType": "Total", + "startTime":"0001-01-01T00:00:00Z", + "endTime":"0001-01-01T00:00:00Z", + "unit":"Count", + "primaryAggregationType":"Total", + "ResourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "ResourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "metricAvailabilities":[ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsStarted" + }, + { + "resourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia","resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsCompleted", + "localizedValue":"Runs Completed" + }, + "startTime":"0001-01-01T00:00:00Z", + "endTime":"0001-01-01T00:00:00Z", + "unit":"Count", + "primaryAggregationType":"Total", + "ResourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia","ResourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", "metricAvailabilities": [ - { - "timeGrain": "PT1M", - "retention": "P30D" - }, - { - "timeGrain": "PT1H", - "retention": "P30D" - } + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } ], - "id": "/subscriptions/1ef6a1b6-06c8-4dae-8ace-b6bc3f7394a3/resourceGroups/myResourceGroup/providers/Microsoft.Logic/workflows/myLogicApp/providers/microsoft.insights/metricdefinitions/RunsStarted" + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsCompleted" }, { - "resourceId": "/subscriptions/1ef6a1b6-06c8-4dae-8ace-b6bc3f7394a3/resourceGroups/myResourceGroup/providers/Microsoft.Logic/workflows/myLogicApp", + "resourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia","resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", "name": { - "value": "RunsCompleted", - "localizedValue": "Runs Completed" + "value":"RunsSucceeded", + "localizedValue":"Runs Succeeded" }, - "unit": "Count", - "primaryAggregationType": "Total", + "startTime":"0001-01-01T00:00:00Z", + "endTime":"0001-01-01T00:00:00Z", + "unit":"Count", + "primaryAggregationType":"Total", + "ResourceUri":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia","ResourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", "metricAvailabilities": [ { - "timeGrain": "PT1M", - "retention": "P30D" + "timeGrain":"PT1M", + "retention":"P30D" }, { - "timeGrain": "PT1H", - "retention": "P30D" + "timeGrain":"PT1H", + "retention":"P30D" } ], - "id": "/subscriptions/1ef6a1b6-06c8-4dae-8ace-b6bc3f7394a3/resourceGroups/myResourceGroup/providers/Microsoft.Logic/workflows/myLogicApp/providers/microsoft.insights/metricdefinitions/RunsCompleted" + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsSucceeded" } ] } diff --git a/insights/2016-09-01/swagger/insightsClient_Metrics.json b/insights/2016-09-01/swagger/insightsClient_Metrics.json index b890f056c246..c830491b305b 100644 --- a/insights/2016-09-01/swagger/insightsClient_Metrics.json +++ b/insights/2016-09-01/swagger/insightsClient_Metrics.json @@ -45,27 +45,49 @@ { "data": [ { - "timeStamp": "2016-09-21T19:59:00Z", - "total": 4.0 + "timeStamp":"2016-11-23T19:14:00Z", + "total":1.0 }, { - "timeStamp": "2016-09-21T20:00:00Z", - "average": 3.8 + "timeStamp":"2016-11-23T19:15:00Z" }, { - "timeStamp": "2016-09-21T20:01:00Z", - "minimum": 0.0 + "timeStamp":"2016-11-23T19:16:00Z" }, { - "timeStamp": "2016-09-21T20:02:00Z", - "maximum": 5.0 + "timeStamp":"2016-11-23T19:17:00Z" + }, + { + "timeStamp":"2016-11-23T19:18:00Z" + }, + { + "timeStamp":"2016-11-23T19:19:00Z", + "total":1.0 + }, + { + "timeStamp":"2016-11-23T19:20:00Z" + }, + { + "timeStamp":"2016-11-23T19:21:00Z" + }, + { + "timeStamp":"2016-11-23T19:22:00Z" + }, + { + "timeStamp":"2016-11-23T19:23:00Z" + }, + { + "timeStamp":"2016-11-23T19:24:00Z", + "total":1.0 } ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", "name": { - "value": "RunsStarted", - "localizedValue": "Runs Started" + "value":"RunsStarted", + "localizedValue":"Runs Started" }, - "unit": "Count" + "type":"Microsoft.Insights/metrics", + "unit":"Count" } ] } From a7b2fc1494e3e8b98959679fe7b1fa5c2d509649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 29 Nov 2016 16:19:36 -0800 Subject: [PATCH 02/46] Making StorageAccountId optional in LogProfileProperties / LogProfileResource. It is already optional in the servers. --- .../swagger/insightsManagementClient_LogProfiles.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json b/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json index dec2718f3d51..aeaaea3d34be 100644 --- a/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json +++ b/arm-insights/2016-03-01/swagger/insightsManagementClient_LogProfiles.json @@ -236,7 +236,7 @@ "description": "Specifies the retention policy for the log." }, "LogProfileProperties": { - "required": ["storageAccountId", "locations"], + "required": [ "locations" ], "properties": { "storageAccountId": { "type": "string", From a213a7f2f16145e2ab68904ba4a30950ed9ca8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 3 Mar 2017 11:06:04 -0800 Subject: [PATCH 03/46] [Swagger] Making resource name readonly. --- arm-monitor/2015-04-01/swagger/autoscale_API.json | 1 + arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json | 1 + arm-monitor/2016-03-01/swagger/alertRules_API.json | 4 +++- arm-monitor/2016-03-01/swagger/logProfiles_API.json | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index a908aba3fe14..e488f978766e 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -749,6 +749,7 @@ }, "name": { "type": "string", + "readOnly": true, "description": "Azure resource name" }, "type": { diff --git a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json index eaad001d03ac..8e4cc0e8e80d 100644 --- a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json @@ -149,6 +149,7 @@ }, "name": { "type": "string", + "readOnly": true, "description": "Azure resource name" }, "type": { diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index 32ac796942c3..785377faed19 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -614,7 +614,8 @@ "AlertRule": { "required": [ "name", - "isEnabled" + "isEnabled", + "condition" ], "properties": { "name": { @@ -658,6 +659,7 @@ }, "name": { "type": "string", + "readOnly": true, "description": "Azure resource name" }, "type": { diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index d65e653b90ca..832b1fb67e86 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -190,6 +190,7 @@ }, "name": { "type": "string", + "readOnly": true, "description": "Azure resource name" }, "type": { From 22bb35e1452f6c1aa6a0ebc598435405daa7055c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 3 Mar 2017 11:08:28 -0800 Subject: [PATCH 04/46] [Swagger] Marking usage metrics as deprecated and reducing warnings about documentation during code generation. --- monitor/2014-04-01/swagger/usageMetrics_API.json | 3 ++- monitor/2015-04-01/swagger/activityLogs_API.json | 5 ++--- monitor/2015-04-01/swagger/tenantActivityLogs_API.json | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/monitor/2014-04-01/swagger/usageMetrics_API.json b/monitor/2014-04-01/swagger/usageMetrics_API.json index 1f021e0972d0..de7356b5fe23 100644 --- a/monitor/2014-04-01/swagger/usageMetrics_API.json +++ b/monitor/2014-04-01/swagger/usageMetrics_API.json @@ -21,7 +21,8 @@ "UsageMetrics" ], "operationId": "UsageMetrics_List", - "description": "The List operation lists the usage metrics for the resource.", + "deprecated": true, + "description": "The List operation lists the usage metrics for the resource. **WARNING**: Operation to be deprecated.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index 8590caf33c9f..e67e6ef1570a 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -155,7 +155,7 @@ "description": "the scope." } }, - "description": "The RBAC properties of the event." + "description": "the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'" }, "HttpRequestInfo": { "properties": { @@ -182,8 +182,7 @@ "required": [ "level", "eventTimestamp", "submissionTimestamp" ], "properties": { "authorization": { - "$ref": "#/definitions/SenderAuthorization", - "description": "the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'" + "$ref": "#/definitions/SenderAuthorization" }, "claims": { "type": "object", diff --git a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json index fe2cb2359f3a..6df8b28aefa9 100644 --- a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json +++ b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json @@ -152,7 +152,7 @@ "description": "the scope." } }, - "description": "The RBAC properties of the event." + "description": "the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'" }, "HttpRequestInfo": { "properties": { @@ -179,8 +179,7 @@ "required": [ "level", "eventTimestamp", "submissionTimestamp" ], "properties": { "authorization": { - "$ref": "#/definitions/SenderAuthorization", - "description": "the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'" + "$ref": "#/definitions/SenderAuthorization" }, "claims": { "type": "object", From 450ad151ce85c79644cb3b551721ce8599efb5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 9 Mar 2017 14:14:16 -0800 Subject: [PATCH 05/46] Adding default response --- .../2015-04-01/swagger/autoscale_API.json | 38 +++++++++++++++++++ .../swagger/diagnosticsSettings_API.json | 20 ++++++++++ .../swagger/alertRulesIncidents_API.json | 20 ++++++++++ .../2016-03-01/swagger/alertRules_API.json | 20 ++++++++++ .../2016-03-01/swagger/logProfiles_API.json | 20 ++++++++++ .../2014-04-01/swagger/usageMetrics_API.json | 21 +++++++++- .../2015-04-01/swagger/activityLogs_API.json | 20 ++++++++++ .../swagger/eventCategories_API.json | 20 ++++++++++ .../swagger/tenantActivityLogs_API.json | 20 ++++++++++ .../swagger/metricDefinitions_API.json | 20 ++++++++++ monitor/2016-09-01/swagger/metrics_API.json | 20 ++++++++++ 11 files changed, 238 insertions(+), 1 deletion(-) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index e488f978766e..60fe624da3e6 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -37,6 +37,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request for a list of autoscale settings", "schema": { @@ -218,6 +224,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to create or update an autoscale setting", "schema": { @@ -551,6 +563,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to delete an autoscale setting" }, @@ -580,6 +598,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get one autoscale setting", "schema": { @@ -1181,6 +1205,20 @@ }, "required": ["value"], "description": "Represents a collection of autoscale setting 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": { diff --git a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json index 8e4cc0e8e80d..8046993fa257 100644 --- a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json @@ -31,6 +31,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get more information about service diagnostic setting", "schema": { @@ -271,6 +277,20 @@ } }, "description": "Description of a service diagnostic setting" + }, + "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": { diff --git a/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json b/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json index 4a52feccbb05..44c95d14cec4 100644 --- a/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json @@ -44,6 +44,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request for one alert rule related incident", "schema": { @@ -132,6 +138,20 @@ } }, "description": "The List incidents operation response." + }, + "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": { diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index 785377faed19..2474b36c9d25 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -46,6 +46,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to update an alert rule", "schema": { @@ -713,6 +719,20 @@ } }, "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": { diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index 832b1fb67e86..633714496d18 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -57,6 +57,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get more information about a log profile.", "schema": { @@ -290,6 +296,20 @@ }, "required": ["value"], "description": "Represents a collection of log profiles." + }, + "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": { diff --git a/monitor/2014-04-01/swagger/usageMetrics_API.json b/monitor/2014-04-01/swagger/usageMetrics_API.json index de7356b5fe23..55418e74f0cc 100644 --- a/monitor/2014-04-01/swagger/usageMetrics_API.json +++ b/monitor/2014-04-01/swagger/usageMetrics_API.json @@ -21,7 +21,6 @@ "UsageMetrics" ], "operationId": "UsageMetrics_List", - "deprecated": true, "description": "The List operation lists the usage metrics for the resource. **WARNING**: Operation to be deprecated.", "parameters": [ { @@ -43,6 +42,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get the list of usage metric values", "schema": { @@ -121,6 +126,20 @@ }, "required": [ "value" ], "description": "Represents collection of usage metrics." + }, + "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": { diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index e67e6ef1570a..84efffc21c1b 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -37,6 +37,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get a page of events in the activity logs", "schema": { @@ -326,6 +332,20 @@ }, "required": [ "value" ], "description": "Represents collection of events." + }, + "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": { diff --git a/monitor/2015-04-01/swagger/eventCategories_API.json b/monitor/2015-04-01/swagger/eventCategories_API.json index 866e7b641f4e..6d1a861b79d6 100644 --- a/monitor/2015-04-01/swagger/eventCategories_API.json +++ b/monitor/2015-04-01/swagger/eventCategories_API.json @@ -28,6 +28,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get the list of event categories", "schema": { @@ -68,6 +74,20 @@ }, "required": [ "value" ], "description": "A collection of event categories. Currently possible values are: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy." + }, + "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": { diff --git a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json index 6df8b28aefa9..dde9986fd9f1 100644 --- a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json +++ b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json @@ -34,6 +34,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to get a page of events in the tenant activity logs", "schema": { @@ -323,6 +329,20 @@ }, "required": [ "value" ], "description": "Represents collection of events." + }, + "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": { diff --git a/monitor/2016-03-01/swagger/metricDefinitions_API.json b/monitor/2016-03-01/swagger/metricDefinitions_API.json index 412264a896a3..4c64bb5d9481 100644 --- a/monitor/2016-03-01/swagger/metricDefinitions_API.json +++ b/monitor/2016-03-01/swagger/metricDefinitions_API.json @@ -34,6 +34,12 @@ } ], "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": { @@ -217,6 +223,20 @@ }, "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": { diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index bdfaeb1a4fec..fcb9c52ce8f2 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -34,6 +34,12 @@ } ], "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": { @@ -210,6 +216,20 @@ }, "required": ["value"], "description": "The collection of metric value sets." + }, + "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": { From f2a2b92dc6e6472c127d1bb39623cb99fa188f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 10 Mar 2017 11:36:36 -0800 Subject: [PATCH 06/46] Making categories and retentionPolicy requuired in logProfiles put (issue 1006 in git) --- arm-monitor/2016-03-01/swagger/logProfiles_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index 633714496d18..d203c372170c 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -237,7 +237,7 @@ "description": "Specifies the retention policy for the log." }, "LogProfileProperties": { - "required": [ "locations" ], + "required": [ "locations", "categories", "retentionPolicy" ], "properties": { "storageAccountId": { "type": "string", From 8173b8ff5325b5baecdb7a8c6ff5363838d43314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Sat, 11 Mar 2017 16:00:49 -0800 Subject: [PATCH 07/46] [Swagger] Removing filter parameter from list operations: autoscale and alert rules. Issue #1017. Factorizing definitions. Adding x-ms-mutability to location for compliance. --- .../2015-04-01/swagger/autoscale_API.json | 20 +++----- .../swagger/diagnosticsSettings_API.json | 6 ++- .../2016-03-01/swagger/alertRules_API.json | 48 ++++++------------- .../2016-03-01/swagger/logProfiles_API.json | 6 ++- 4 files changed, 30 insertions(+), 50 deletions(-) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index 60fe624da3e6..9a2ab3b138ec 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -26,9 +26,6 @@ { "$ref": "#/parameters/ResourceGroupNameParameter" }, - { - "$ref": "#/parameters/FilterParameter" - }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -189,8 +186,7 @@ }, "x-ms-pageable": { "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/AutoscaleSettingResource" + } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}": { @@ -783,7 +779,11 @@ }, "location": { "type": "string", - "description": "Resource location" + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "additionalProperties": { @@ -1244,14 +1244,6 @@ "description": "The name of the resource group.", "x-ms-parameter-location": "method" }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "required": false, - "type": "string", - "description": "The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx", - "x-ms-parameter-location": "method" - }, "AutoscaleSettingNameParameter": { "name": "autoscaleSettingName", "in": "path", diff --git a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json index 8046993fa257..ad03cb761be9 100644 --- a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json @@ -165,7 +165,11 @@ }, "location": { "type": "string", - "description": "Resource location" + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "additionalProperties": { diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index 2474b36c9d25..b55e1171a8ab 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -227,9 +227,6 @@ { "$ref": "#/parameters/ApiVersionParameter" }, - { - "$ref": "#/parameters/FilterParameter" - }, { "$ref": "#/parameters/SubscriptionIdParameter" } @@ -315,8 +312,7 @@ }, "x-ms-pageable": { "nextLinkName": null - }, - "x-ms-odata": "#/definitions/AlertRuleResource" + } } } }, @@ -328,6 +324,10 @@ "odata.type": { "type": "string", "description": "specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition (based on the number of failures of a web test), and ThresholdRuleCondition (based on the threshold of a metric)." + }, + "dataSource": { + "$ref": "#/definitions/RuleDataSource", + "description": "the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource." } }, "required": [ "odata.type" ], @@ -340,6 +340,10 @@ "odata.type": { "type": "string", "description": "specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource" + }, + "resourceUri": { + "type": "string", + "description": "the resource identifier of the resource the rule monitors." } }, "required": [ "odata.type" ], @@ -354,10 +358,6 @@ } ], "properties": { - "resourceUri": { - "type": "string", - "description": "the resource identifier of the resource the rule monitors." - }, "metricName": { "type": "string", "description": "the name of the metric that defines what the rule monitors." @@ -407,10 +407,6 @@ "type": "string", "description": "the resource provider name." }, - "resourceUri": { - "type": "string", - "description": "the resource uri." - }, "status": { "type": "string", "description": "The status of the operation that should be checked for. If no status is provided, any status will match." @@ -463,10 +459,6 @@ ], "required": [ "threshold", "operator" ], "properties": { - "dataSource": { - "$ref": "#/definitions/RuleDataSource", - "description": "the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource." - }, "operator": { "$ref": "#/definitions/ConditionOperator", "description": "the operator used to compare the data and the threshold." @@ -498,10 +490,6 @@ } ], "properties": { - "dataSource": { - "$ref": "#/definitions/RuleDataSource", - "description": "the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource." - }, "windowSize": { "type": "string", "format": "duration", @@ -545,10 +533,6 @@ } ], "properties": { - "dataSource": { - "$ref": "#/definitions/RuleDataSource", - "description": "the resource from which the rule collects its data. For this type dataSource will always be of type RuleManagementEventDataSource." - }, "aggregation": { "$ref": "#/definitions/ManagementEventAggregationCondition", "description": "How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate." @@ -675,7 +659,11 @@ }, "location": { "type": "string", - "description": "Resource location" + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "additionalProperties": { @@ -765,14 +753,6 @@ "type": "string", "description": "The name of the rule.", "x-ms-parameter-location": "method" - }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "required": false, - "type": "string", - "description": "The filter to apply on the operation. For more information please see https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx", - "x-ms-parameter-location": "method" } } } \ No newline at end of file diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index d203c372170c..b4130655d376 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -206,7 +206,11 @@ }, "location": { "type": "string", - "description": "Resource location" + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] }, "tags": { "additionalProperties": { From cb7fbf2a65b5c17ba69fae22f291f776f1472423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 14 Mar 2017 13:18:39 -0700 Subject: [PATCH 08/46] Adding the security and securityDefinitions to the APIs specs --- .../2015-04-01/swagger/autoscale_API.json | 18 ++++++++++++++++++ .../swagger/diagnosticsSettings_API.json | 18 ++++++++++++++++++ .../swagger/alertRulesIncidents_API.json | 18 ++++++++++++++++++ .../2016-03-01/swagger/alertRules_API.json | 18 ++++++++++++++++++ .../2016-03-01/swagger/logProfiles_API.json | 18 ++++++++++++++++++ .../2014-04-01/swagger/usageMetrics_API.json | 18 ++++++++++++++++++ .../2015-04-01/swagger/activityLogs_API.json | 18 ++++++++++++++++++ .../swagger/eventCategories_API.json | 18 ++++++++++++++++++ .../swagger/tenantActivityLogs_API.json | 18 ++++++++++++++++++ .../swagger/metricDefinitions_API.json | 18 ++++++++++++++++++ monitor/2016-09-01/swagger/metrics_API.json | 18 ++++++++++++++++++ 11 files changed, 198 insertions(+) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index 9a2ab3b138ec..6460660ffc2e 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -14,6 +14,24 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings": { "get": { diff --git a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json index ad03cb761be9..50a45ebdb4cb 100644 --- a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json @@ -14,6 +14,24 @@ "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/service": { "get": { diff --git a/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json b/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json index 44c95d14cec4..30f250f87fc4 100644 --- a/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRulesIncidents_API.json @@ -14,6 +14,24 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents/{incidentName}": { "get": { diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index b55e1171a8ab..b73f5b3c7ec6 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -14,6 +14,24 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}": { "put": { diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index b4130655d376..f3d7e6af0293 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -14,6 +14,24 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, "paths": { "/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}": { "delete": { diff --git a/monitor/2014-04-01/swagger/usageMetrics_API.json b/monitor/2014-04-01/swagger/usageMetrics_API.json index 55418e74f0cc..be2d8775cac2 100644 --- a/monitor/2014-04-01/swagger/usageMetrics_API.json +++ b/monitor/2014-04-01/swagger/usageMetrics_API.json @@ -14,6 +14,24 @@ "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}/usages": { "get": { diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index 84efffc21c1b..b9e19801ec37 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -14,6 +14,24 @@ "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, "paths": { "/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values": { "get": { diff --git a/monitor/2015-04-01/swagger/eventCategories_API.json b/monitor/2015-04-01/swagger/eventCategories_API.json index 6d1a861b79d6..3993aa1b0f3c 100644 --- a/monitor/2015-04-01/swagger/eventCategories_API.json +++ b/monitor/2015-04-01/swagger/eventCategories_API.json @@ -14,6 +14,24 @@ "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/eventcategories": { "get": { diff --git a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json index dde9986fd9f1..988524bc1d4d 100644 --- a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json +++ b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json @@ -14,6 +14,24 @@ "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/eventtypes/management/values": { "get": { diff --git a/monitor/2016-03-01/swagger/metricDefinitions_API.json b/monitor/2016-03-01/swagger/metricDefinitions_API.json index 4c64bb5d9481..38349fe236a4 100644 --- a/monitor/2016-03-01/swagger/metricDefinitions_API.json +++ b/monitor/2016-03-01/swagger/metricDefinitions_API.json @@ -14,6 +14,24 @@ "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": { diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index fcb9c52ce8f2..b4685d44c60a 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -14,6 +14,24 @@ "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": { From 6de06141daa6b6eb772f616a19c804f426117b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 15 Mar 2017 11:04:06 -0700 Subject: [PATCH 09/46] Removing 'metricNamespace' attribute from some examples (AlertRules) to reflect the model. --- arm-monitor/2016-03-01/swagger/alertRules_API.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index b73f5b3c7ec6..cde942aa5247 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -215,7 +215,6 @@ "dataSource": { "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricNamespace":"", "metricName":"Requests" }, "threshold":2.0, @@ -275,7 +274,6 @@ "dataSource": { "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricNamespace":"", "metricName":"Requests" }, "threshold":2.0, @@ -312,7 +310,6 @@ "dataSource": { "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricNamespace":"", "metricName":"Requests" }, "threshold":2.0, From b5d2c44a166d673dc862f2aaf1cbf7dd70da3044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 16 Mar 2017 09:42:08 -0700 Subject: [PATCH 10/46] Adding required attribute to the examples after verifying that it is required and returned by the servers. --- arm-monitor/2016-03-01/swagger/alertRules_API.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index cde942aa5247..146bbc73030b 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -95,6 +95,7 @@ "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", "metricName":"Requests" }, + "operator":"GreaterThan", "threshold":3.0, "windowSize":"PT5M", "timeAggregation":"Total" @@ -130,6 +131,7 @@ "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", "metricName":"Requests" }, + "operator":"GreaterThan", "threshold":2.0, "windowSize":"PT5M", "timeAggregation":"Total" @@ -217,6 +219,7 @@ "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", "metricName":"Requests" }, + "operator":"GreaterThan", "threshold":2.0, "windowSize":"PT5M", "timeAggregation":"Total" @@ -276,6 +279,7 @@ "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", "metricName":"Requests" }, + "operator":"GreaterThan", "threshold":2.0, "windowSize":"PT5M", "timeAggregation":"Total" @@ -312,6 +316,7 @@ "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", "metricName":"Requests" }, + "operator":"GreaterThan", "threshold":2.0, "windowSize":"PT5M", "timeAggregation":"Total" From 83effb861885b51d6ed81b5fa437d85ca17052f8 Mon Sep 17 00:00:00 2001 From: davmc Date: Tue, 28 Mar 2017 14:30:36 -0700 Subject: [PATCH 11/46] Add ActivityLogAlerts swagger documentation --- .../createOrUpdateActivityLogAlert.json | 121 +++++ .../examples/deleteActivityLogAlert.json | 18 + .../examples/getActivityLogAlert.json | 49 ++ .../examples/listActivityLogAlerts.json | 81 ++++ .../swagger/activityLogAlerts_API.json | 451 ++++++++++++++++++ .../compositeMonitorManagementClient.json | 3 +- 6 files changed, 722 insertions(+), 1 deletion(-) create mode 100644 arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json create mode 100644 arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json create mode 100644 arm-monitor/2017-03-01/examples/getActivityLogAlert.json create mode 100644 arm-monitor/2017-03-01/examples/listActivityLogAlerts.json create mode 100644 arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json diff --git a/arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json b/arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json new file mode 100644 index 000000000000..855db0fa965a --- /dev/null +++ b/arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-03-01-preview", + "activityLogAlert": { + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + }, + "201": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json b/arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json new file mode 100644 index 000000000000..431d9efeddd4 --- /dev/null +++ b/arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "actionGroupName": "SampleActivityLogAlert", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-03-01/examples/getActivityLogAlert.json b/arm-monitor/2017-03-01/examples/getActivityLogAlert.json new file mode 100644 index 000000000000..8af0493dc28c --- /dev/null +++ b/arm-monitor/2017-03-01/examples/getActivityLogAlert.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-03-01/examples/listActivityLogAlerts.json b/arm-monitor/2017-03-01/examples/listActivityLogAlerts.json new file mode 100644 index 000000000000..04507656ca2a --- /dev/null +++ b/arm-monitor/2017-03-01/examples/listActivityLogAlerts.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert2", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert2", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { } + } + ] + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json new file mode 100644 index 000000000000..8066f9e28404 --- /dev/null +++ b/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json @@ -0,0 +1,451 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Activity Log Alerts API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2017-03-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}": { + "put": { + "description": "Create a new activity log alert or update an existing one.", + "operationId": "ActivityLogAlerts_CreateOrUpdate", + "x-ms-examples": { + "Create or update an activity log alert": { + "$ref": "../examples/createOrUpdateActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlert", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + }, + "description": "The activity log alert to create or use for the update." + } + ], + "responses": { + "200": { + "description": "An existing activity log alert was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "201": { + "description": "A new activity log alert was successfully created.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the activity log alert could not be created or updated.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "description": "Get an activity log alert.", + "operationId": "ActivityLogAlerts_Get", + "x-ms-examples": { + "Get an activity log alert": { + "$ref": "../examples/getActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the activity log alert could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete an activity log alert.", + "operationId": "ActivityLogAlerts_Delete", + "x-ms-examples": { + "Delete an activity log alert": { + "$ref": "../examples/deleteActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The activity log alert was successfully deleted." + }, + "204": { + "description": "The activity log alert does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the activity log alert could not be deleted.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts": { + "get": { + "description": "Get a list of all activity log alerts in a subscription.", + "operationId": "ActivityLogAlerts_ListBySubscriptionId", + "x-ms-examples": { + "List activity log alerts": { + "$ref": "../examples/listActivityLogAlerts.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertList" + } + }, + "default": { + "description": "An error occurred and the list of activity log alerts could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts": { + "get": { + "description": "Get a list of all activity log alerts in a resource group.", + "operationId": "ActivityLogAlerts_ListByResourceGroup", + "x-ms-examples": { + "List activity log alerts": { + "$ref": "../examples/listActivityLogAlerts.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertList" + } + }, + "default": { + "description": "An error occurred and the list of activity log alerts could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "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" + }, + "ActivityLogAlertResource": { + "description": "An activity log alert resource.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActivityLogAlert" + } + } + }, + "ActivityLogAlertList": { + "description": "A list of activity log alerts.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertResource" + }, + "description": "The list of activity log alerts." + } + } + }, + "ActivityLogAlert": { + "description": "An Azure activity log alert.", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item." + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated." + }, + "condition": { + "$ref": "#/definitions/ActivityLogAlertAllOfCondition", + "description": "The conditon that will cause this alert to activate." + }, + "actions": { + "$ref": "#/definitions/ActivityLogAlertActionList", + "description": "The actions that will activate when the condition is met." + }, + "description": { + "type": "string", + "description": "A description of this activity log alert." + } + }, + "required": [ + "scopes", + "condition", + "actions" + ] + }, + "ActivityLogAlertAllOfCondition": { + "properties": { + "allOf": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertLeafCondition" + }, + "description": "The list of activity log alert conditions." + } + }, + "description": "An Activity Log alert condition that is met when all its member conditions are met.", + "required": [ + "allOf" + ] + }, + "ActivityLogAlertLeafCondition": { + "properties": { + "field": { + "type": "string", + "description": "The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'." + }, + "equals": { + "type": "string", + "description": "The field value will be compared to this value (case-insensitive) to determine if the condition is met." + } + }, + "description": "An Activity Log alert condition that is met by comparing an activity log field and value.", + "required": [ + "field", + "equals" + ] + }, + "ActivityLogAlertActionList": { + "description": "A list of activity log alert actions.", + "properties": { + "actionGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertActionGroup" + }, + "description": "The list of activity log alerts." + } + } + }, + "ActivityLogAlertActionGroup": { + "description": "A pointer to an Azure Action Group.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "The resourceId of the action group. This cannot be null or empty." + }, + "webhookProperties": { + "additionalProperties": { + "type": "string" + }, + "description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload." + } + }, + "required": [ + "actionGroupId" + ] + }, + "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": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription id." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ActivityLogAlertNameParameter": { + "name": "activityLogAlertName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the activity log alert.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} \ No newline at end of file diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index 1c9dbcdccb5e..94b4282fe707 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -8,6 +8,7 @@ "./2015-07-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", - "./2016-03-01/swagger/logProfiles_API.json" + "./2016-03-01/swagger/logProfiles_API.json", + "./2017-03-01/swagger/activityLogAlerts_API.json" ] } \ No newline at end of file From 06cfecb3aca815d5cadf46dc5ac6c94dac375960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 29 Mar 2017 16:00:42 -0700 Subject: [PATCH 12/46] Adding the eventHubAuthorizationRuleId property to the diagnosticSetting spec and changing the api-version. --- .../swagger/diagnosticsSettings_API.json | 341 ++++++++++++++++++ .../compositeMonitorManagementClient.json | 2 +- 2 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json new file mode 100644 index 000000000000..af08d0eed3c6 --- /dev/null +++ b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json @@ -0,0 +1,341 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2016-03-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": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { + "get": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_Get", + "description": "Gets the active diagnostic settings 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 service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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":"", + "metrics": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", + "description": "Create or update new diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "Successful request to create a service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + } + } + }, + "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", + "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." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this timegrain is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this timegrain." + } + }, + "required": [ "enabled", "timeGrain" ], + "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." + }, + "ServiceDiagnosticSettings": { + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "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 for service." + }, + "ServiceDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServiceDiagnosticSettings" + } + }, + "description": "Description of a service diagnostic setting" + }, + "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" + } + } +} \ No newline at end of file diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index 1c9dbcdccb5e..6c70118c226d 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -5,7 +5,7 @@ }, "documents": [ "./2015-04-01/swagger/autoscale_API.json", - "./2015-07-01/swagger/diagnosticsSettings_API.json", + "./2016-03-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", "./2016-03-01/swagger/logProfiles_API.json" From a42674e1dabd5e2499a3e8cb5a3baa45c3c11c41 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 21 Mar 2017 14:16:29 -0700 Subject: [PATCH 13/46] Increase the version of the call for diagnosticSettings to 2016-03-01 --- ...sManagementClient_DiagnosticsSettings.json | 292 ++++++++++++++++++ .../compositeInsightsManagementClient.json | 2 +- 2 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json diff --git a/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json b/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json new file mode 100644 index 000000000000..ad8f717033c0 --- /dev/null +++ b/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json @@ -0,0 +1,292 @@ +{ + "swagger": "2.0", + "info": { + "title": "InsightsManagementClient", + "version": "2016-03-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { + "get": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_Get", + "description": "Gets the active diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request to get more information about service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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":"", + "metrics": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", + "description": "Create or update new diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "Successful request to create a service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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":"", + "metrics": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "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", + "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." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this timegrain is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this timegrain." + } + }, + "required": [ "enabled", "timeGrain" ], + "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." + }, + "ServiceDiagnosticSettings": { + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." + }, + "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 for service." + }, + "ServiceDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServiceDiagnosticSettings" + } + }, + "description": "Description of a service diagnostic setting" + } + }, + "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" + } + } +} \ No newline at end of file diff --git a/arm-insights/compositeInsightsManagementClient.json b/arm-insights/compositeInsightsManagementClient.json index 0a21a0d5ece5..14f2b5b59e13 100644 --- a/arm-insights/compositeInsightsManagementClient.json +++ b/arm-insights/compositeInsightsManagementClient.json @@ -5,7 +5,7 @@ }, "documents": [ "./2015-04-01/swagger/insightsManagementClient_Autoscale.json", - "./2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json", + "./2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json", "./2016-03-01/swagger/insightsManagementClient_AlertRules.json", "./2016-03-01/swagger/insightsManagementClient_AlertRulesIncidents.json", "./2016-03-01/swagger/insightsManagementClient_LogProfiles.json" From 82df9e772e31cfbc6f7997abb7bcbe0813a9e246 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Fri, 31 Mar 2017 13:31:26 -0700 Subject: [PATCH 14/46] [Monitor] Named diagnostic settings --- ...on => serviceDiagnosticsSettings_API.json} | 0 .../swagger/diagnosticsSettings_API.json | 79 ++-- .../serviceDiagnosticsSettings_API.json | 341 ++++++++++++++++++ .../compositeMonitorManagementClient.json | 1 + 4 files changed, 399 insertions(+), 22 deletions(-) rename arm-monitor/2015-07-01/swagger/{diagnosticsSettings_API.json => serviceDiagnosticsSettings_API.json} (100%) create mode 100644 arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json diff --git a/arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json similarity index 100% rename from arm-monitor/2015-07-01/swagger/diagnosticsSettings_API.json rename to arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json index af08d0eed3c6..5bfdd3b1c125 100644 --- a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json @@ -33,12 +33,12 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}": { "get": { "tags": [ - "ServiceDiagnosticSettings" + "DiagnosticSettings" ], - "operationId": "ServiceDiagnosticSettings_Get", + "operationId": "DiagnosticSettings_Get", "description": "Gets the active diagnostic settings for the specified resource.", "parameters": [ { @@ -46,6 +46,9 @@ }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" } ], "responses": { @@ -56,15 +59,15 @@ } }, "200": { - "description": "Successful request to get more information about service diagnostic setting", + "description": "Successful request to get more information about diagnostic setting", "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + "$ref": "#/definitions/DiagnosticSettingsResource" }, "examples": { "application/json": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", "type":"", - "name":"service", + "name":"mysetting", "location":"", "tags":null, "properties": { @@ -98,9 +101,9 @@ }, "put": { "tags": [ - "ServiceDiagnosticSettings" + "DiagnosticSettings" ], - "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", + "operationId": "DiagnosticSettings_CreateOrUpdate", "description": "Create or update new diagnostic settings for the specified resource.", "parameters": [ { @@ -114,29 +117,30 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + "$ref": "#/definitions/DiagnosticSettingsResource" }, "description": "Parameters supplied to the operation." + }, + { + "$ref": "#/parameters/NameParameter" } ], "responses": { "200": { - "description": "Successful request to create a service diagnostic setting", + "description": "Successful request to create a diagnostic setting", "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + "$ref": "#/definitions/DiagnosticSettingsResource" }, "examples": { "application/json": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", "type":"", - "name":"service", + "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", + "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": [ { "timeGrain":"PT1M", @@ -162,6 +166,29 @@ } } } + }, + "delete": { + "tags": [ + "DiagnosticSettings" + ], + "operationId": "DiagnosticSettings_Remove", + "description": "Delete existing diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/NameParameter" + } + ], + "responses": { + "200": { + "description": "Successful request to remove a diagnostic setting" + } + } } } }, @@ -256,7 +283,7 @@ "required": [ "enabled" ], "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." }, - "ServiceDiagnosticSettings": { + "DiagnosticSettings": { "properties": { "storageAccountId": { "type": "string", @@ -289,9 +316,9 @@ "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 for service." + "description": "The diagnostic settings." }, - "ServiceDiagnosticSettingsResource": { + "DiagnosticSettingsResource": { "type": "object", "allOf": [ { @@ -301,10 +328,10 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/ServiceDiagnosticSettings" + "$ref": "#/definitions/DiagnosticSettings" } }, - "description": "Description of a service diagnostic setting" + "description": "Description of diagnostic setting" }, "ErrorResponse": { "description": "Describes the format of Error response.", @@ -336,6 +363,14 @@ "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/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json new file mode 100644 index 000000000000..af08d0eed3c6 --- /dev/null +++ b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json @@ -0,0 +1,341 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2016-03-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": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { + "get": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_Get", + "description": "Gets the active diagnostic settings 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 service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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":"", + "metrics": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + }, + "put": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", + "description": "Create or update new diagnostic settings for the specified resource.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "Successful request to create a service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":0 + } + } + ] + } + } + } + } + } + } + } + }, + "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", + "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." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this timegrain is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this timegrain." + } + }, + "required": [ "enabled", "timeGrain" ], + "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." + }, + "ServiceDiagnosticSettings": { + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub authorization rule." + }, + "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 for service." + }, + "ServiceDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServiceDiagnosticSettings" + } + }, + "description": "Description of a service diagnostic setting" + }, + "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" + } + } +} \ No newline at end of file diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index 6c70118c226d..edaadefcbd1b 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -6,6 +6,7 @@ "documents": [ "./2015-04-01/swagger/autoscale_API.json", "./2016-03-01/swagger/diagnosticsSettings_API.json", + "./2016-03-01/swagger/serviceDiagnosticsSettings_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", "./2016-03-01/swagger/logProfiles_API.json" From 502e1eedaefda36f57e00ddb33fed3ac422f49f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 4 Apr 2017 12:23:39 -0700 Subject: [PATCH 15/46] Making AutoscaleSetting name optional (first step to remove it.) Improving documentation. --- .../2015-04-01/swagger/autoscale_API.json | 3 +- .../2016-03-01/swagger/alertRules_API.json | 2 +- .../swagger/diagnosticsSettings_API.json | 12 +-- .../serviceDiagnosticsSettings_API.json | 3 +- .../compositeMonitorManagementClient.json | 6 +- .../2014-04-01/swagger/usageMetrics_API.json | 4 +- .../2015-04-01/swagger/activityLogs_API.json | 2 +- .../swagger/eventCategories_API.json | 2 +- .../swagger/tenantActivityLogs_API.json | 2 +- .../examples/GetMetricDefinitions.json | 75 +++++++++++++++++++ .../GetMetricDefinitionsFiltered.json | 56 ++++++++++++++ .../swagger/metricDefinitions_API.json | 8 +- monitor/2016-09-01/swagger/metrics_API.json | 2 +- 13 files changed, 157 insertions(+), 20 deletions(-) create mode 100644 monitor/2016-03-01/examples/GetMetricDefinitions.json create mode 100644 monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index 6460660ffc2e..58f2b2411482 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -1154,8 +1154,7 @@ }, "AutoscaleSetting": { "required":[ - "profiles", - "name" + "profiles" ], "properties": { "profiles": { diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index 146bbc73030b..e120458ef1a6 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -35,7 +35,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}": { "put": { - "description": "Creates or updates an alert rule.\r\nRequest method: PUT\t\tRequest URI: https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.insights/alertRules/{alert-rule-name}?api-version={api-version}", + "description": "Creates or updates an alert rule.", "tags": [ "AlertRules" ], diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json index 5bfdd3b1c125..9f4ddeb50b16 100644 --- a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json @@ -71,7 +71,8 @@ "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", + "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":"", "metrics": [ { @@ -104,7 +105,7 @@ "DiagnosticSettings" ], "operationId": "DiagnosticSettings_CreateOrUpdate", - "description": "Create or update new diagnostic settings for the specified resource.", + "description": "Creates or updates diagnostic settings for the specified resource.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -139,7 +140,8 @@ "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", + "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":"", "metrics": [ { @@ -171,8 +173,8 @@ "tags": [ "DiagnosticSettings" ], - "operationId": "DiagnosticSettings_Remove", - "description": "Delete existing diagnostic settings for the specified resource.", + "operationId": "DiagnosticSettings_Delete", + "description": "Deletes existing diagnostic settings for the specified resource.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" diff --git a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json index af08d0eed3c6..d036ce2663d5 100644 --- a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json @@ -68,7 +68,8 @@ "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", + "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":"", "metrics": [ { diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index edaadefcbd1b..57fd7f16b682 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -5,10 +5,10 @@ }, "documents": [ "./2015-04-01/swagger/autoscale_API.json", - "./2016-03-01/swagger/diagnosticsSettings_API.json", - "./2016-03-01/swagger/serviceDiagnosticsSettings_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", - "./2016-03-01/swagger/logProfiles_API.json" + "./2016-03-01/swagger/diagnosticsSettings_API.json", + "./2016-03-01/swagger/logProfiles_API.json", + "./2016-03-01/swagger/serviceDiagnosticsSettings_API.json" ] } \ No newline at end of file diff --git a/monitor/2014-04-01/swagger/usageMetrics_API.json b/monitor/2014-04-01/swagger/usageMetrics_API.json index be2d8775cac2..60c240f5b513 100644 --- a/monitor/2014-04-01/swagger/usageMetrics_API.json +++ b/monitor/2014-04-01/swagger/usageMetrics_API.json @@ -39,7 +39,7 @@ "UsageMetrics" ], "operationId": "UsageMetrics_List", - "description": "The List operation lists the usage metrics for the resource. **WARNING**: Operation to be deprecated.", + "description": "The List operation lists the usage metrics for the resource.
**WARNING**: This operation will be *deprecated* in the next release.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -55,7 +55,7 @@ "name": "$filter", "in": "query", "type": "string", - "description": "The filter to apply on the operation.", + "description": "The filter to apply on the operation.
**WARNING**: $filter not documented since the operation will be deprecated in the next release.", "required": false } ], diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index b9e19801ec37..8812351912da 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -39,7 +39,7 @@ "ActivityLogs" ], "operationId": "ActivityLogs_List", - "description": "Provides the list of events. The **$filter** is very restricted and allows only the following patterns. - List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''. - List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''. - List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'. -List events for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''. - List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''. No other syntax is allowed.", + "description": "Provides the list of records from the activity logs.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
-List events for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.

**NOTE**: No other syntax is allowed.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" diff --git a/monitor/2015-04-01/swagger/eventCategories_API.json b/monitor/2015-04-01/swagger/eventCategories_API.json index 3993aa1b0f3c..982e31aefc01 100644 --- a/monitor/2015-04-01/swagger/eventCategories_API.json +++ b/monitor/2015-04-01/swagger/eventCategories_API.json @@ -39,7 +39,7 @@ "EventCategories" ], "operationId": "EventCategories_List", - "description": "get the list of available event categories supported in the Activity Log Service. The current list includes the following: Aministrative, Security, ServiceHealth, Alert, Recommendation, Policy.", + "description": "Get the list of available event categories supported in the Activity Logs Service.
The current list includes the following: Aministrative, Security, ServiceHealth, Alert, Recommendation, Policy.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" diff --git a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json index 988524bc1d4d..d83eb3db1b78 100644 --- a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json +++ b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json @@ -39,7 +39,7 @@ "TenantActivityLogs" ], "operationId": "TenantActivityLogs_List", - "description": "get the Activity Logs for the Tenant. Everything that is applicable to the API to get the Activity Log for the subscription is applicable to this API (the parameters, $filter, etc.). One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level. The **$filter** is very restricted and allows only the following patterns. - List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''. - List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''. - List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'. - List evetns for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''. - List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''. No other syntax is allowed.", + "description": "Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
- List evetns for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.
**NOTE**: No other syntax is allowed.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" diff --git a/monitor/2016-03-01/examples/GetMetricDefinitions.json b/monitor/2016-03-01/examples/GetMetricDefinitions.json new file mode 100644 index 000000000000..f1d9c4969733 --- /dev/null +++ b/monitor/2016-03-01/examples/GetMetricDefinitions.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "api-version": "2016-03-01", + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192" + }, + "responses": { + "200": { + "body": { + [ + { + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsStarted", + "localizedValue":"Runs Started" + }, + "unit":"Count", + "primaryAggregationType":"Total", + "metricAvailabilities":[ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsStarted" + }, + { + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsCompleted", + "localizedValue":"Runs Completed" + }, + "unit":"Count", + "primaryAggregationType":"Total", + "metricAvailabilities": [ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsCompleted" + }, + { + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsSucceeded", + "localizedValue":"Runs Succeeded" + }, + "unit":"Count", + "primaryAggregationType":"Total", + "metricAvailabilities": [ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsSucceeded" + } + ] + } + } + } +} \ No newline at end of file diff --git a/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json b/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json new file mode 100644 index 000000000000..3a9ed660a5f1 --- /dev/null +++ b/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "api-version": "2016-03-01", + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192", + "$filter": "name.value eq 'RunsStarted' or name.value eq 'RunsSucceeded'" + }, + "responses": { + "200": { + "body": { + [ + { + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsStarted", + "localizedValue":"Runs Started" + }, + "unit":"Count", + "primaryAggregationType":"Total", + "metricAvailabilities":[ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsStarted" + }, + { + "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "name": { + "value":"RunsSucceeded", + "localizedValue":"Runs Succeeded" + }, + "unit":"Count", + "primaryAggregationType":"Total", + "metricAvailabilities": [ + { + "timeGrain":"PT1M", + "retention":"P30D" + }, + { + "timeGrain":"PT1H", + "retention":"P30D" + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metricdefinitions/RunsSucceeded" + } + ] + } + } + } +} \ No newline at end of file diff --git a/monitor/2016-03-01/swagger/metricDefinitions_API.json b/monitor/2016-03-01/swagger/metricDefinitions_API.json index 38349fe236a4..8a7992ad3249 100644 --- a/monitor/2016-03-01/swagger/metricDefinitions_API.json +++ b/monitor/2016-03-01/swagger/metricDefinitions_API.json @@ -39,7 +39,7 @@ "MetricDefinitions" ], "operationId": "MetricDefinitions_List", - "description": "Lists the metric definitions for the resource. The **$filter** parameter is optional, and can be used to only retrieve certain metric definitions. For example, get just the definition for the CPU percentage counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'. This $filter is very restricted and allows only these 'name eq ' clauses separated by or operators. No other syntax is allowed.", + "description": "Lists the metric definitions for the resource.
The **$filter** parameter is optional, and can be used to only retrieve certain metric definitions.
For example, get just the definition for the CPU percentage counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'.
This **$filter** is very restricted and allows only clauses of the form **'name eq '** separated by **or** logical operators.
**NOTE**: No other syntax is allowed.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -134,7 +134,11 @@ "x-ms-pageable": { "nextLinkName": null }, - "x-ms-odata": "#/definitions/MetricDefinition" + "x-ms-odata": "#/definitions/MetricDefinition", + "x-ms-examples": { + "Get Metric Definitions without filter": { "$ref": "../examples/GetMetricDefinitions.json" }, + "Get Metric Definitions with filter": { "$ref": "../examples/GetMetricDefinitionsFiltered.json" } + } } } }, diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index b4685d44c60a..deef13e7825f 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -39,7 +39,7 @@ "Metrics" ], "operationId": "Metrics_List", - "description": "**Lists the metric values for a resource**.
The **$filter** is used to reduce the set of metric data returned. Some common properties for this expression will be: name.value, aggregationType, startTime, endTime, timeGrain. The filter expression uses these properties with comparison operators (eg. eq, gt, lt) and multiple expressions can be combined with parentheses and 'and/or' operators.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

>**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", + "description": "Lists the metric values for a resource.
The **$filter** is used to reduce the set of metric data returned. Some common properties for this expression will be: name.value, aggregationType, startTime, endTime, timeGrain.
The filter expression uses these properties with comparison operators (eg. eq, gt, lt) and multiple expressions can be combined with parentheses and 'and/or' logical operators.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

>**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" From 949caa68a696be4432c1184c1efbb55cbccd47c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 4 Apr 2017 12:43:52 -0700 Subject: [PATCH 16/46] Minor change to a description to pass the validation step. --- arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json index 8066f9e28404..e6100b01a5ed 100644 --- a/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json @@ -422,7 +422,7 @@ "in": "path", "required": true, "type": "string", - "description": "The Azure subscription id." + "description": "The Azure subscription Id." }, "ResourceGroupNameParameter": { "name": "resourceGroupName", From 56b60f0c266132d5b8d3a151aa9503566d47c24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 4 Apr 2017 18:13:35 -0700 Subject: [PATCH 17/46] Reverting a change to arm-insights since it must remain unchanged (in process of deprecation after the rename) --- ...sManagementClient_DiagnosticsSettings.json | 292 ------------------ .../compositeInsightsManagementClient.json | 2 +- 2 files changed, 1 insertion(+), 293 deletions(-) delete mode 100644 arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json diff --git a/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json b/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json deleted file mode 100644 index ad8f717033c0..000000000000 --- a/arm-insights/2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "InsightsManagementClient", - "version": "2016-03-01" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { - "get": { - "tags": [ - "ServiceDiagnosticSettings" - ], - "operationId": "ServiceDiagnosticSettings_Get", - "description": "Gets the active diagnostic settings for the specified resource.", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successful request to get more information about service diagnostic setting", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "examples": { - "application/json": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type":"", - "name":"service", - "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":"", - "metrics": [ - { - "timeGrain":"PT1M", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ], - "logs": [ - { - "category":"WorkflowRuntime", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ] - } - } - } - } - } - }, - "put": { - "tags": [ - "ServiceDiagnosticSettings" - ], - "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", - "description": "Create or update new diagnostic settings for the specified resource.", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "description": "Parameters supplied to the operation." - } - ], - "responses": { - "200": { - "description": "Successful request to create a service diagnostic setting", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "examples": { - "application/json": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type":"", - "name":"service", - "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":"", - "metrics": [ - { - "timeGrain":"PT1M", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ], - "logs": [ - { - "category":"WorkflowRuntime", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ] - } - } - } - } - } - } - } - }, - "definitions": { - "Resource": { - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Azure resource Id" - }, - "name": { - "type": "string", - "description": "Azure resource name" - }, - "type": { - "type": "string", - "readOnly": true, - "description": "Azure resource type" - }, - "location": { - "type": "string", - "description": "Resource location" - }, - "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", - "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." - }, - "enabled": { - "type": "boolean", - "description": "a value indicating whether this timegrain is enabled." - }, - "retentionPolicy": { - "$ref": "#/definitions/RetentionPolicy", - "description": "the retention policy for this timegrain." - } - }, - "required": [ "enabled", "timeGrain" ], - "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." - }, - "ServiceDiagnosticSettings": { - "properties": { - "storageAccountId": { - "type": "string", - "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." - }, - "serviceBusRuleId": { - "type": "string", - "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." - }, - "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 for service." - }, - "ServiceDiagnosticSettingsResource": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ServiceDiagnosticSettings" - } - }, - "description": "Description of a service diagnostic setting" - } - }, - "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" - } - } -} \ No newline at end of file diff --git a/arm-insights/compositeInsightsManagementClient.json b/arm-insights/compositeInsightsManagementClient.json index 14f2b5b59e13..0a21a0d5ece5 100644 --- a/arm-insights/compositeInsightsManagementClient.json +++ b/arm-insights/compositeInsightsManagementClient.json @@ -5,7 +5,7 @@ }, "documents": [ "./2015-04-01/swagger/insightsManagementClient_Autoscale.json", - "./2016-03-01/swagger/insightsManagementClient_DiagnosticsSettings.json", + "./2015-07-01/swagger/insightsManagementClient_DiagnosticsSettings.json", "./2016-03-01/swagger/insightsManagementClient_AlertRules.json", "./2016-03-01/swagger/insightsManagementClient_AlertRulesIncidents.json", "./2016-03-01/swagger/insightsManagementClient_LogProfiles.json" From 8dbb73a463b232d1c641d850aa1ed87f0993d44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 6 Apr 2017 12:15:54 -0700 Subject: [PATCH 18/46] [Swagger] Adding patch operations, change folder name for activity logs, fixing error in examples for Metrics --- .../swagger/diagnosticsSettings_API.json | 62 ++++++++++++++-- .../serviceDiagnosticsSettings_API.json | 36 ++++++++++ .../createOrUpdateActivityLogAlert.json | 4 +- .../examples/deleteActivityLogAlert.json | 0 .../examples/getActivityLogAlert.json | 0 .../examples/listActivityLogAlerts.json | 0 .../examples/patchActivityLogAlert.json | 56 +++++++++++++++ .../swagger/activityLogAlerts_API.json | 70 +++++++++++++++++++ .../compositeMonitorManagementClient.json | 2 +- .../examples/GetMetricDefinitions.json | 1 + .../GetMetricDefinitionsFiltered.json | 1 + 11 files changed, 225 insertions(+), 7 deletions(-) rename arm-monitor/{2017-03-01 => 2017-03-01-preview}/examples/createOrUpdateActivityLogAlert.json (97%) rename arm-monitor/{2017-03-01 => 2017-03-01-preview}/examples/deleteActivityLogAlert.json (100%) rename arm-monitor/{2017-03-01 => 2017-03-01-preview}/examples/getActivityLogAlert.json (100%) rename arm-monitor/{2017-03-01 => 2017-03-01-preview}/examples/listActivityLogAlerts.json (100%) create mode 100644 arm-monitor/2017-03-01-preview/examples/patchActivityLogAlert.json rename arm-monitor/{2017-03-01 => 2017-03-01-preview}/swagger/activityLogAlerts_API.json (85%) diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json index 9f4ddeb50b16..1a279d40a531 100644 --- a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json @@ -66,9 +66,9 @@ "examples": { "application/json": { "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", - "type":"", + "type":"microsoft.logic/workflows", "name":"mysetting", - "location":"", + "location":"eastus", "tags":null, "properties": { "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", @@ -127,6 +127,12 @@ } ], "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, "200": { "description": "Successful request to create a diagnostic setting", "schema": { @@ -135,9 +141,9 @@ "examples": { "application/json": { "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/mysetting", - "type":"", + "type":"microsoft.logic/workflows", "name":"mysetting", - "location":"", + "location":"eastus", "tags":null, "properties": { "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", @@ -187,8 +193,55 @@ } ], "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" + } + } + }, + "patch": { + "description": "Updates an existing DiagnosticSettingsResource tags. To update other fields use the CreateOrUpdate method.", + "operationId": "DiagnosticSettings_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "diagnosticSettingResource", + "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": "An existing DiagnosticSettingResource was successfully updated.", + "schema": { + "$ref": "#/definitions/DiagnosticSettingsResource" + } } } } @@ -242,6 +295,7 @@ "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." } }, diff --git a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json index d036ce2663d5..9ad7676d99eb 100644 --- a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json @@ -163,6 +163,41 @@ } } } + }, + "patch": { + "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method.", + "operationId": "ServiceDiagnosticSettings_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "serviceDiagnosticSettingsResource", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing service diagnostics setting resource was successfully updated.", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + } + } + } } } }, @@ -214,6 +249,7 @@ "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." } }, diff --git a/arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json b/arm-monitor/2017-03-01-preview/examples/createOrUpdateActivityLogAlert.json similarity index 97% rename from arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json rename to arm-monitor/2017-03-01-preview/examples/createOrUpdateActivityLogAlert.json index 855db0fa965a..16d14631da06 100644 --- a/arm-monitor/2017-03-01/examples/createOrUpdateActivityLogAlert.json +++ b/arm-monitor/2017-03-01-preview/examples/createOrUpdateActivityLogAlert.json @@ -9,7 +9,7 @@ "tags": { }, "properties": { "scopes": [ - "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" ], "enabled": true, "condition": { @@ -49,7 +49,7 @@ "tags": { }, "properties": { "scopes": [ - "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" ], "enabled": true, "condition": { diff --git a/arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json b/arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json similarity index 100% rename from arm-monitor/2017-03-01/examples/deleteActivityLogAlert.json rename to arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json diff --git a/arm-monitor/2017-03-01/examples/getActivityLogAlert.json b/arm-monitor/2017-03-01-preview/examples/getActivityLogAlert.json similarity index 100% rename from arm-monitor/2017-03-01/examples/getActivityLogAlert.json rename to arm-monitor/2017-03-01-preview/examples/getActivityLogAlert.json diff --git a/arm-monitor/2017-03-01/examples/listActivityLogAlerts.json b/arm-monitor/2017-03-01-preview/examples/listActivityLogAlerts.json similarity index 100% rename from arm-monitor/2017-03-01/examples/listActivityLogAlerts.json rename to arm-monitor/2017-03-01-preview/examples/listActivityLogAlerts.json diff --git a/arm-monitor/2017-03-01-preview/examples/patchActivityLogAlert.json b/arm-monitor/2017-03-01-preview/examples/patchActivityLogAlert.json new file mode 100644 index 000000000000..4c592bc5a958 --- /dev/null +++ b/arm-monitor/2017-03-01-preview/examples/patchActivityLogAlert.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-03-01-preview", + "activityLogAlertPatch": { + "location": "Global", + "tags": { "key1": "value1", "key2": "value2" }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { "key1": "value1", "key2": "value2" }, + "properties": { + "scopes": [ + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": false, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json similarity index 85% rename from arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json rename to arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json index e6100b01a5ed..81f64dd0944a 100644 --- a/arm-monitor/2017-03-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json @@ -162,6 +162,52 @@ } } } + }, + "patch": { + "description": "Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method.", + "operationId": "ActivityLogAlerts_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlertPatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActivityLogAlertResourcePatch" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing activity log alert was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + } + }, + "x-ms-examples": { + "Path an activity log alert": { + "$ref": "../examples/patchActivityLogAlert.json" + } + } } }, "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts": { @@ -414,6 +460,30 @@ "type": "string" } } + }, + "ActivityLogAlertResourcePatch": { + "description": "An activity log alert resource for patch operations.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActivityLogAlertPatch" + } + } + }, + "ActivityLogAlertPatch": { + "description": "An Azure activity log alert for patch operations.", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated." + } + } } }, "parameters": { diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index f3618f01d375..f68461c08511 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -7,7 +7,7 @@ "./2015-04-01/swagger/autoscale_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", - "./2017-03-01/swagger/activityLogAlerts_API.json", + "./2017-03-01-preview/swagger/activityLogAlerts_API.json", "./2016-03-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/logProfiles_API.json", "./2016-03-01/swagger/serviceDiagnosticsSettings_API.json" diff --git a/monitor/2016-03-01/examples/GetMetricDefinitions.json b/monitor/2016-03-01/examples/GetMetricDefinitions.json index f1d9c4969733..fda5f7bc6329 100644 --- a/monitor/2016-03-01/examples/GetMetricDefinitions.json +++ b/monitor/2016-03-01/examples/GetMetricDefinitions.json @@ -7,6 +7,7 @@ "responses": { "200": { "body": { + "value": [ { "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", diff --git a/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json b/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json index 3a9ed660a5f1..ccbe7670ed6f 100644 --- a/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json +++ b/monitor/2016-03-01/examples/GetMetricDefinitionsFiltered.json @@ -8,6 +8,7 @@ "responses": { "200": { "body": { + "value": [ { "resourceId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", From 034baa18c1c2b6b5569e6a648758710217eae203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 7 Apr 2017 13:47:48 -0700 Subject: [PATCH 19/46] Category support for metrics in diagnostics settings (on behalf of Shrirang Khisti) --- .../2016-03-01/swagger/diagnosticsSettings_API.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json index 1a279d40a531..80f79b3944f1 100644 --- a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json @@ -76,7 +76,7 @@ "workspaceId":"", "metrics": [ { - "timeGrain":"PT1M", + "category":"WorkflowMetrics", "enabled":true, "retentionPolicy": { "enabled":false, @@ -151,7 +151,7 @@ "workspaceId":"", "metrics": [ { - "timeGrain":"PT1M", + "category":"WorkflowMetrics", "enabled":true, "retentionPolicy": { "enabled":false, @@ -309,6 +309,10 @@ "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 timegrain is enabled." @@ -318,7 +322,7 @@ "description": "the retention policy for this timegrain." } }, - "required": [ "enabled", "timeGrain" ], + "required": [ "enabled" ], "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." }, "LogSettings": { From 337daa1b1cbc0e316439b6aaac82d8df61e34c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 7 Apr 2017 15:11:30 -0700 Subject: [PATCH 20/46] Fixing the api-version for diagnostics settings --- .../swagger/diagnosticsSettings_API.json | 2 +- .../swagger/serviceDiagnosticsSettings_API.json | 2 +- arm-monitor/compositeMonitorManagementClient.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename arm-monitor/{2016-03-01 => 2016-09-01}/swagger/diagnosticsSettings_API.json (99%) rename arm-monitor/{2016-03-01 => 2016-09-01}/swagger/serviceDiagnosticsSettings_API.json (99%) diff --git a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json similarity index 99% rename from arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json rename to arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json index 80f79b3944f1..27ce2bc6e25d 100644 --- a/arm-monitor/2016-03-01/swagger/diagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "version": "2016-03-01" + "version": "2016-09-01" }, "host": "management.azure.com", "schemes": [ diff --git a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json similarity index 99% rename from arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json rename to arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json index 9ad7676d99eb..53ab6ca5e324 100644 --- a/arm-monitor/2016-03-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "version": "2016-03-01" + "version": "2016-09-01" }, "host": "management.azure.com", "schemes": [ diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index f68461c08511..234d112005ab 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -8,8 +8,8 @@ "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", "./2017-03-01-preview/swagger/activityLogAlerts_API.json", - "./2016-03-01/swagger/diagnosticsSettings_API.json", + "./2016-09-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/logProfiles_API.json", - "./2016-03-01/swagger/serviceDiagnosticsSettings_API.json" + "./2016-09-01/swagger/serviceDiagnosticsSettings_API.json" ] } \ No newline at end of file From e1d4d19400d4bb1525c7a500c2d53aadb42bc188 Mon Sep 17 00:00:00 2001 From: gucalder Date: Fri, 7 Apr 2017 23:13:52 -0700 Subject: [PATCH 21/46] Fixing incorrect name in one parameter of one example and capitalizing one description. --- .../2017-03-01-preview/examples/deleteActivityLogAlert.json | 2 +- .../2017-03-01-preview/swagger/activityLogAlerts_API.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json b/arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json index 431d9efeddd4..05fab8bcc4cd 100644 --- a/arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json +++ b/arm-monitor/2017-03-01-preview/examples/deleteActivityLogAlert.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", "resourceGroupName": "Default-ActivityLogAlerts", - "actionGroupName": "SampleActivityLogAlert", + "activityLogAlertName": "SampleActivityLogAlert", "api-version": "2017-03-01-preview" }, "responses": { diff --git a/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json index 81f64dd0944a..126f4cc72888 100644 --- a/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json @@ -440,7 +440,7 @@ "additionalProperties": { "type": "string" }, - "description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload." + "description": "The dictionary of custom properties to include with the post operation. These data are appended to the webhook payload." } }, "required": [ From 60e5123ce1edc7dd605dcbe8c7739680fcddc8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 14 Apr 2017 11:00:37 -0700 Subject: [PATCH 22/46] Adding deprecation tags and messages to the old diagnostic settings api --- .../serviceDiagnosticsSettings_API.json | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json index 53ab6ca5e324..c31eed6c761b 100644 --- a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json @@ -38,8 +38,9 @@ "tags": [ "ServiceDiagnosticSettings" ], + "deprecated": true, "operationId": "ServiceDiagnosticSettings_Get", - "description": "Gets the active diagnostic settings for the specified resource.", + "description": "Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -101,8 +102,9 @@ "tags": [ "ServiceDiagnosticSettings" ], + "deprecated": true, "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", - "description": "Create or update new diagnostic settings for the specified resource.", + "description": "Create or update new diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -165,38 +167,39 @@ } }, "patch": { - "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method.", - "operationId": "ServiceDiagnosticSettings_Update", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "serviceDiagnosticSettingsResource", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "description": "Parameters supplied to the operation." - } - ], - "responses": { - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "200": { - "description": "An existing service diagnostics setting resource was successfully updated.", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - } - } + "deprecated": true, + "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases.", + "operationId": "ServiceDiagnosticSettings_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "serviceDiagnosticSettingsResource", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing service diagnostics setting resource was successfully updated.", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + } + } } } } From 7689f0c1ac3e0654a85b2809d89931a67fbcd61b Mon Sep 17 00:00:00 2001 From: William Lyles Date: Tue, 18 Apr 2017 12:39:37 -0700 Subject: [PATCH 23/46] Add swagger documentation for the Action Groups API --- .../examples/createOrUpdateActionGroup.json | 138 +++++ .../examples/deleteActionGroup.json | 18 + .../2017-04-01/examples/enableReceiver.json | 17 + .../2017-04-01/examples/getActionGroup.json | 56 ++ .../2017-04-01/examples/listActionGroups.json | 86 +++ .../2017-04-01/swagger/actionGroups_API.json | 506 ++++++++++++++++++ .../compositeMonitorManagementClient.json | 3 +- 7 files changed, 823 insertions(+), 1 deletion(-) create mode 100644 arm-monitor/2017-04-01/examples/createOrUpdateActionGroup.json create mode 100644 arm-monitor/2017-04-01/examples/deleteActionGroup.json create mode 100644 arm-monitor/2017-04-01/examples/enableReceiver.json create mode 100644 arm-monitor/2017-04-01/examples/getActionGroup.json create mode 100644 arm-monitor/2017-04-01/examples/listActionGroups.json create mode 100644 arm-monitor/2017-04-01/swagger/actionGroups_API.json diff --git a/arm-monitor/2017-04-01/examples/createOrUpdateActionGroup.json b/arm-monitor/2017-04-01/examples/createOrUpdateActionGroup.json new file mode 100644 index 000000000000..9741f061f21b --- /dev/null +++ b/arm-monitor/2017-04-01/examples/createOrUpdateActionGroup.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2017-04-01", + "actionGroup": { + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com" + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled" + } + ], + "smsReceivers":[ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers":[ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook" + } + ] + } + } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Enabled" + } + ], + "smsReceivers":[ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Enabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers":[ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/deleteActionGroup.json b/arm-monitor/2017-04-01/examples/deleteActionGroup.json new file mode 100644 index 000000000000..c6e835cb2895 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/deleteActionGroup.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/enableReceiver.json b/arm-monitor/2017-04-01/examples/enableReceiver.json new file mode 100644 index 000000000000..242f9d73e5f3 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/enableReceiver.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2017-04-01", + "enableRequest": { + "receiverName": "John Doe's mobile" + } + }, + "responses": { + "200": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/getActionGroup.json b/arm-monitor/2017-04-01/examples/getActionGroup.json new file mode 100644 index 000000000000..1066a62661e5 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/getActionGroup.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "actionGroupName": "SampleActionGroup", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled" + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Disabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/listActionGroups.json b/arm-monitor/2017-04-01/examples/listActionGroups.json new file mode 100644 index 000000000000..c8e9e4901dd5 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/listActionGroups.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-NotificationRules", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample", + "enabled": true, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled" + }, + { + "name": "Jane Smith's email", + "emailAddress": "janesmith@email.com", + "status": "Disabled" + } + ], + "smsReceivers": [ + { + "name": "John Doe's mobile", + "countryCode": "1", + "phoneNumber": "1234567890", + "status": "Disabled" + }, + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [ + { + "name": "Sample webhook", + "serviceUri": "http://www.example.com/webhook" + } + ] + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup2", + "type": "Microsoft.Insights/ActionGroups", + "name": "SampleActionGroup2", + "location": "Global", + "tags": {}, + "properties": { + "groupShortName": "sample2", + "enabled": false, + "emailReceivers": [ + { + "name": "John Doe's email", + "emailAddress": "johndoe@email.com", + "status": "Enabled" + } + ], + "smsReceivers": [ + { + "name": "Jane Smith's mobile", + "countryCode": "1", + "phoneNumber": "0987654321", + "status": "Enabled" + } + ], + "webhookReceivers": [] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/swagger/actionGroups_API.json b/arm-monitor/2017-04-01/swagger/actionGroups_API.json new file mode 100644 index 000000000000..24fca2d32458 --- /dev/null +++ b/arm-monitor/2017-04-01/swagger/actionGroups_API.json @@ -0,0 +1,506 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Action Groups API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2017-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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}": { + "put": { + "description": "Create a new action group or update an existing one.", + "operationId": "ActionGroups_CreateOrUpdate", + "x-ms-examples": { + "Create or update an action group": { + "$ref": "../examples/createOrUpdateActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "actionGroup", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActionGroupResource" + }, + "description": "The action group to create or use for the update." + } + ], + "responses": { + "200": { + "description": "An existing action group was successfully updated.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "201": { + "description": "A new action group was successfully created.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "default": { + "description": "An error occurred and the action group could not be created or updated." + } + } + }, + "get": { + "description": "Get an action group.", + "operationId": "ActionGroups_Get", + "x-ms-examples": { + "Get an action group": { + "$ref": "../examples/getActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupResource" + } + }, + "404": { + "description": "The action group does not exist." + }, + "default": { + "description": "An error occurred and the action group could not be retrieved." + } + } + }, + "delete": { + "description": "Delete an action group.", + "operationId": "ActionGroups_Delete", + "x-ms-examples": { + "Delete an action group": { + "$ref": "../examples/deleteActionGroup.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The action group was successfully deleted." + }, + "204": { + "description": "The action group does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the action group could not be deleted." + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups": { + "get": { + "description": "Get a list of all action groups in a subscription.", + "operationId": "ActionGroups_ListBySubscriptionId", + "x-ms-examples": { + "List action groups": { + "$ref": "../examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupList" + } + }, + "default": { + "description": "An error occurred and the list of action groups could not be retrieved." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups": { + "get": { + "description": "Get a list of all action groups in a resource group.", + "operationId": "ActionGroups_ListByResourceGroup", + "x-ms-examples": { + "List action groups": { + "$ref": "../examples/listActionGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActionGroupList" + } + }, + "default": { + "description": "An error occurred and the list of action groups could not be retrieved." + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe": { + "post": { + "description": "Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.", + "operationId": "ActionGroups_EnableReceiver", + "x-ms-examples": { + "List all action groups": { + "$ref": "../examples/enableReceiver.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActionGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "enableRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EnableRequest" + }, + "description": "The receiver to re-enable." + } + ], + "responses": { + "200": { + "description": "The receiver was successfully enabled." + }, + "409": { + "description": "The receiver is already enabled in the action group." + }, + "404": { + "description": "The action group was not found or no matching receiver was found in the action group." + }, + "default": { + "description": "An error occurred and the receiver could not be enabled." + } + } + } + } + }, + "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" + }, + "ActionGroupResource": { + "description": "An action group resource.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActionGroup" + } + } + }, + "ActionGroupList": { + "description": "A list of action groups.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionGroupResource" + }, + "description": "The list of action groups." + } + } + }, + "ActionGroup": { + "description": "An Azure action group.", + "properties": { + "groupShortName": { + "type": "string", + "maxLength": 15, + "description": "The short name of the action group. This will be used in SMS messages." + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this action group is enabled. If an action group is not enabled, then none of its receviers will receive communications." + }, + "emailReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/EmailReceiver" + }, + "description": "The list of email receivers that are part of this action group." + }, + "smsReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/SmsReceiver" + }, + "description": "The list of SMS receivers that are part of this action group." + }, + "webhookReceivers": { + "type": "array", + "items": { + "$ref": "#/definitions/WebhookReceiver" + }, + "description": "The list of webhook receivers that are part of this action group." + } + }, + "required": [ + "groupShortName", + "enabled" + ] + }, + "EmailReceiver": { + "description": "An email receiver.", + "properties": { + "name": { + "type": "string", + "description": "The name of the email receiver. Names must be unique across all receivers within an action group." + }, + "emailAddress": { + "type": "string", + "description": "The email address of this receiver." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus" + } + }, + "required": [ + "name", + "emailAddress" + ] + }, + "SmsReceiver": { + "description": "An SMS receiver.", + "properties": { + "name": { + "type": "string", + "description": "The name of the SMS receiver. Names must be unique across all receivers within an action group." + }, + "countryCode": { + "type": "string", + "description": "The country code of the SMS receiver." + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the SMS receiver." + }, + "status": { + "readOnly": true, + "$ref": "#/definitions/ReceiverStatus" + } + }, + "required": [ + "name", + "countryCode", + "phoneNumber" + ] + }, + "WebhookReceiver": { + "description": "A webhook receiver.", + "properties": { + "name": { + "type": "string", + "description": "The name of the webhook receiver. Names must be unique across all receivers within an action group." + }, + "serviceUri": { + "type": "string", + "description": "The URI where webhooks should be sent." + } + }, + "required": [ + "name", + "serviceUri" + ] + }, + "ReceiverStatus": { + "type": "string", + "enum": [ + "NotSpecified", + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ReceiverStatus", + "modelAsString": false + }, + "description": "Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications." + }, + "EnableRequest": { + "description": "Describes a receiver that should be resubscribed.", + "properties": { + "receiverName": { + "type": "string", + "description": "The name of the receiver to resubscribe." + } + }, + "required": [ + "receiverName" + ] + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ActionGroupNameParameter": { + "name": "actionGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the action group.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} \ No newline at end of file diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index 234d112005ab..a80376cd655d 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -10,6 +10,7 @@ "./2017-03-01-preview/swagger/activityLogAlerts_API.json", "./2016-09-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/logProfiles_API.json", - "./2016-09-01/swagger/serviceDiagnosticsSettings_API.json" + "./2016-09-01/swagger/serviceDiagnosticsSettings_API.json", + "./2017-04-01/swagger/actionGroups_API.json" ] } \ No newline at end of file From 5c1157f10d817e78fa850a7b5935003b3ccb897e Mon Sep 17 00:00:00 2001 From: davmc Date: Mon, 24 Apr 2017 11:14:49 -0700 Subject: [PATCH 24/46] Add new api-version for ActivityLogAlerts --- .../createOrUpdateActivityLogAlert.json | 121 +++++ .../examples/deleteActivityLogAlert.json | 18 + .../examples/getActivityLogAlert.json | 49 ++ .../examples/listActivityLogAlerts.json | 81 ++++ .../swagger/activityLogAlerts_API.json | 451 ++++++++++++++++++ .../compositeMonitorManagementClient.json | 2 +- 6 files changed, 721 insertions(+), 1 deletion(-) create mode 100644 arm-monitor/2017-04-01/examples/createOrUpdateActivityLogAlert.json create mode 100644 arm-monitor/2017-04-01/examples/deleteActivityLogAlert.json create mode 100644 arm-monitor/2017-04-01/examples/getActivityLogAlert.json create mode 100644 arm-monitor/2017-04-01/examples/listActivityLogAlerts.json create mode 100644 arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json diff --git a/arm-monitor/2017-04-01/examples/createOrUpdateActivityLogAlert.json b/arm-monitor/2017-04-01/examples/createOrUpdateActivityLogAlert.json new file mode 100644 index 000000000000..da116b2822ab --- /dev/null +++ b/arm-monitor/2017-04-01/examples/createOrUpdateActivityLogAlert.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-04-01", + "activityLogAlert": { + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + }, + "201": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { }, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/deleteActivityLogAlert.json b/arm-monitor/2017-04-01/examples/deleteActivityLogAlert.json new file mode 100644 index 000000000000..9e64bbf6ceda --- /dev/null +++ b/arm-monitor/2017-04-01/examples/deleteActivityLogAlert.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "actionGroupName": "SampleActivityLogAlert", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/getActivityLogAlert.json b/arm-monitor/2017-04-01/examples/getActivityLogAlert.json new file mode 100644 index 000000000000..7172f109e8fe --- /dev/null +++ b/arm-monitor/2017-04-01/examples/getActivityLogAlert.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/examples/listActivityLogAlerts.json b/arm-monitor/2017-04-01/examples/listActivityLogAlerts.json new file mode 100644 index 000000000000..ae53a7ca9351 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/listActivityLogAlerts.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "api-version": "2017-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + }, + { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert2", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert2", + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts" + ], + "enabled": true, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { } + } + ] + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json new file mode 100644 index 000000000000..7c047de8d6b7 --- /dev/null +++ b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json @@ -0,0 +1,451 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Activity Log Alerts API", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2017-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": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}": { + "put": { + "description": "Create a new activity log alert or update an existing one.", + "operationId": "ActivityLogAlerts_CreateOrUpdate", + "x-ms-examples": { + "Create or update an activity log alert": { + "$ref": "../examples/createOrUpdateActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlert", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + }, + "description": "The activity log alert to create or use for the update." + } + ], + "responses": { + "200": { + "description": "An existing activity log alert was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "201": { + "description": "A new activity log alert was successfully created.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the activity log alert could not be created or updated.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "description": "Get an activity log alert.", + "operationId": "ActivityLogAlerts_Get", + "x-ms-examples": { + "Get an activity log alert": { + "$ref": "../examples/getActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + }, + "default": { + "description": "An error occurred and the activity log alert could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete an activity log alert.", + "operationId": "ActivityLogAlerts_Delete", + "x-ms-examples": { + "Delete an activity log alert": { + "$ref": "../examples/deleteActivityLogAlert.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The activity log alert was successfully deleted." + }, + "204": { + "description": "The activity log alert does not exist. It may have already been deleted." + }, + "default": { + "description": "An error occurred and the activity log alert could not be deleted.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts": { + "get": { + "description": "Get a list of all activity log alerts in a subscription.", + "operationId": "ActivityLogAlerts_ListBySubscriptionId", + "x-ms-examples": { + "List activity log alerts": { + "$ref": "../examples/listActivityLogAlerts.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertList" + } + }, + "default": { + "description": "An error occurred and the list of activity log alerts could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts": { + "get": { + "description": "Get a list of all activity log alerts in a resource group.", + "operationId": "ActivityLogAlerts_ListByResourceGroup", + "x-ms-examples": { + "List activity log alerts": { + "$ref": "../examples/listActivityLogAlerts.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request succeeded.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertList" + } + }, + "default": { + "description": "An error occurred and the list of activity log alerts could not be retrieved.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "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" + }, + "ActivityLogAlertResource": { + "description": "An activity log alert resource.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActivityLogAlert" + } + } + }, + "ActivityLogAlertList": { + "description": "A list of activity log alerts.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertResource" + }, + "description": "The list of activity log alerts." + } + } + }, + "ActivityLogAlert": { + "description": "An Azure activity log alert.", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of resourceIds that will be used as prefixes. The alert will only apply to activityLogs with resourceIds that fall under one of these prefixes. This list must include at least one item." + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated." + }, + "condition": { + "$ref": "#/definitions/ActivityLogAlertAllOfCondition", + "description": "The conditon that will cause this alert to activate." + }, + "actions": { + "$ref": "#/definitions/ActivityLogAlertActionList", + "description": "The actions that will activate when the condition is met." + }, + "description": { + "type": "string", + "description": "A description of this activity log alert." + } + }, + "required": [ + "scopes", + "condition", + "actions" + ] + }, + "ActivityLogAlertAllOfCondition": { + "properties": { + "allOf": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertLeafCondition" + }, + "description": "The list of activity log alert conditions." + } + }, + "description": "An Activity Log alert condition that is met when all its member conditions are met.", + "required": [ + "allOf" + ] + }, + "ActivityLogAlertLeafCondition": { + "properties": { + "field": { + "type": "string", + "description": "The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'." + }, + "equals": { + "type": "string", + "description": "The field value will be compared to this value (case-insensitive) to determine if the condition is met." + } + }, + "description": "An Activity Log alert condition that is met by comparing an activity log field and value.", + "required": [ + "field", + "equals" + ] + }, + "ActivityLogAlertActionList": { + "description": "A list of activity log alert actions.", + "properties": { + "actionGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/ActivityLogAlertActionGroup" + }, + "description": "The list of activity log alerts." + } + } + }, + "ActivityLogAlertActionGroup": { + "description": "A pointer to an Azure Action Group.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "The resourceId of the action group. This cannot be null or empty." + }, + "webhookProperties": { + "additionalProperties": { + "type": "string" + }, + "description": "the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload." + } + }, + "required": [ + "actionGroupId" + ] + }, + "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": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription Id." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ActivityLogAlertNameParameter": { + "name": "activityLogAlertName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the activity log alert.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} \ No newline at end of file diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index a80376cd655d..48d4f75f6490 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -7,7 +7,7 @@ "./2015-04-01/swagger/autoscale_API.json", "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", - "./2017-03-01-preview/swagger/activityLogAlerts_API.json", + "./2017-04-01/swagger/activityLogAlerts_API.json", "./2016-09-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/logProfiles_API.json", "./2016-09-01/swagger/serviceDiagnosticsSettings_API.json", From c68b48a2c309db3f2e1752d67bb82329703d9503 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 25 Apr 2017 17:00:22 -0700 Subject: [PATCH 25/46] [Monitoring] Remove diagnosticSettings_API from the generation --- arm-monitor/compositeMonitorManagementClient.json | 1 - 1 file changed, 1 deletion(-) diff --git a/arm-monitor/compositeMonitorManagementClient.json b/arm-monitor/compositeMonitorManagementClient.json index 48d4f75f6490..07d056aee06c 100644 --- a/arm-monitor/compositeMonitorManagementClient.json +++ b/arm-monitor/compositeMonitorManagementClient.json @@ -8,7 +8,6 @@ "./2016-03-01/swagger/alertRules_API.json", "./2016-03-01/swagger/alertRulesIncidents_API.json", "./2017-04-01/swagger/activityLogAlerts_API.json", - "./2016-09-01/swagger/diagnosticsSettings_API.json", "./2016-03-01/swagger/logProfiles_API.json", "./2016-09-01/swagger/serviceDiagnosticsSettings_API.json", "./2017-04-01/swagger/actionGroups_API.json" From d637f1bfd19a78946b4c6f273befa348a67d7c6b Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 25 Apr 2017 17:30:37 -0700 Subject: [PATCH 26/46] [Monitoring] Remove diagnosticSettings_API until ready for release --- .../swagger/diagnosticsSettings_API.json | 436 ------------------ 1 file changed, 436 deletions(-) delete mode 100644 arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json diff --git a/arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json deleted file mode 100644 index 27ce2bc6e25d..000000000000 --- a/arm-monitor/2016-09-01/swagger/diagnosticsSettings_API.json +++ /dev/null @@ -1,436 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "MonitorManagementClient", - "version": "2016-09-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": { - "/{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", - "serviceBusRuleId":"/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 - } - } - ] - } - } - } - } - } - }, - "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", - "serviceBusRuleId":"/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 - } - } - ] - } - } - } - } - } - }, - "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" - } - } - }, - "patch": { - "description": "Updates an existing DiagnosticSettingsResource tags. To update other fields use the CreateOrUpdate method.", - "operationId": "DiagnosticSettings_Update", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "diagnosticSettingResource", - "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": "An existing DiagnosticSettingResource was successfully updated.", - "schema": { - "$ref": "#/definitions/DiagnosticSettingsResource" - } - } - } - } - } - }, - "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 timegrain is enabled." - }, - "retentionPolicy": { - "$ref": "#/definitions/RetentionPolicy", - "description": "the retention policy for this timegrain." - } - }, - "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." - }, - "serviceBusRuleId": { - "type": "string", - "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." - }, - "eventHubAuthorizationRuleId": { - "type": "string", - "description": "The resource Id for the event hub authorization rule." - }, - "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" - }, - "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 From e77a3d676e4ab17f8a7d44ecd538910247557a31 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 25 Apr 2017 17:44:39 -0700 Subject: [PATCH 27/46] [Monitoring] Removing the deprecation flag --- .../2016-09-01/swagger/serviceDiagnosticsSettings_API.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json index c31eed6c761b..b4971f80ae89 100644 --- a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json @@ -38,7 +38,6 @@ "tags": [ "ServiceDiagnosticSettings" ], - "deprecated": true, "operationId": "ServiceDiagnosticSettings_Get", "description": "Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ @@ -102,7 +101,6 @@ "tags": [ "ServiceDiagnosticSettings" ], - "deprecated": true, "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", "description": "Create or update new diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", "parameters": [ From 06a12c1b780ccb547e21c940cdcc9a49683c312e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 26 Apr 2017 17:00:25 -0700 Subject: [PATCH 28/46] Removing deprecation message from patch operation serviceDiagnosticSettings --- .../2016-09-01/swagger/serviceDiagnosticsSettings_API.json | 1 - 1 file changed, 1 deletion(-) diff --git a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json index b4971f80ae89..57a96c86fc38 100644 --- a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json @@ -165,7 +165,6 @@ } }, "patch": { - "deprecated": true, "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases.", "operationId": "ServiceDiagnosticSettings_Update", "parameters": [ From eb0d0d0dab5aaf12e258f690a962e79528e53d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 28 Apr 2017 15:02:08 -0700 Subject: [PATCH 29/46] Improving documentation for metrics and activity logs --- .../examples/GetActivityLogsFiltered.json | 83 +++++++++++++++++++ .../GetActivityLogsFilteredAndSelected.json | 37 +++++++++ .../examples/GetActivityLogsNoParams.json | 82 ++++++++++++++++++ .../examples/GetActivityLogsSelected.json | 36 ++++++++ .../2015-04-01/swagger/activityLogs_API.json | 14 +++- .../swagger/metricDefinitions_API.json | 4 +- monitor/2016-09-01/examples/GetMetric.json | 62 ++++++++++++++ .../examples/GetMetricFiltered.json | 63 ++++++++++++++ monitor/2016-09-01/swagger/metrics_API.json | 10 ++- 9 files changed, 382 insertions(+), 9 deletions(-) create mode 100644 monitor/2015-04-01/examples/GetActivityLogsFiltered.json create mode 100644 monitor/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json create mode 100644 monitor/2015-04-01/examples/GetActivityLogsNoParams.json create mode 100644 monitor/2015-04-01/examples/GetActivityLogsSelected.json create mode 100644 monitor/2016-09-01/examples/GetMetric.json create mode 100644 monitor/2016-09-01/examples/GetMetricFiltered.json diff --git a/monitor/2015-04-01/examples/GetActivityLogsFiltered.json b/monitor/2015-04-01/examples/GetActivityLogsFiltered.json new file mode 100644 index 000000000000..d1240f00184b --- /dev/null +++ b/monitor/2015-04-01/examples/GetActivityLogsFiltered.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "$filter": "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'", + "api-version": "2015-04-01", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + }, + "responses": { + "200": { + "body": { + "value": [ { + "authorization": { + "action": "microsoft.support/supporttickets/write", + "role": "Subscription Admin", + "scope": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841" + }, + "caller": "admin@contoso.com", + "claims": { + "aud": "https://management.core.windows.net/", + "iss": "https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/", + "iat": "1421876371", + "nbf": "1421876371", + "exp": "1421880271", + "ver": "1.0", + "http://schemas.microsoft.com/identity/claims/tenantid": "1e8d8218-c5e7-4578-9acc-9abbd5d23315 ", + "http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd", + "http://schemas.microsoft.com/identity/claims/objectidentifier": "2468adf0-8211-44e3-95xq-85137af64708", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn": "admin@contoso.com", + "puid": "20030000801A118C", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "9vckmEGF7zDKk1YzIY8k0t1_EAPaXoeHyPRn6f413zM", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "John", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "Smith", + "name": "John Smith", + "groups": "cacfe77c-e058-4712-83qw-f9b08849fd60,7f71d11d-4c41-4b23-99d2-d32ce7aa621c,31522864-0578-4ea0-9gdc-e66cc564d18c", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": " admin@contoso.com", + "appid": "c44b4083-3bq0-49c1-b47d-974e53cbdf3c", + "appidacr": "2", + "http://schemas.microsoft.com/identity/claims/scope": "user_impersonation", + "http://schemas.microsoft.com/claims/authnclassreference": "1" + }, + "correlationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "description": "", + "eventDataId": "44ade6b4-3813-45e6-ae27-7420a95fa2f8", + "eventName": { + "value": "EndRequest", + "localizedValue": "End request" + }, + "httpRequest": { + "clientRequestId": "27003b25-91d3-418f-8eb1-29e537dcb249", + "clientIpAddress": "192.168.35.115", + "method": "PUT" + }, + "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841/events/44ade6b4-3813-45e6-ae27-7420a95fa2f8/ticks/635574752669792776", + "level": "Informational", + "resourceGroupName": "MSSupportGroup", + "resourceProviderName": { + "value": "microsoft.support", + "localizedValue": "microsoft.support" + }, + "operationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "operationName": { + "value": "microsoft.support/supporttickets/write", + "localizedValue": "microsoft.support/supporttickets/write" + }, + "properties": { + "statusCode": "Created" + }, + "status": { + "value": "Succeeded", + "localizedValue": "Succeeded" + }, + "subStatus": { + "value": "Created", + "localizedValue": "Created (HTTP Status Code: 201)" + }, + "eventTimestamp": "2015-01-21T22:14:26.9792776Z", + "submissionTimestamp": "2015-01-21T22:14:39.9936304Z", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + } ], + "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" + } + } + } +} \ No newline at end of file diff --git a/monitor/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json b/monitor/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json new file mode 100644 index 000000000000..0077b4193a88 --- /dev/null +++ b/monitor/2015-04-01/examples/GetActivityLogsFilteredAndSelected.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "$filter": "eventTimestamp ge '2015-01-21T20:00:00Z' and eventTimestamp le '2015-01-23T20:00:00Z' and resourceGroupName eq 'MSSupportGroup'", + "$select": "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId", + "api-version": "2015-04-01", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + }, + "responses": { + "200": { + "body": { + "value": [ { + "correlationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "eventName": { + "value": "EndRequest", + "localizedValue": "End request" + }, + "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841/events/44ade6b4-3813-45e6-ae27-7420a95fa2f8/ticks/635574752669792776", + "resourceGroupName": "MSSupportGroup", + "resourceProviderName": { + "value": "microsoft.support", + "localizedValue": "microsoft.support" + }, + "operationName": { + "value": "microsoft.support/supporttickets/write", + "localizedValue": "microsoft.support/supporttickets/write" + }, + "status": { + "value": "Succeeded", + "localizedValue": "Succeeded" + }, + "eventTimestamp": "2015-01-21T22:14:26.9792776Z" + } ], + "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" + } + } + } +} \ No newline at end of file diff --git a/monitor/2015-04-01/examples/GetActivityLogsNoParams.json b/monitor/2015-04-01/examples/GetActivityLogsNoParams.json new file mode 100644 index 000000000000..9b7b95534d62 --- /dev/null +++ b/monitor/2015-04-01/examples/GetActivityLogsNoParams.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2015-04-01", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + }, + "responses": { + "200": { + "body": { + "value": [ { + "authorization": { + "action": "microsoft.support/supporttickets/write", + "role": "Subscription Admin", + "scope": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841" + }, + "caller": "admin@contoso.com", + "claims": { + "aud": "https://management.core.windows.net/", + "iss": "https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/", + "iat": "1421876371", + "nbf": "1421876371", + "exp": "1421880271", + "ver": "1.0", + "http://schemas.microsoft.com/identity/claims/tenantid": "1e8d8218-c5e7-4578-9acc-9abbd5d23315 ", + "http://schemas.microsoft.com/claims/authnmethodsreferences": "pwd", + "http://schemas.microsoft.com/identity/claims/objectidentifier": "2468adf0-8211-44e3-95xq-85137af64708", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn": "admin@contoso.com", + "puid": "20030000801A118C", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "9vckmEGF7zDKk1YzIY8k0t1_EAPaXoeHyPRn6f413zM", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "John", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "Smith", + "name": "John Smith", + "groups": "cacfe77c-e058-4712-83qw-f9b08849fd60,7f71d11d-4c41-4b23-99d2-d32ce7aa621c,31522864-0578-4ea0-9gdc-e66cc564d18c", + "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": " admin@contoso.com", + "appid": "c44b4083-3bq0-49c1-b47d-974e53cbdf3c", + "appidacr": "2", + "http://schemas.microsoft.com/identity/claims/scope": "user_impersonation", + "http://schemas.microsoft.com/claims/authnclassreference": "1" + }, + "correlationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "description": "", + "eventDataId": "44ade6b4-3813-45e6-ae27-7420a95fa2f8", + "eventName": { + "value": "EndRequest", + "localizedValue": "End request" + }, + "httpRequest": { + "clientRequestId": "27003b25-91d3-418f-8eb1-29e537dcb249", + "clientIpAddress": "192.168.35.115", + "method": "PUT" + }, + "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841/events/44ade6b4-3813-45e6-ae27-7420a95fa2f8/ticks/635574752669792776", + "level": "Informational", + "resourceGroupName": "MSSupportGroup", + "resourceProviderName": { + "value": "microsoft.support", + "localizedValue": "microsoft.support" + }, + "operationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "operationName": { + "value": "microsoft.support/supporttickets/write", + "localizedValue": "microsoft.support/supporttickets/write" + }, + "properties": { + "statusCode": "Created" + }, + "status": { + "value": "Succeeded", + "localizedValue": "Succeeded" + }, + "subStatus": { + "value": "Created", + "localizedValue": "Created (HTTP Status Code: 201)" + }, + "eventTimestamp": "2015-01-21T22:14:26.9792776Z", + "submissionTimestamp": "2015-01-21T22:14:39.9936304Z", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + } ], + "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" + } + } + } +} \ No newline at end of file diff --git a/monitor/2015-04-01/examples/GetActivityLogsSelected.json b/monitor/2015-04-01/examples/GetActivityLogsSelected.json new file mode 100644 index 000000000000..f496ffab668d --- /dev/null +++ b/monitor/2015-04-01/examples/GetActivityLogsSelected.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "$select": "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId", + "api-version": "2015-04-01", + "subscriptionId": "089bd33f-d4ec-47fe-8ba5-0753aa5c5b33" + }, + "responses": { + "200": { + "body": { + "value": [ { + "correlationId": "1e121103-0ba6-4300-ac9d-952bb5d0c80f", + "eventName": { + "value": "EndRequest", + "localizedValue": "End request" + }, + "id": "/subscriptions/089bd33f-d4ec-47fe-8ba5-0753aa5c5b33/resourceGroups/MSSupportGroup/providers/microsoft.support/supporttickets/115012112305841/events/44ade6b4-3813-45e6-ae27-7420a95fa2f8/ticks/635574752669792776", + "resourceGroupName": "MSSupportGroup", + "resourceProviderName": { + "value": "microsoft.support", + "localizedValue": "microsoft.support" + }, + "operationName": { + "value": "microsoft.support/supporttickets/write", + "localizedValue": "microsoft.support/supporttickets/write" + }, + "status": { + "value": "Succeeded", + "localizedValue": "Succeeded" + }, + "eventTimestamp": "2015-01-21T22:14:26.9792776Z" + } ], + "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" + } + } + } +} \ No newline at end of file diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index 8812351912da..b34426ce5b83 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -39,7 +39,7 @@ "ActivityLogs" ], "operationId": "ActivityLogs_List", - "description": "Provides the list of records from the activity logs.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
-List events for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.

**NOTE**: No other syntax is allowed.", + "description": "Provides the list of records from the activity logs.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -145,7 +145,13 @@ "x-ms-pageable": { "nextLinkName": "nextLink" }, - "x-ms-odata": "#/definitions/EventData" + "x-ms-odata": "#/definitions/EventData", + "x-ms-examples": { + "Get Activity Logs without filter or select": { "$ref": "../examples/GetActivityLogsNoParams.json" }, + "Get Activity Logs with filter": { "$ref": "../examples/GetActivityLogsFiltered.json" }, + "Get Activity Logs with select": { "$ref": "../examples/GetActivityLogsSelected.json" }, + "Get Activity Logs with filter and select": { "$ref": "../examples/GetActivityLogsFilteredAndSelected.json" } + } } } }, @@ -386,7 +392,7 @@ "in": "query", "type": "string", "required": false, - "description": "Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", + "description": "Reduces the set of data collected.
The **$filter** argument is very restricted and allows only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed.", "x-ms-parameter-location": "method" }, "SelectParameter": { @@ -394,7 +400,7 @@ "in": "query", "required": false, "type": "string", - "description": "Used to fetch events with only the given properties. The filter is a comma separated list of property names to be returned. Possible values are: authorization, channels, claims, correlationId, description, eventDataId, eventName, eventTimestamp, httpRequest, level, operationId, operationName, properties, resourceGroupName, resourceProviderName, resourceId, status, submissionTimestamp, subStatus, subscriptionId", + "description": "Used to fetch events with only the given properties.
The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*", "x-ms-parameter-location": "method" } } diff --git a/monitor/2016-03-01/swagger/metricDefinitions_API.json b/monitor/2016-03-01/swagger/metricDefinitions_API.json index 8a7992ad3249..6052f2cdddd9 100644 --- a/monitor/2016-03-01/swagger/metricDefinitions_API.json +++ b/monitor/2016-03-01/swagger/metricDefinitions_API.json @@ -39,7 +39,7 @@ "MetricDefinitions" ], "operationId": "MetricDefinitions_List", - "description": "Lists the metric definitions for the resource.
The **$filter** parameter is optional, and can be used to only retrieve certain metric definitions.
For example, get just the definition for the CPU percentage counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'.
This **$filter** is very restricted and allows only clauses of the form **'name eq '** separated by **or** logical operators.
**NOTE**: No other syntax is allowed.", + "description": "Lists the metric definitions for the resource.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -273,7 +273,7 @@ "name": "$filter", "in": "query", "type": "string", - "description": "Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", + "description": "Reduces the set of data collected by retrieving particular metric definitions from all the definitions available for the resource.
For example, to get just the definition for the 'CPU percentage' counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'.
Multiple metrics can be retrieved by joining together *'name eq '* clauses separated by *or* logical operators.
**NOTE**: No other syntax is allowed.", "x-ms-parameter-location": "method", "required": false }, diff --git a/monitor/2016-09-01/examples/GetMetric.json b/monitor/2016-09-01/examples/GetMetric.json new file mode 100644 index 000000000000..9b94e30368a5 --- /dev/null +++ b/monitor/2016-09-01/examples/GetMetric.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "api-version": "2016-09-01", + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "data": [ + { + "timeStamp":"2016-11-23T19:14:00Z", + "total":1.0 + }, + { + "timeStamp":"2016-11-23T19:15:00Z" + }, + { + "timeStamp":"2016-11-23T19:16:00Z" + }, + { + "timeStamp":"2016-11-23T19:17:00Z" + }, + { + "timeStamp":"2016-11-23T19:18:00Z" + }, + { + "timeStamp":"2016-11-23T19:19:00Z", + "total":1.0 + }, + { + "timeStamp":"2016-11-23T19:20:00Z" + }, + { + "timeStamp":"2016-11-23T19:21:00Z" + }, + { + "timeStamp":"2016-11-23T19:22:00Z" + }, + { + "timeStamp":"2016-11-23T19:23:00Z" + }, + { + "timeStamp":"2016-11-23T19:24:00Z", + "total":1.0 + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", + "name": { + "value":"RunsStarted", + "localizedValue":"Runs Started" + }, + "type":"Microsoft.Insights/metrics", + "unit":"Count" + } + ] + } + } + } +} \ No newline at end of file diff --git a/monitor/2016-09-01/examples/GetMetricFiltered.json b/monitor/2016-09-01/examples/GetMetricFiltered.json new file mode 100644 index 000000000000..60ed88f91a11 --- /dev/null +++ b/monitor/2016-09-01/examples/GetMetricFiltered.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$filter": "(name.value eq 'RunsStarted') and aggregationType eq 'Total' and startTime eq 2016-11-23 and endTime eq 2016-11-24 and timeGrain eq duration'PT1M'", + "resourceUri": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia", + "api-version": "2016-09-01", + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "data": [ + { + "timeStamp":"2016-11-23T19:14:00Z", + "total":1.0 + }, + { + "timeStamp":"2016-11-23T19:15:00Z" + }, + { + "timeStamp":"2016-11-23T19:16:00Z" + }, + { + "timeStamp":"2016-11-23T19:17:00Z" + }, + { + "timeStamp":"2016-11-23T19:18:00Z" + }, + { + "timeStamp":"2016-11-23T19:19:00Z", + "total":1.0 + }, + { + "timeStamp":"2016-11-23T19:20:00Z" + }, + { + "timeStamp":"2016-11-23T19:21:00Z" + }, + { + "timeStamp":"2016-11-23T19:22:00Z" + }, + { + "timeStamp":"2016-11-23T19:23:00Z" + }, + { + "timeStamp":"2016-11-23T19:24:00Z", + "total":1.0 + } + ], + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", + "name": { + "value":"RunsStarted", + "localizedValue":"Runs Started" + }, + "type":"Microsoft.Insights/metrics", + "unit":"Count" + } + ] + } + } + } +} \ No newline at end of file diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index deef13e7825f..2d0c50f64b41 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -39,7 +39,7 @@ "Metrics" ], "operationId": "Metrics_List", - "description": "Lists the metric values for a resource.
The **$filter** is used to reduce the set of metric data returned. Some common properties for this expression will be: name.value, aggregationType, startTime, endTime, timeGrain.
The filter expression uses these properties with comparison operators (eg. eq, gt, lt) and multiple expressions can be combined with parentheses and 'and/or' logical operators.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

>**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", + "description": "Lists the metric values for a resource.", "parameters": [ { "$ref": "#/parameters/ResourceUriParameter" @@ -121,7 +121,11 @@ "x-ms-pageable": { "nextLinkName": null }, - "x-ms-odata": "#/definitions/Metric" + "x-ms-odata": "#/definitions/Metric", + "x-ms-examples": { + "Get Metric without filter": { "$ref": "../examples/GetMetric.json" }, + "Get Metric with filter": { "$ref": "../examples/GetMetricFiltered.json" } + } } } }, @@ -262,7 +266,7 @@ "name": "$filter", "in": "query", "type": "string", - "description": "Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", + "description": "Reduces the set of data collected.
The filter is optional. If present it must contain a list of metric names to retrieve of the form: *(name.value eq 'metricName' [or name.value eq 'metricName' or ...])*. Optionally, the filter can contain conditions for the following attributes *aggregationType*, *startTime*, *endTime*, and *timeGrain* of the form *attributeName operator value*. Where operator is one of *ne*, *eq*, *gt*, *lt*.
Several conditions can be combined with parentheses and logical operators, e.g: *and*, *or*.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", "x-ms-parameter-location": "method", "required": false }, From bb988f5a74cf8984bc935e51391fff76563a9498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 28 Apr 2017 15:31:56 -0700 Subject: [PATCH 30/46] Marking preview activityLog alerts as deprecated. --- .../2017-03-01-preview/swagger/activityLogAlerts_API.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json index 126f4cc72888..769753c63aa6 100644 --- a/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-03-01-preview/swagger/activityLogAlerts_API.json @@ -38,6 +38,7 @@ "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}": { "put": { + "deprecated": true, "description": "Create a new activity log alert or update an existing one.", "operationId": "ActivityLogAlerts_CreateOrUpdate", "x-ms-examples": { @@ -90,6 +91,7 @@ } }, "get": { + "deprecated": true, "description": "Get an activity log alert.", "operationId": "ActivityLogAlerts_Get", "x-ms-examples": { @@ -127,6 +129,7 @@ } }, "delete": { + "deprecated": true, "description": "Delete an activity log alert.", "operationId": "ActivityLogAlerts_Delete", "x-ms-examples": { @@ -164,6 +167,7 @@ } }, "patch": { + "deprecated": true, "description": "Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method.", "operationId": "ActivityLogAlerts_Update", "parameters": [ @@ -212,6 +216,7 @@ }, "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts": { "get": { + "deprecated": true, "description": "Get a list of all activity log alerts in a subscription.", "operationId": "ActivityLogAlerts_ListBySubscriptionId", "x-ms-examples": { @@ -248,6 +253,7 @@ }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts": { "get": { + "deprecated": true, "description": "Get a list of all activity log alerts in a resource group.", "operationId": "ActivityLogAlerts_ListByResourceGroup", "x-ms-examples": { From e3db47c307a5d93bade8da83a50d5c3dc570665c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 28 Apr 2017 16:48:30 -0700 Subject: [PATCH 31/46] Adding examples for alert rules --- .../examples/createOrUpdateAlertRule.json | 95 +++++++++++++++++++ .../2016-03-01/examples/deleteAlertRule.json | 18 ++++ .../2016-03-01/examples/getAlertRule.json | 41 ++++++++ .../2016-03-01/examples/listAlertRule.json | 81 ++++++++++++++++ .../2016-03-01/swagger/alertRules_API.json | 12 +++ 5 files changed, 247 insertions(+) create mode 100644 arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json create mode 100644 arm-monitor/2016-03-01/examples/deleteAlertRule.json create mode 100644 arm-monitor/2016-03-01/examples/getAlertRule.json create mode 100644 arm-monitor/2016-03-01/examples/listAlertRule.json diff --git a/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json b/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json new file mode 100644 index 000000000000..289228d193c2 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "Rac46PostSwapRG", + "ruleName": "chiricutin", + "api-version": "2016-03-01", + "parameters": { + "location": "Global", + "tags": { }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + }, + "201": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/deleteAlertRule.json b/arm-monitor/2016-03-01/examples/deleteAlertRule.json new file mode 100644 index 000000000000..959c9be02353 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/deleteAlertRule.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "Rac46PostSwapRG", + "ruleName": "chiricutin", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/getAlertRule.json b/arm-monitor/2016-03-01/examples/getAlertRule.json new file mode 100644 index 000000000000..16f5a1e5e0c8 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/getAlertRule.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "Rac46PostSwapRG", + "ruleName": "chiricutin", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/listAlertRule.json b/arm-monitor/2016-03-01/examples/listAlertRule.json new file mode 100644 index 000000000000..fd6521f57989 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/listAlertRule.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "Rac46PostSwapRG", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/myRuleName", + "name":"myRuleName", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"myRuleName", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-10T21:04:39.0005255Z", + "actions": [ + { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleEmailAction", + "sendToServiceOwners":true, + "customEmails": [ + "gu@ms.com", + "su@ms.net" + ] + } + ] + } + }, + { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin0", + "name":"chiricutin0", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin0", + "description":"Pura Vida 0", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":2.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-10T21:04:39.1082596Z", + "actions":[] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index e120458ef1a6..5c559d442cfd 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -142,6 +142,9 @@ } } } + }, + "x-ms-examples": { + "Create or update an alert rule": { "$ref": "../examples/createOrUpdateAlertRule.json" } } }, "delete": { @@ -171,6 +174,9 @@ "200": { "description": "Successful request to delete an alert rule" } + }, + "x-ms-examples": { + "Delete an alert rule": { "$ref": "../examples/deleteAlertRule.json" } } }, "get": { @@ -230,6 +236,9 @@ } } } + }, + "x-ms-examples": { + "Get an alert rule": { "$ref": "../examples/getAlertRule.json" } } } }, @@ -332,6 +341,9 @@ }, "x-ms-pageable": { "nextLinkName": null + }, + "x-ms-examples": { + "List alert rules": { "$ref": "../examples/listAlertRule.json" } } } } From 1ce45314e1b9632340e4107a55d7bc403bb72dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Fri, 28 Apr 2017 17:15:07 -0700 Subject: [PATCH 32/46] Adding examples autoscale and fixing error in alert rules examples --- .../createOrUpdateAutoscaleSetting.json | 449 ++++++++++++++++++ .../examples/deleteAutoscaleSetting.json | 18 + .../examples/getAutoscaleSetting.json | 160 +++++++ .../examples/listAutoscaleSetting.json | 147 ++++++ .../2015-04-01/swagger/autoscale_API.json | 12 + .../examples/createOrUpdateAlertRule.json | 2 +- 6 files changed, 787 insertions(+), 1 deletion(-) create mode 100644 arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json create mode 100644 arm-monitor/2015-04-01/examples/deleteAutoscaleSetting.json create mode 100644 arm-monitor/2015-04-01/examples/getAutoscaleSetting.json create mode 100644 arm-monitor/2015-04-01/examples/listAutoscaleSetting.json diff --git a/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json b/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json new file mode 100644 index 000000000000..cff406518a51 --- /dev/null +++ b/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json @@ -0,0 +1,449 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "TestingMetricsScaleSet", + "autoscaleSettingName": "MySetting", + "api-version": "2015-04-01", + "parameters": { + "location": "West US", + "tags": { }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } + }, + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 + ] + } + } + } + ], + "enabled":true, + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } + }, + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 + ] + } + } + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } + }, + "201": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } + }, + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 + ] + } + } + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2015-04-01/examples/deleteAutoscaleSetting.json b/arm-monitor/2015-04-01/examples/deleteAutoscaleSetting.json new file mode 100644 index 000000000000..45e684316de4 --- /dev/null +++ b/arm-monitor/2015-04-01/examples/deleteAutoscaleSetting.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "TestingMetricsScaleSet", + "autoscaleSettingName": "MySetting", + "api-version": "2015-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2015-04-01/examples/getAutoscaleSetting.json b/arm-monitor/2015-04-01/examples/getAutoscaleSetting.json new file mode 100644 index 000000000000..7e359dd858c2 --- /dev/null +++ b/arm-monitor/2015-04-01/examples/getAutoscaleSetting.json @@ -0,0 +1,160 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "TestingMetricsScaleSet", + "autoscaleSettingName": "MySetting", + "api-version": "2015-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name":"MySetting", + "type":"Microsoft.Insights/autoscaleSettings", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties": { + "profiles": [ + { + "name":"adios", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "fixedDate": { + "timeZone":"UTC", + "start":"2015-03-05T14:00:00Z", + "end":"2015-03-05T14:30:00Z" + } + }, + { + "name":"saludos", + "capacity": { + "minimum":"1", + "maximum":"10", + "default":"1" + }, + "rules": [ + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT1M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":10.0 + }, + "scaleAction": { + "direction":"Increase", + "type":"ChangeCount", + "value":"1", + "cooldown":"PT5M" + } + }, + { + "metricTrigger": { + "metricName":"Percentage CPU", + "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain":"PT2M", + "statistic":"Average", + "timeWindow":"PT5M", + "timeAggregation":"Average", + "operator":"GreaterThan", + "threshold":15.0 + }, + "scaleAction": { + "direction":"Decrease", + "type":"ChangeCount", + "value":"2", + "cooldown":"PT6M" + } + } + ], + "recurrence": { + "frequency":"Week", + "schedule": { + "timeZone":"UTC", + "days": [ + "1" + ], + "hours": [ + 5 + ], + "minutes": [ + 15 + ] + } + } + } + ], + "enabled":true, + "name":"MySetting", + "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications": [ + { + "operation":"Scale", + "email": { + "sendToSubscriptionAdministrator":true, + "sendToSubscriptionCoAdministrators":true, + "customEmails": [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks": [ + { + "serviceUri":"http://myservice.com", + "properties":{} + } + ] + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2015-04-01/examples/listAutoscaleSetting.json b/arm-monitor/2015-04-01/examples/listAutoscaleSetting.json new file mode 100644 index 000000000000..909da7a9fb73 --- /dev/null +++ b/arm-monitor/2015-04-01/examples/listAutoscaleSetting.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName": "TestingMetricsScaleSet", + "api-version": "2015-04-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value" : [ + { + "id" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name" : "MySetting", + "type" : "Microsoft.Insights/autoscaleSettings", + "location" : "West US", + "tags" : { + "$type" : "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties" : { + "profiles" : [{ + "name" : "adios", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "fixedDate" : { + "timeZone" : "UTC", + "start" : "2015-03-05T14:00:00Z", + "end" : "2015-03-05T14:30:00Z" + } + }, { + "name" : "saludos", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "recurrence" : { + "frequency" : "Week", + "schedule" : { + "timeZone" : "UTC", + "days" : ["1"], + "hours" : [5], + "minutes" : [15] + } + } + } + ], + "enabled" : true, + "name" : "MySetting", + "targetResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications" : [{ + "operation" : "Scale", + "email" : { + "sendToSubscriptionAdministrator" : true, + "sendToSubscriptionCoAdministrators" : true, + "customEmails" : ["gu@ms.com", "ge@ns.net"] + }, + "webhooks" : [{ + "serviceUri" : "http://myservice.com", + "properties" : {} + } + ] + } + ] + } + } + ], + "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index 58f2b2411482..ab9feaa71228 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -204,6 +204,9 @@ }, "x-ms-pageable": { "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List autoscale settings": { "$ref": "../examples/listAutoscaleSetting.json" } } } }, @@ -554,6 +557,9 @@ } } } + }, + "x-ms-examples": { + "Create or update an autoscale setting": { "$ref": "../examples/createOrUpdateAutoscaleSetting.json" } } }, "delete": { @@ -589,6 +595,9 @@ "204": { "description": "No content: Successful request to delete an autoscale setting, but the response is intentionally empty" } + }, + "x-ms-examples": { + "Delete an autoscale setting": { "$ref": "../examples/deleteAutoscaleSetting.json" } } }, "get": { @@ -773,6 +782,9 @@ } } } + }, + "x-ms-examples": { + "Get an autoscale setting": { "$ref": "../examples/getAutoscaleSetting.json" } } } } diff --git a/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json b/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json index 289228d193c2..7c6eec0e5d36 100644 --- a/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json +++ b/arm-monitor/2016-03-01/examples/createOrUpdateAlertRule.json @@ -5,7 +5,7 @@ "ruleName": "chiricutin", "api-version": "2016-03-01", "parameters": { - "location": "Global", + "location": "West US", "tags": { }, "properties": { "name":"chiricutin", From 7bd9b9801f6ce6c0b5caa84af67a79e0023b056a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 2 May 2017 12:04:03 -0700 Subject: [PATCH 33/46] Adding examples for the LogProfiles API --- .../examples/createOrUpdateLogProfile.json | 94 +++++++++++++++++++ .../2016-03-01/examples/deleteLogProfile.json | 17 ++++ .../2016-03-01/examples/getLogProfile.json | 35 +++++++ .../2016-03-01/examples/listLogProfile.json | 61 ++++++++++++ .../2016-03-01/swagger/logProfiles_API.json | 12 +++ 5 files changed, 219 insertions(+) create mode 100644 arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json create mode 100644 arm-monitor/2016-03-01/examples/deleteLogProfile.json create mode 100644 arm-monitor/2016-03-01/examples/getLogProfile.json create mode 100644 arm-monitor/2016-03-01/examples/listLogProfile.json diff --git a/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json b/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json new file mode 100644 index 000000000000..fa7f4c588a1c --- /dev/null +++ b/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "logProfileName": "Rac46PostSwapRG", + "api-version": "2016-03-01", + "parameters": { + "location": "West US", + "tags": { }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + }, + "201": { + "headers": { }, + "body": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":true, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/deleteLogProfile.json b/arm-monitor/2016-03-01/examples/deleteLogProfile.json new file mode 100644 index 000000000000..7005e28af019 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/deleteLogProfile.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "logProfileName": "Rac46PostSwapRG", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": null + }, + "204": { + "headers": {}, + "body": null + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/getLogProfile.json b/arm-monitor/2016-03-01/examples/getLogProfile.json new file mode 100644 index 000000000000..8449a7b74678 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/getLogProfile.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192", + "logProfileName": "default", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":"", + "name":"default", + "location":"", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":"", + "locations": [ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/examples/listLogProfile.json b/arm-monitor/2016-03-01/examples/listLogProfile.json new file mode 100644 index 000000000000..e4c59ca65269 --- /dev/null +++ b/arm-monitor/2016-03-01/examples/listLogProfile.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192", + "api-version": "2016-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":"", + "name":"default", + "location":"", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":"", + "locations": [ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } + } + }, + { + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default2", + "type":"", + "name":"default2", + "location":"", + "tags":null, + "properties": { + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8165", + "serviceBusRuleId":"", + "locations": [ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":15 + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index f3d7e6af0293..8efc3f184274 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -55,6 +55,9 @@ "200": { "description": "Successful request to delete a log profile" } + }, + "x-ms-examples": { + "List alert rules": { "$ref": "../examples/deleteLogProfile.json" } } }, "get": { @@ -112,6 +115,9 @@ } } } + }, + "x-ms-examples": { + "List alert rules": { "$ref": "../examples/getLogProfile.json" } } }, "put": { @@ -172,6 +178,9 @@ } } } + }, + "x-ms-examples": { + "List alert rules": { "$ref": "../examples/CreateOrUpdateProfile.json" } } } }, @@ -200,6 +209,9 @@ }, "x-ms-pageable": { "nextLinkName": null + }, + "x-ms-examples": { + "List alert rules": { "$ref": "../examples/listLogProfile.json" } } } } From fbd38ebf5d5f838c6a56455f88af33f7d9aa939e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 2 May 2017 14:02:15 -0700 Subject: [PATCH 34/46] Adding examples for the ServiceDiagnosticSetting API. Fixing minor issues with documentation. --- ...reateOrUpdateServiceDiagnosticSetting.json | 73 +++++++++++++++++++ .../examples/getServiceDiagnosticSetting.json | 43 +++++++++++ .../updateServiceDiagnosticSetting.json | 73 +++++++++++++++++++ .../serviceDiagnosticsSettings_API.json | 11 ++- .../2017-04-01/swagger/actionGroups_API.json | 8 +- monitor/2016-09-01/examples/GetMetric.json | 2 +- .../examples/GetMetricFiltered.json | 2 +- monitor/2016-09-01/swagger/metrics_API.json | 2 +- 8 files changed, 206 insertions(+), 8 deletions(-) create mode 100644 arm-monitor/2016-09-01/examples/createOrUpdateServiceDiagnosticSetting.json create mode 100644 arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json create mode 100644 arm-monitor/2016-09-01/examples/updateServiceDiagnosticSetting.json diff --git a/arm-monitor/2016-09-01/examples/createOrUpdateServiceDiagnosticSetting.json b/arm-monitor/2016-09-01/examples/createOrUpdateServiceDiagnosticSetting.json new file mode 100644 index 000000000000..fdcbb55c41a6 --- /dev/null +++ b/arm-monitor/2016-09-01/examples/createOrUpdateServiceDiagnosticSetting.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2016-09-01", + "parameters": { + "location":"", + "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": [ + { + "timeGrain":"PT1M", + "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":"service", + "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": [ + { + "timeGrain":"PT1M", + "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/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json b/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json new file mode 100644 index 000000000000..c6f9c06d7884 --- /dev/null +++ b/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2016-09-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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": [ + { + "timeGrain":"PT1M", + "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/arm-monitor/2016-09-01/examples/updateServiceDiagnosticSetting.json b/arm-monitor/2016-09-01/examples/updateServiceDiagnosticSetting.json new file mode 100644 index 000000000000..eaee9f609f4e --- /dev/null +++ b/arm-monitor/2016-09-01/examples/updateServiceDiagnosticSetting.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version": "2016-09-01", + "parameters": { + "location":"", + "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": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":3 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":5 + } + } + ] + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type":"", + "name":"service", + "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": [ + { + "timeGrain":"PT1M", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":3 + } + } + ], + "logs": [ + { + "category":"WorkflowRuntime", + "enabled":true, + "retentionPolicy": { + "enabled":false, + "days":5 + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json index 57a96c86fc38..b62a0ff4dcad 100644 --- a/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2016-09-01/swagger/serviceDiagnosticsSettings_API.json @@ -95,6 +95,9 @@ } } } + }, + "x-ms-examples": { + "Get service diagnostic setting": { "$ref": "../examples/getServiceDiagnosticSetting.json" } } }, "put": { @@ -162,6 +165,9 @@ } } } + }, + "x-ms-examples": { + "Create or update a service diagnostic setting": { "$ref": "../examples/createOrUpdateServiceDiagnosticSetting.json" } } }, "patch": { @@ -197,7 +203,10 @@ "$ref": "#/definitions/ServiceDiagnosticSettingsResource" } } - } + }, + "x-ms-examples": { + "Update a service diagnostic setting": { "$ref": "../examples/updateServiceDiagnosticSetting.json" } + } } } }, diff --git a/arm-monitor/2017-04-01/swagger/actionGroups_API.json b/arm-monitor/2017-04-01/swagger/actionGroups_API.json index 24fca2d32458..c03cdec18b41 100644 --- a/arm-monitor/2017-04-01/swagger/actionGroups_API.json +++ b/arm-monitor/2017-04-01/swagger/actionGroups_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}": { "put": { "description": "Create a new action group or update an existing one.", "operationId": "ActionGroups_CreateOrUpdate", @@ -158,7 +158,7 @@ } } }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups": { + "/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups": { "get": { "description": "Get a list of all action groups in a subscription.", "operationId": "ActionGroups_ListBySubscriptionId", @@ -191,7 +191,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups": { "get": { "description": "Get a list of all action groups in a resource group.", "operationId": "ActionGroups_ListByResourceGroup", @@ -227,7 +227,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe": { "post": { "description": "Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.", "operationId": "ActionGroups_EnableReceiver", diff --git a/monitor/2016-09-01/examples/GetMetric.json b/monitor/2016-09-01/examples/GetMetric.json index 9b94e30368a5..a1377c14f37b 100644 --- a/monitor/2016-09-01/examples/GetMetric.json +++ b/monitor/2016-09-01/examples/GetMetric.json @@ -47,7 +47,7 @@ "total":1.0 } ], - "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metrics/RunsStarted", "name": { "value":"RunsStarted", "localizedValue":"Runs Started" diff --git a/monitor/2016-09-01/examples/GetMetricFiltered.json b/monitor/2016-09-01/examples/GetMetricFiltered.json index 60ed88f91a11..bece918b2b16 100644 --- a/monitor/2016-09-01/examples/GetMetricFiltered.json +++ b/monitor/2016-09-01/examples/GetMetricFiltered.json @@ -48,7 +48,7 @@ "total":1.0 } ], - "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metrics/RunsStarted", "name": { "value":"RunsStarted", "localizedValue":"Runs Started" diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index 2d0c50f64b41..642e4022786f 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -105,7 +105,7 @@ "total":1.0 } ], - "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/Microsoft.Insights/metrics/RunsStarted", + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/andy0802australia/providers/Microsoft.Logic/workflows/andy0803australia/providers/microsoft.insights/metrics/RunsStarted", "name": { "value":"RunsStarted", "localizedValue":"Runs Started" From af8b0cf89d81863b516f9c82fe91dfb78a888604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 2 May 2017 14:31:08 -0700 Subject: [PATCH 35/46] Fixing example files and a reference to an example file --- .../createOrUpdateAutoscaleSetting.json | 850 +++++++++--------- .../2016-03-01/swagger/logProfiles_API.json | 2 +- .../examples/getServiceDiagnosticSetting.json | 77 +- 3 files changed, 453 insertions(+), 476 deletions(-) diff --git a/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json b/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json index cff406518a51..819bc4f6885d 100644 --- a/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json +++ b/arm-monitor/2015-04-01/examples/createOrUpdateAutoscaleSetting.json @@ -1,449 +1,427 @@ { - "parameters": { - "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", - "resourceGroupName": "TestingMetricsScaleSet", - "autoscaleSettingName": "MySetting", - "api-version": "2015-04-01", - "parameters": { - "location": "West US", - "tags": { }, - "properties": { - "profiles": [ - { - "name":"adios", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "fixedDate": { - "timeZone":"UTC", - "start":"2015-03-05T14:00:00Z", - "end":"2015-03-05T14:30:00Z" - } - }, - { - "name":"saludos", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "recurrence": { - "frequency":"Week", - "schedule": { - "timeZone":"UTC", - "days": [ - "1" - ], - "hours": [ - 5 - ], - "minutes": [ - 15 - ] - } - } - } - ], - "enabled":true, - "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "notifications": [ - { - "operation":"Scale", - "email": { - "sendToSubscriptionAdministrator":true, - "sendToSubscriptionCoAdministrators":true, - "customEmails": [ - "gu@ms.com", - "ge@ns.net" - ] - }, - "webhooks": [ - { - "serviceUri":"http://myservice.com", - "properties":{} - } - ] - } - ] + "parameters" : { + "subscriptionId" : "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "resourceGroupName" : "TestingMetricsScaleSet", + "autoscaleSettingName" : "MySetting", + "api-version" : "2015-04-01", + "parameters" : { + "location" : "West US", + "tags" : {}, + "properties" : { + "profiles" : [{ + "name" : "adios", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "fixedDate" : { + "timeZone" : "UTC", + "start" : "2015-03-05T14:00:00Z", + "end" : "2015-03-05T14:30:00Z" } - } - }, - "responses": { - "200": { - "headers": { }, - "body": { - "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", - "name":"MySetting", - "type":"Microsoft.Insights/autoscaleSettings", - "location":"West US", - "tags": { - "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, { + "name" : "saludos", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 }, - "properties": { - "profiles": [ - { - "name":"adios", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "fixedDate": { - "timeZone":"UTC", - "start":"2015-03-05T14:00:00Z", - "end":"2015-03-05T14:30:00Z" - } - }, - { - "name":"saludos", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "recurrence": { - "frequency":"Week", - "schedule": { - "timeZone":"UTC", - "days": [ - "1" - ], - "hours": [ - 5 - ], - "minutes": [ - 15 - ] - } - } - } + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "recurrence" : { + "frequency" : "Week", + "schedule" : { + "timeZone" : "UTC", + "days" : [ + "1" + ], + "hours" : [ + 5 + ], + "minutes" : [ + 15 + ] + } + } + } + ], + "enabled" : true, + "targetResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications" : [{ + "operation" : "Scale", + "email" : { + "sendToSubscriptionAdministrator" : true, + "sendToSubscriptionCoAdministrators" : true, + "customEmails" : [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks" : [{ + "serviceUri" : "http://myservice.com", + "properties" : {} + } + ] + } + ] + } + } + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "id" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name" : "MySetting", + "type" : "Microsoft.Insights/autoscaleSettings", + "location" : "West US", + "tags" : { + "$type" : "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" + }, + "properties" : { + "profiles" : [{ + "name" : "adios", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "fixedDate" : { + "timeZone" : "UTC", + "start" : "2015-03-05T14:00:00Z", + "end" : "2015-03-05T14:30:00Z" + } + }, { + "name" : "saludos", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "recurrence" : { + "frequency" : "Week", + "schedule" : { + "timeZone" : "UTC", + "days" : [ + "1" + ], + "hours" : [ + 5 ], - "enabled":true, - "name":"MySetting", - "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "notifications": [ - { - "operation":"Scale", - "email": { - "sendToSubscriptionAdministrator":true, - "sendToSubscriptionCoAdministrators":true, - "customEmails": [ - "gu@ms.com", - "ge@ns.net" - ] - }, - "webhooks": [ - { - "serviceUri":"http://myservice.com", - "properties":{} - } - ] - } + "minutes" : [ + 15 ] } + } + } + ], + "enabled" : true, + "name" : "MySetting", + "targetResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications" : [{ + "operation" : "Scale", + "email" : { + "sendToSubscriptionAdministrator" : true, + "sendToSubscriptionCoAdministrators" : true, + "customEmails" : [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks" : [{ + "serviceUri" : "http://myservice.com", + "properties" : {} + } + ] + } + ] + } + } + }, + "201" : { + "headers" : {}, + "body" : { + "id" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", + "name" : "MySetting", + "type" : "Microsoft.Insights/autoscaleSettings", + "location" : "West US", + "tags" : { + "$type" : "Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" }, - "201": { - "headers": { }, - "body": { - "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/microsoft.insights/autoscalesettings/MySetting", - "name":"MySetting", - "type":"Microsoft.Insights/autoscaleSettings", - "location":"West US", - "tags": { - "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage" - }, - "properties": { - "profiles": [ - { - "name":"adios", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "fixedDate": { - "timeZone":"UTC", - "start":"2015-03-05T14:00:00Z", - "end":"2015-03-05T14:30:00Z" - } - }, - { - "name":"saludos", - "capacity": { - "minimum":"1", - "maximum":"10", - "default":"1" - }, - "rules": [ - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT1M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":10.0 - }, - "scaleAction": { - "direction":"Increase", - "type":"ChangeCount", - "value":"1", - "cooldown":"PT5M" - } - }, - { - "metricTrigger": { - "metricName":"Percentage CPU", - "metricResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "timeGrain":"PT2M", - "statistic":"Average", - "timeWindow":"PT5M", - "timeAggregation":"Average", - "operator":"GreaterThan", - "threshold":15.0 - }, - "scaleAction": { - "direction":"Decrease", - "type":"ChangeCount", - "value":"2", - "cooldown":"PT6M" - } - } - ], - "recurrence": { - "frequency":"Week", - "schedule": { - "timeZone":"UTC", - "days": [ - "1" - ], - "hours": [ - 5 - ], - "minutes": [ - 15 - ] - } - } - } + "properties" : { + "profiles" : [{ + "name" : "adios", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "fixedDate" : { + "timeZone" : "UTC", + "start" : "2015-03-05T14:00:00Z", + "end" : "2015-03-05T14:30:00Z" + } + }, { + "name" : "saludos", + "capacity" : { + "minimum" : "1", + "maximum" : "10", + "default" : "1" + }, + "rules" : [{ + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT1M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 10.0 + }, + "scaleAction" : { + "direction" : "Increase", + "type" : "ChangeCount", + "value" : "1", + "cooldown" : "PT5M" + } + }, { + "metricTrigger" : { + "metricName" : "Percentage CPU", + "metricResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "timeGrain" : "PT2M", + "statistic" : "Average", + "timeWindow" : "PT5M", + "timeAggregation" : "Average", + "operator" : "GreaterThan", + "threshold" : 15.0 + }, + "scaleAction" : { + "direction" : "Decrease", + "type" : "ChangeCount", + "value" : "2", + "cooldown" : "PT6M" + } + } + ], + "recurrence" : { + "frequency" : "Week", + "schedule" : { + "timeZone" : "UTC", + "days" : [ + "1" + ], + "hours" : [ + 5 ], - "enabled":true, - "name":"MySetting", - "targetResourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", - "notifications": [ - { - "operation":"Scale", - "email": { - "sendToSubscriptionAdministrator":true, - "sendToSubscriptionCoAdministrators":true, - "customEmails": [ - "gu@ms.com", - "ge@ns.net" - ] - }, - "webhooks": [ - { - "serviceUri":"http://myservice.com", - "properties":{} - } - ] - } + "minutes" : [ + 15 ] } + } + } + ], + "enabled" : true, + "name" : "MySetting", + "targetResourceUri" : "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/TestingMetricsScaleSet/providers/Microsoft.Compute/virtualMachineScaleSets/testingsc", + "notifications" : [{ + "operation" : "Scale", + "email" : { + "sendToSubscriptionAdministrator" : true, + "sendToSubscriptionCoAdministrators" : true, + "customEmails" : [ + "gu@ms.com", + "ge@ns.net" + ] + }, + "webhooks" : [{ + "serviceUri" : "http://myservice.com", + "properties" : {} + } + ] + } + ] } + } } + } } \ No newline at end of file diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index 8efc3f184274..f006eff65bbc 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -180,7 +180,7 @@ } }, "x-ms-examples": { - "List alert rules": { "$ref": "../examples/CreateOrUpdateProfile.json" } + "List alert rules": { "$ref": "../examples/CreateOrUpdateLogProfile.json" } } } }, diff --git a/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json b/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json index c6f9c06d7884..323f6938d9bd 100644 --- a/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json +++ b/arm-monitor/2016-09-01/examples/getServiceDiagnosticSetting.json @@ -1,43 +1,42 @@ { - "parameters": { - "resourceUri": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", - "api-version": "2016-09-01" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "id":"/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type":"", - "name":"service", - "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": [ - { - "timeGrain":"PT1M", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ], - "logs": [ - { - "category":"WorkflowRuntime", - "enabled":true, - "retentionPolicy": { - "enabled":false, - "days":0 - } - } - ] - } + "parameters" : { + "resourceUri" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6", + "api-version" : "2016-09-01" + }, + "responses" : { + "200" : { + "headers" : {}, + "body" : { + "id" : "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type" : "", + "name" : "service", + "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" : [{ + "timeGrain" : "PT1M", + "enabled" : true, + "retentionPolicy" : { + "enabled" : false, + "days" : 0 + } } + ], + "logs" : [{ + "category" : "WorkflowRuntime", + "enabled" : true, + "retentionPolicy" : { + "enabled" : false, + "days" : 0 + } + } + ] + } + } } + } } \ No newline at end of file From 5e544a550c9b33a0ea7a5d3d183a39ec81a0e71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 2 May 2017 14:40:11 -0700 Subject: [PATCH 36/46] Fixing casing of a filename --- arm-monitor/2016-03-01/swagger/logProfiles_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index f006eff65bbc..75515e74e474 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -180,7 +180,7 @@ } }, "x-ms-examples": { - "List alert rules": { "$ref": "../examples/CreateOrUpdateLogProfile.json" } + "List alert rules": { "$ref": "../examples/createOrUpdateLogProfile.json" } } } }, From 4cad092c36403558a67c327d7c4d350006c239bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 2 May 2017 16:12:02 -0700 Subject: [PATCH 37/46] Moving $filter declarations to the operations section to avoid error due to documentation differences. --- .../2015-04-01/swagger/activityLogs_API.json | 14 +++++--------- .../swagger/tenantActivityLogs_API.json | 18 +++++++----------- .../swagger/metricDefinitions_API.json | 14 +++++--------- monitor/2016-09-01/swagger/metrics_API.json | 14 +++++--------- 4 files changed, 22 insertions(+), 38 deletions(-) diff --git a/monitor/2015-04-01/swagger/activityLogs_API.json b/monitor/2015-04-01/swagger/activityLogs_API.json index b34426ce5b83..1035e3dabd7e 100644 --- a/monitor/2015-04-01/swagger/activityLogs_API.json +++ b/monitor/2015-04-01/swagger/activityLogs_API.json @@ -45,7 +45,11 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/FilterParameter" + "name": "$filter", + "in": "query", + "type": "string", + "required": false, + "description": "Reduces the set of data collected.
The **$filter** argument is very restricted and allows only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed." }, { "$ref": "#/parameters/SelectParameter" @@ -387,14 +391,6 @@ "type": "string", "description": "Client Api Version." }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "type": "string", - "required": false, - "description": "Reduces the set of data collected.
The **$filter** argument is very restricted and allows only the following patterns.
- *List events for a resource group*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.
- *List events for resource*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.
- *List events for a subscription in a time range*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.
- *List events for a resource provider*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.
- *List events for a correlation Id*: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq 'correlationID'.

**NOTE**: No other syntax is allowed.", - "x-ms-parameter-location": "method" - }, "SelectParameter": { "name": "$select", "in": "query", diff --git a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json index d83eb3db1b78..9aa8ae4931e1 100644 --- a/monitor/2015-04-01/swagger/tenantActivityLogs_API.json +++ b/monitor/2015-04-01/swagger/tenantActivityLogs_API.json @@ -39,13 +39,17 @@ "TenantActivityLogs" ], "operationId": "TenantActivityLogs_List", - "description": "Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
- List evetns for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.
**NOTE**: No other syntax is allowed.", + "description": "Gets the Activity Logs for the Tenant.
Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, etc.).
One thing to point out here is that this API does *not* retrieve the logs at the individual subscription of the tenant but only surfaces the logs that were generated at the tenant level.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/FilterParameter" + "name": "$filter", + "in": "query", + "type": "string", + "required": false, + "description": "Reduces the set of data collected.
The **$filter** is very restricted and allows only the following patterns.
- List events for a resource group: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceGroupName eq ''.
- List events for resource: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceUri eq ''.
- List events for a subscription: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation'.
- List evetns for a resource provider: $filter=eventTimestamp ge '' and eventTimestamp le '' and eventChannels eq 'Admin, Operation' and resourceProvider eq ''.
- List events for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq ''.
**NOTE**: No other syntax is allowed.", }, { "$ref": "#/parameters/SelectParameter" @@ -371,20 +375,12 @@ "type": "string", "description": "Client Api Version." }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "type": "string", - "required": 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" - }, "SelectParameter": { "name": "$select", "in": "query", "required": false, "type": "string", - "description": "Used to fetch events with only the given properties. The filter is a comma separated list of property names to be returned. Possible values are: authorization, channels, claims, correlationId, description, eventDataId, eventName, eventTimestamp, httpRequest, level, operationId, operationName, properties, resourceGroupName, resourceProviderName, resourceId, status, submissionTimestamp, subStatus, subscriptionId", + "description": "Used to fetch events with only the given properties.
The **$select** argument is a comma separated list of property names to be returned. Possible values are: *authorization*, *claims*, *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*", "x-ms-parameter-location": "method" } } diff --git a/monitor/2016-03-01/swagger/metricDefinitions_API.json b/monitor/2016-03-01/swagger/metricDefinitions_API.json index 6052f2cdddd9..be3a4c38d64a 100644 --- a/monitor/2016-03-01/swagger/metricDefinitions_API.json +++ b/monitor/2016-03-01/swagger/metricDefinitions_API.json @@ -48,7 +48,11 @@ "$ref": "#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/FilterParameter" + "name": "$filter", + "in": "query", + "type": "string", + "description": "Reduces the set of data collected by retrieving particular metric definitions from all the definitions available for the resource.
For example, to get just the definition for the 'CPU percentage' counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'.
Multiple metrics can be retrieved by joining together *'name eq '* clauses separated by *or* logical operators.
**NOTE**: No other syntax is allowed.", + "required": false } ], "responses": { @@ -269,14 +273,6 @@ "type": "string", "description": "Client Api Version." }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "type": "string", - "description": "Reduces the set of data collected by retrieving particular metric definitions from all the definitions available for the resource.
For example, to get just the definition for the 'CPU percentage' counter: $filter=name.value eq '\\Processor(_Total)\\% Processor Time'.
Multiple metrics can be retrieved by joining together *'name eq '* clauses separated by *or* logical operators.
**NOTE**: No other syntax is allowed.", - "x-ms-parameter-location": "method", - "required": false - }, "ResourceUriParameter": { "name": "resourceUri", "in": "path", diff --git a/monitor/2016-09-01/swagger/metrics_API.json b/monitor/2016-09-01/swagger/metrics_API.json index 642e4022786f..564c8858f104 100644 --- a/monitor/2016-09-01/swagger/metrics_API.json +++ b/monitor/2016-09-01/swagger/metrics_API.json @@ -45,7 +45,11 @@ "$ref": "#/parameters/ResourceUriParameter" }, { - "$ref": "#/parameters/FilterParameter" + "name": "$filter", + "in": "query", + "type": "string", + "description": "Reduces the set of data collected.
The filter is optional. If present it must contain a list of metric names to retrieve of the form: *(name.value eq 'metricName' [or name.value eq 'metricName' or ...])*. Optionally, the filter can contain conditions for the following attributes *aggregationType*, *startTime*, *endTime*, and *timeGrain* of the form *attributeName operator value*. Where operator is one of *ne*, *eq*, *gt*, *lt*.
Several conditions can be combined with parentheses and logical operators, e.g: *and*, *or*.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", + "required": false }, { "$ref": "#/parameters/ApiVersionParameter" @@ -262,14 +266,6 @@ "type": "string", "description": "Client Api Version." }, - "FilterParameter": { - "name": "$filter", - "in": "query", - "type": "string", - "description": "Reduces the set of data collected.
The filter is optional. If present it must contain a list of metric names to retrieve of the form: *(name.value eq 'metricName' [or name.value eq 'metricName' or ...])*. Optionally, the filter can contain conditions for the following attributes *aggregationType*, *startTime*, *endTime*, and *timeGrain* of the form *attributeName operator value*. Where operator is one of *ne*, *eq*, *gt*, *lt*.
Several conditions can be combined with parentheses and logical operators, e.g: *and*, *or*.
Some example filter expressions are:
- $filter=(name.value eq 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',
- $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1H',
- $filter=(name.value eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq duration'PT1M'.

**NOTE**: When a metrics query comes in with multiple metrics, but with no aggregation types defined, the service will pick the Primary aggregation type of the first metrics to be used as the default aggregation type for all the metrics.", - "x-ms-parameter-location": "method", - "required": false - }, "ResourceUriParameter": { "name": "resourceUri", "in": "path", From 06db882d4e53b58cadd45bb17548b0e7f643a14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 3 May 2017 13:49:35 -0700 Subject: [PATCH 38/46] Including feedback from the review of the PR. --- .../2015-04-01/swagger/autoscale_API.json | 8 +++- .../serviceDiagnosticsSettings_API.json | 2 + .../2016-03-01/swagger/alertRules_API.json | 1 + .../2017-04-01/swagger/actionGroups_API.json | 46 ++++++++++--------- .../swagger/activityLogAlerts_API.json | 4 ++ 5 files changed, 38 insertions(+), 23 deletions(-) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index ab9feaa71228..8bbfc048c736 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -1024,7 +1024,9 @@ "type": "array", "items": { "type": "integer", - "format": "int32" + "format": "int32", + "minimum": 0, + "maximum": 23 }, "description": "A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported)." }, @@ -1032,7 +1034,9 @@ "type": "array", "items": { "type": "integer", - "format": "int32" + "format": "int32", + "minimum": 0, + "maximum": 59 }, "description": "A collection of minutes at which the profile takes effect at." } diff --git a/arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json b/arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json index 50a45ebdb4cb..28d3af6e0462 100644 --- a/arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json +++ b/arm-monitor/2015-07-01/swagger/serviceDiagnosticsSettings_API.json @@ -35,6 +35,7 @@ "paths": { "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { "get": { + "deprecated": true, "tags": [ "ServiceDiagnosticSettings" ], @@ -97,6 +98,7 @@ } }, "put": { + "deprecated": true, "tags": [ "ServiceDiagnosticSettings" ], diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index 5c559d442cfd..c894fcd324a0 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -530,6 +530,7 @@ "failedLocationCount": { "type": "integer", "format": "int32", + "minimum": 0, "description": "the number of locations that must fail to activate the alert." } }, diff --git a/arm-monitor/2017-04-01/swagger/actionGroups_API.json b/arm-monitor/2017-04-01/swagger/actionGroups_API.json index c03cdec18b41..5a17c746ce39 100644 --- a/arm-monitor/2017-04-01/swagger/actionGroups_API.json +++ b/arm-monitor/2017-04-01/swagger/actionGroups_API.json @@ -46,18 +46,12 @@ } }, "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ActionGroupNameParameter" }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "name": "actionGroup", "in": "body", @@ -66,6 +60,12 @@ "$ref": "#/definitions/ActionGroupResource" }, "description": "The action group to create or use for the update." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { @@ -95,15 +95,15 @@ } }, "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ActionGroupNameParameter" }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -132,15 +132,15 @@ } }, "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ActionGroupNameParameter" }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -205,10 +205,10 @@ }, "parameters": [ { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/ResourceGroupNameParameter" + "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -232,23 +232,17 @@ "description": "Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled.", "operationId": "ActionGroups_EnableReceiver", "x-ms-examples": { - "List all action groups": { + "Enable the receiver": { "$ref": "../examples/enableReceiver.json" } }, "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ActionGroupNameParameter" }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "name": "enableRequest", "in": "body", @@ -257,6 +251,12 @@ "$ref": "#/definitions/EnableRequest" }, "description": "The receiver to re-enable." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { @@ -338,6 +338,10 @@ "$ref": "#/definitions/ActionGroupResource" }, "description": "The list of action groups." + }, + "nextLink": { + "type": "string", + "description": "Provides the link to retrive the next set of elements." } } }, diff --git a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json index 7c047de8d6b7..694e7d01e1bd 100644 --- a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json @@ -302,6 +302,10 @@ "$ref": "#/definitions/ActivityLogAlertResource" }, "description": "The list of activity log alerts." + }, + "nextLink": { + "type": "string", + "description": "Provides the link to retrive the next set of elements." } } }, From 862083efc0f1abdbbfe268a1d4a1a1fb802b5a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 4 May 2017 12:30:56 -0700 Subject: [PATCH 39/46] Adding (again) PATCH operation to the activityLogAlerts API. --- .../examples/patchActivityLogAlert.json | 56 +++++++++++++++ .../swagger/activityLogAlerts_API.json | 70 +++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 arm-monitor/2017-04-01/examples/patchActivityLogAlert.json diff --git a/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json b/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json new file mode 100644 index 000000000000..4c592bc5a958 --- /dev/null +++ b/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "resourceGroupName": "Default-ActivityLogAlerts", + "activityLogAlertName": "SampleActivityLogAlert", + "api-version": "2017-03-01-preview", + "activityLogAlertPatch": { + "location": "Global", + "tags": { "key1": "value1", "key2": "value2" }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "headers": { }, + "body": { + "id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/SampleActivityLogAlert", + "type": "Microsoft.Insights/ActivityLogAlerts", + "name": "SampleActivityLogAlert", + "location": "Global", + "tags": { "key1": "value1", "key2": "value2" }, + "properties": { + "scopes": [ + "/subscriptions/187f412d-1758-44d9-b052-169e2564721d" + ], + "enabled": false, + "condition": { + "allOf": [ + { + "field": "Category", + "equals": "Administrative" + }, + { + "field": "Level", + "equals": "Error" + } + ] + }, + "actions": { + "actionGroups": [ + { + "actionGroupId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-ActionGroups/providers/microsoft.insights/actionGroups/SampleActionGroup", + "webhookProperties": { + "sampleWebhookProperty": "samplePropertyValue" + } + } + ] + }, + "description": "Sample activity log alert description" + } + } + } + } +} \ No newline at end of file diff --git a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json index 694e7d01e1bd..406909d62ae3 100644 --- a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json @@ -162,6 +162,52 @@ } } } + }, + "patch": { + "description": "Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method.", + "operationId": "ActivityLogAlerts_Update", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ActivityLogAlertNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "activityLogAlertPatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ActivityLogAlertResourcePatch" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing activity log alert was successfully updated.", + "schema": { + "$ref": "#/definitions/ActivityLogAlertResource" + } + } + }, + "x-ms-examples": { + "Path an activity log alert": { + "$ref": "../examples/patchActivityLogAlert.json" + } + } } }, "/subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts": { @@ -418,6 +464,30 @@ "type": "string" } } + }, + "ActivityLogAlertResourcePatch": { + "description": "An activity log alert resource for patch operations.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ActivityLogAlertPatch" + } + } + }, + "ActivityLogAlertPatch": { + "description": "An Azure activity log alert for patch operations.", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates whether this activity log alert is enabled. If an activity log alert is not enabled, then none of its actions will be activated." + } + } } }, "parameters": { From 7ad7f1ff20bad449cbd793de3aedeaf649685906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 4 May 2017 14:50:22 -0700 Subject: [PATCH 40/46] Removing min/max specs since the server already checks these limits. --- arm-monitor/2015-04-01/swagger/autoscale_API.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arm-monitor/2015-04-01/swagger/autoscale_API.json b/arm-monitor/2015-04-01/swagger/autoscale_API.json index 8bbfc048c736..ab9feaa71228 100644 --- a/arm-monitor/2015-04-01/swagger/autoscale_API.json +++ b/arm-monitor/2015-04-01/swagger/autoscale_API.json @@ -1024,9 +1024,7 @@ "type": "array", "items": { "type": "integer", - "format": "int32", - "minimum": 0, - "maximum": 23 + "format": "int32" }, "description": "A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported)." }, @@ -1034,9 +1032,7 @@ "type": "array", "items": { "type": "integer", - "format": "int32", - "minimum": 0, - "maximum": 59 + "format": "int32" }, "description": "A collection of minutes at which the profile takes effect at." } From 4f6bcb0bc17cffb4854b4b8f657c9654df534df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 4 May 2017 15:37:58 -0700 Subject: [PATCH 41/46] Making body of the patch operation independent of Resource to avoid validation errors --- .../swagger/activityLogAlerts_API.json | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json index 406909d62ae3..cd73a5834eb5 100644 --- a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json @@ -184,7 +184,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ActivityLogAlertResourcePatch" + "$ref": "#/definitions/ActivityLogAlertPatchBody" }, "description": "Parameters supplied to the operation." } @@ -465,19 +465,25 @@ } } }, - "ActivityLogAlertResourcePatch": { - "description": "An activity log alert resource for patch operations.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], + "ActivityLogAlertPatchBody": { + "description": "An activity log alert object for the body of patch operations.", "properties": { + "location": { + "type": "string", + "description": "Resource location" + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ActivityLogAlertPatch" } - } + }, + "required": [ "location" ] }, "ActivityLogAlertPatch": { "description": "An Azure activity log alert for patch operations.", From 03037fde802694ff93e80b021d2deaafff4dacea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 4 May 2017 15:57:12 -0700 Subject: [PATCH 42/46] Removing location from the Patch body in ActivityLogAlerts API. --- arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json index cd73a5834eb5..2dd1c58d7439 100644 --- a/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json +++ b/arm-monitor/2017-04-01/swagger/activityLogAlerts_API.json @@ -468,10 +468,6 @@ "ActivityLogAlertPatchBody": { "description": "An activity log alert object for the body of patch operations.", "properties": { - "location": { - "type": "string", - "description": "Resource location" - }, "tags": { "additionalProperties": { "type": "string" @@ -482,8 +478,7 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/ActivityLogAlertPatch" } - }, - "required": [ "location" ] + } }, "ActivityLogAlertPatch": { "description": "An Azure activity log alert for patch operations.", From 4afb0f016403ef9ceb73a5256a1fee9d58b162e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 4 May 2017 16:11:31 -0700 Subject: [PATCH 43/46] Fixing example of the ActivityLogAlert API for PATCH. --- arm-monitor/2017-04-01/examples/patchActivityLogAlert.json | 1 - 1 file changed, 1 deletion(-) diff --git a/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json b/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json index 4c592bc5a958..96fada36985a 100644 --- a/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json +++ b/arm-monitor/2017-04-01/examples/patchActivityLogAlert.json @@ -5,7 +5,6 @@ "activityLogAlertName": "SampleActivityLogAlert", "api-version": "2017-03-01-preview", "activityLogAlertPatch": { - "location": "Global", "tags": { "key1": "value1", "key2": "value2" }, "properties": { "enabled": false From 4bf75243ce6539c33f2e290363c802b0d7320fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Tue, 16 May 2017 17:09:00 -0700 Subject: [PATCH 44/46] Adding minimum to the retention days (bug detected during Node.js generation). No effect in the C# generation. --- arm-monitor/2016-03-01/swagger/logProfiles_API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index 75515e74e474..6cd920bb0449 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -264,6 +264,7 @@ "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." } }, From eae63942dd1ef2a4ef8209d0ec2cde2f6f0400df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Thu, 29 Jun 2017 10:20:56 -0700 Subject: [PATCH 45/46] Adding a success status code (201) to alert rules API and fixing error in the examples for logProfiles --- .../2016-03-01/swagger/alertRules_API.json | 66 +++++++++++++++++++ .../2016-03-01/swagger/logProfiles_API.json | 6 +- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/arm-monitor/2016-03-01/swagger/alertRules_API.json b/arm-monitor/2016-03-01/swagger/alertRules_API.json index cf26e2c15daa..8143eac823a0 100644 --- a/arm-monitor/2016-03-01/swagger/alertRules_API.json +++ b/arm-monitor/2016-03-01/swagger/alertRules_API.json @@ -278,6 +278,72 @@ "description": "Successful request to update an alert rule", "schema": { "$ref": "#/definitions/AlertRuleResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest2":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":false, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } + } + }, + "201": { + "description": "Successful request to update an alert rule that resulted in a creation of the alert rule", + "schema": { + "$ref": "#/definitions/AlertRuleResource" + }, + "examples": { + "application/json": { + "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", + "name":"chiricutin", + "type":"Microsoft.Insights/alertRules", + "location":"West US", + "tags": { + "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest2":"Resource" + }, + "properties": { + "name":"chiricutin", + "description":"Pura Vida", + "isEnabled":false, + "condition": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", + "dataSource": { + "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", + "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", + "metricName":"Requests" + }, + "operator":"GreaterThan", + "threshold":3.0, + "windowSize":"PT5M", + "timeAggregation":"Total" + }, + "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", + "actions":[] + } + } } } } diff --git a/arm-monitor/2016-03-01/swagger/logProfiles_API.json b/arm-monitor/2016-03-01/swagger/logProfiles_API.json index b9ffab50cd61..42324b5f2c41 100644 --- a/arm-monitor/2016-03-01/swagger/logProfiles_API.json +++ b/arm-monitor/2016-03-01/swagger/logProfiles_API.json @@ -57,7 +57,7 @@ } }, "x-ms-examples": { - "List alert rules": { "$ref": "../examples/deleteLogProfile.json" } + "Delete log profile": { "$ref": "../examples/deleteLogProfile.json" } } }, "get": { @@ -117,7 +117,7 @@ } }, "x-ms-examples": { - "List alert rules": { "$ref": "../examples/getLogProfile.json" } + "Get log profile": { "$ref": "../examples/getLogProfile.json" } } }, "put": { @@ -180,7 +180,7 @@ } }, "x-ms-examples": { - "List alert rules": { "$ref": "../examples/createOrUpdateLogProfile.json" } + "Create or update a log profile": { "$ref": "../examples/createOrUpdateLogProfile.json" } } }, "patch": { From 99c323c7810aaea6588bf5ffcd07fd4f78a190e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Calder=C3=B3n=5FMeza?= Date: Wed, 26 Jul 2017 14:56:00 -0700 Subject: [PATCH 46/46] Fixing issue #1475: incorrect example in LogProfiles AI documentation (PUT: CreateOrUpdate) --- .../examples/createOrUpdateLogProfile.json | 113 ++++++++---------- 1 file changed, 47 insertions(+), 66 deletions(-) diff --git a/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json b/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json index fa7f4c588a1c..49ef8a099289 100644 --- a/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json +++ b/arm-monitor/2016-03-01/examples/createOrUpdateLogProfile.json @@ -1,29 +1,20 @@ { "parameters": { - "subscriptionId": "b67f7fec-69fc-4974-9099-a26bd6ffeda3", + "subscriptionId": "df602c9c-7aa0-407d-a6fb-eb20c8bd1192", "logProfileName": "Rac46PostSwapRG", "api-version": "2016-03-01", "parameters": { - "location": "West US", + "location": "", "tags": { }, "properties": { - "name":"chiricutin", - "description":"Pura Vida", - "isEnabled":true, - "condition": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricName":"Requests" - }, - "operator":"GreaterThan", - "threshold":3.0, - "windowSize":"PT5M", - "timeAggregation":"Total" + "locations": [ "global" ], + "categories": [ "Write", "Delete", "Action" ], + "retentionPolicy": { + "enabled": true, + "days": 3 }, - "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", - "actions":[] + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId": "" } } }, @@ -31,62 +22,52 @@ "200": { "headers": { }, "body": { - "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", - "name":"chiricutin", - "type":"Microsoft.Insights/alertRules", - "location":"West US", - "tags": { - "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" - }, + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":"", + "name":"default", + "location":"", + "tags":null, "properties": { - "name":"chiricutin", - "description":"Pura Vida", - "isEnabled":true, - "condition": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricName":"Requests" - }, - "operator":"GreaterThan", - "threshold":3.0, - "windowSize":"PT5M", - "timeAggregation":"Total" - }, - "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", - "actions":[] + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":"", + "locations":[ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } } } }, "201": { "headers": { }, "body": { - "id":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin", - "name":"chiricutin", - "type":"Microsoft.Insights/alertRules", - "location":"West US", - "tags": { - "$type":"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage","hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest":"Resource" - }, + "id":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/providers/microsoft.insights/logprofiles/default", + "type":"", + "name":"default", + "location":"", + "tags":null, "properties": { - "name":"chiricutin", - "description":"Pura Vida", - "isEnabled":true, - "condition": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition", - "dataSource": { - "odata.type":"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource", - "resourceUri":"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest", - "metricName":"Requests" - }, - "operator":"GreaterThan", - "threshold":3.0, - "windowSize":"PT5M", - "timeAggregation":"Total" - }, - "lastUpdatedTime":"2016-11-23T21:23:52.0221265Z", - "actions":[] + "storageAccountId":"/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/JohnKemTest/providers/Microsoft.Storage/storageAccounts/johnkemtest8162", + "serviceBusRuleId":"", + "locations":[ + "global" + ], + "categories": [ + "Delete", + "Write", + "Action" + ], + "retentionPolicy": { + "enabled":true, + "days":3 + } } } }