From ca0869b49176e7bc3866debbab9d32999661c4cb Mon Sep 17 00:00:00 2001 From: gucalder Date: Mon, 8 Jul 2019 09:27:11 -0700 Subject: [PATCH] BUG fix: Fixing type of MetricValue.Count to be double instead of the incorrect int64 it had before (#6485) * [Monitor] Make all attributes of EventData class readonly (#2254) * [Monitor] Fixing issue with metricnamespace specification as client level argument #2565 * [Monitor] Fixing incorrect specification of top parameter for Metrics API (#2655) * Add two missing "by subscription" operations. * Remove "examples" nodes as requested since they are not used anymore. Adding documentation to reduce number of warnings in validation. * Add the serviceBusRuleId back into the DiagnosticSetting resource spec. * Fix some issues with the examples * [Monitor] Fix issue #3585: revert previous commit since it is a breaking change * Add unit "BitsPerSecond" to the metrics specs. * Fixing workspace Id documentation * Add the Log Analytics destination type flag to the Diagnostic Settings objects * Fix a typo in a description * Fixing type of MetricValue.Count to be double instead of the incorrect int64 it had before * Fixing issue #2467 In List Activity Logs $filter is not optional and it requires at least a start time. --- .../stable/2015-04-01/activityLogs_API.json | 14 +--- .../examples/GetActivityLogsNoParams.json | 84 ------------------- .../examples/GetActivityLogsSelected.json | 40 --------- .../stable/2018-01-01/metrics_API.json | 4 +- 4 files changed, 6 insertions(+), 136 deletions(-) delete mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsNoParams.json delete mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsSelected.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json index 9ce194198379..ebc01be48664 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/activityLogs_API.json @@ -51,8 +51,8 @@ "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." + "required": true, + "description": "Reduces the set of data collected.
This argument is required and it also requires at least the start date/time.
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" @@ -80,14 +80,8 @@ }, "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": { + "$ref": "./examples/GetActivityLogsFiltered.json" }, "Get Activity Logs with filter and select": { "$ref": "./examples/GetActivityLogsFilteredAndSelected.json" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsNoParams.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsNoParams.json deleted file mode 100644 index d9e4f31f4a37..000000000000 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsNoParams.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "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=######" - } - } - } -} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsSelected.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsSelected.json deleted file mode 100644 index 020bb6e7f15e..000000000000 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/examples/GetActivityLogsSelected.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "parameters": { - "$select": "eventName,id,resourceGroupName,resourceProviderName,operationName,status,eventTimestamp,correlationId,submissionTimestamp,level", - "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", - "submissionTimestamp": "2015-01-21T22:14:39.9936304Z", - "level": "Informational" - } - ], - "nextLink": "https://management.azure.com/########-####-####-####-############$skiptoken=######" - } - } - } -} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json index e6a7da49e527..791acec68765 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json @@ -179,8 +179,8 @@ "description": "the sum of all of the values in the time range." }, "count": { - "type": "integer", - "format": "int64", + "type": "number", + "format": "double", "description": "the number of samples in the time range. Can be used to determine the number of values that contributed to the average value." } },