From ffa51a43d8861f398213eb2f4f10dede2a6ffcf9 Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:10:08 -0700 Subject: [PATCH 1/6] rename --- .../Generated/Models/LogsBatchQueryResult.cs | 4 +- .../Models/LogsQueryResult.Serialization.cs | 6 +-- .../src/Generated/Models/LogsQueryResult.cs | 4 +- .../LogsQueryResultTable.Serialization.cs | 6 +-- .../Generated/Models/LogsQueryResultTable.cs | 12 +++-- .../Generated/Models/MetricAvailability.cs | 6 ++- .../src/LogsQueryClient.cs | 16 +++--- .../src/MetricsQueryClient.cs | 8 +-- .../src/MetricsQueryOptions.cs | 6 ++- .../src/Models/LogsBatchQuery.cs | 4 +- .../src/Models/LogsBatchQueryResult.cs | 6 +-- .../src/Models/LogsBatchQueryResults.cs | 4 +- .../src/Models/LogsQueryResultTable.cs | 2 +- .../src/Models/LogsQueryResults.cs | 4 +- .../Azure.Monitor.Query/src/RowBinder.cs | 4 +- .../tests/LogsQueryClientSamples.cs | 4 +- .../tests/MetricsQueryClientLiveTests.cs | 18 +++---- .../tests/MetricsTestData.cs | 4 +- .../Models/PiiDetectionSkillMaskingMode.cs | 51 ------------------- 19 files changed, 62 insertions(+), 107 deletions(-) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs index 080b38896cee8..8a199528e1ff7 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs @@ -17,7 +17,7 @@ public partial class LogsBatchQueryResult : LogsQueryResult /// Initializes a new instance of LogsBatchQueryResult. /// The list of tables, columns and rows. /// is null. - internal LogsBatchQueryResult(IEnumerable allTables) : base(allTables) + internal LogsBatchQueryResult(IEnumerable allTables) : base(allTables) { if (allTables == null) { @@ -30,7 +30,7 @@ internal LogsBatchQueryResult(IEnumerable allTables) : bas /// Any object. /// Any object. /// Any object. - internal LogsBatchQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) : base(allTables, statistics, visualization, error) + internal LogsBatchQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) : base(allTables, statistics, visualization, error) { } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs index 7f88c93adb8c0..7c04834c8cb8e 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs @@ -15,7 +15,7 @@ public partial class LogsQueryResult { internal static LogsQueryResult DeserializeLogsQueryResult(JsonElement element) { - IReadOnlyList tables = default; + IReadOnlyList tables = default; Optional statistics = default; Optional render = default; Optional error = default; @@ -23,10 +23,10 @@ internal static LogsQueryResult DeserializeLogsQueryResult(JsonElement element) { if (property.NameEquals("tables")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsQueryResultTable.DeserializeLogsQueryResultTable(item)); + array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); } tables = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs index a80785576a7c8..57c78433f1d8a 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs @@ -18,7 +18,7 @@ public partial class LogsQueryResult /// Initializes a new instance of LogsQueryResult. /// The list of tables, columns and rows. /// is null. - internal LogsQueryResult(IEnumerable allTables) + internal LogsQueryResult(IEnumerable allTables) { if (allTables == null) { @@ -33,7 +33,7 @@ internal LogsQueryResult(IEnumerable allTables) /// Any object. /// Any object. /// Any object. - internal LogsQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) + internal LogsQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) { AllTables = allTables; _statistics = statistics; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs index 9e3236e7203d6..f3b52004a9992 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.Monitor.Query.Models { - public partial class LogsQueryResultTable + public partial class LogsTable { - internal static LogsQueryResultTable DeserializeLogsQueryResultTable(JsonElement element) + internal static LogsTable DeserializeLogsQueryResultTable(JsonElement element) { string name = default; IReadOnlyList columns = default; @@ -41,7 +41,7 @@ internal static LogsQueryResultTable DeserializeLogsQueryResultTable(JsonElement continue; } } - return new LogsQueryResultTable(name, columns, rows); + return new LogsTable(name, columns, rows); } } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs index 6861a0f36e559..e89fc974ce47a 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs @@ -9,18 +9,20 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; +using Azure.Core; namespace Azure.Monitor.Query.Models { /// Contains the columns and rows for one table in a query response. - public partial class LogsQueryResultTable + [CodeGenModel("LogsQueryResultTable")] + public partial class LogsTable { - /// Initializes a new instance of LogsQueryResultTable. + /// Initializes a new instance of LogsTable. /// The name of the table. /// The list of columns in this table. /// The resulting rows from this query. /// or is null. - internal LogsQueryResultTable(string name, IEnumerable columns, JsonElement internalRows) + internal LogsTable(string name, IEnumerable columns, JsonElement internalRows) { if (name == null) { @@ -36,11 +38,11 @@ internal LogsQueryResultTable(string name, IEnumerable co InternalRows = internalRows; } - /// Initializes a new instance of LogsQueryResultTable. + /// Initializes a new instance of LogsTable. /// The name of the table. /// The list of columns in this table. /// The resulting rows from this query. - internal LogsQueryResultTable(string name, IReadOnlyList columns, JsonElement internalRows) + internal LogsTable(string name, IReadOnlyList columns, JsonElement internalRows) { Name = name; Columns = columns; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs index 4c400580c534b..802c58effbd39 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using Azure.Core; namespace Azure.Monitor.Query.Models { @@ -22,12 +23,13 @@ internal MetricAvailability() /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. internal MetricAvailability(TimeSpan? timeGrain, TimeSpan? retention) { - TimeGrain = timeGrain; + Granularity = timeGrain; Retention = retention; } /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - public TimeSpan? TimeGrain { get; } + [CodeGenMember("TimeGrain")] + public TimeSpan? Granularity { get; } /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. public TimeSpan? Retention { get; } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs index 0ebaa6110f4a5..8553a6f351a85 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs @@ -89,7 +89,7 @@ protected LogsQueryClient() /// Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryAsync<MyLogEntryModel>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// /// Example of querying a primitive: @@ -97,7 +97,7 @@ protected LogsQueryClient() /// Response<IReadOnlyList<string>> response = await client.QueryAsync<string>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// /// The workspace id to include in the query (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). @@ -121,7 +121,7 @@ public virtual Response> Query(string workspaceId, string qu /// Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryAsync<MyLogEntryModel>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// /// Example of querying a primitive: @@ -129,7 +129,7 @@ public virtual Response> Query(string workspaceId, string qu /// Response<IReadOnlyList<string>> response = await client.QueryAsync<string>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// /// The workspace id to include in the query (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). @@ -207,11 +207,11 @@ public virtual async Task> QueryAsync(string workspace /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// @@ -260,11 +260,11 @@ public virtual Response QueryBatch(LogsBatchQuery batch, /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClient.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClient.cs index 3f0570b51a416..c96f31339ef94 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryClient.cs @@ -115,8 +115,8 @@ public virtual Response Query(string resourceId, IEnumerable try { return _metricsRestClient.List(resourceId, - timespan: options?.TimeSpan?.ToString(), - interval: options?.Interval, + timespan: options?.TimeRange?.ToString(), + interval: options?.Granularity, filter: options?.Filter, top: options?.Top, aggregation: GetAggregation(options), @@ -177,8 +177,8 @@ public virtual async Task> QueryAsync(string resour try { return await _metricsRestClient.ListAsync(resourceId, - timespan: options?.TimeSpan?.ToString(), - interval: options?.Interval, + timespan: options?.TimeRange?.ToString(), + interval: options?.Granularity, filter: options?.Filter, top: options?.Top, aggregation: GetAggregation(options), diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs index 3f4621aa6511b..04446142e4cfc 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs @@ -16,12 +16,14 @@ public class MetricsQueryOptions /// /// Gets or sets the timespan over which the metric will be queried. /// - public DateTimeRange? TimeSpan { get; set; } + [CodeGenMember("TimeSpan")] + public DateTimeRange? TimeRange { get; set; } /// /// Gets or sets the interval at which to sample metrics. /// - public TimeSpan? Interval { get; set; } + [CodeGenMember("Interval")] + public TimeSpan? Granularity { get; set; } /// /// Gets the list of metric aggregations to retrieve. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs index c83018551b801..6f3ad46926695 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs @@ -29,11 +29,11 @@ public LogsBatchQuery() /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs index 3f7283401834e..2f85bec243765 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs @@ -24,7 +24,7 @@ public partial class LogsBatchQueryResult: LogsQueryResult internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement element) { Optional error = default; - IReadOnlyList tables = default; + IReadOnlyList tables = default; Optional statistics = default; Optional render = default; @@ -56,10 +56,10 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement } if (property.NameEquals("tables")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsQueryResultTable.DeserializeLogsQueryResultTable(item)); + array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); } tables = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs index a112ec26f548d..48f8e10739023 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs @@ -27,11 +27,11 @@ public partial class LogsBatchQueryResults /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeSpan.FromDays(1))); + /// new DateTimeRange(TimeRange.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs index 6e2b119edb10f..3b3c9194c764d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs @@ -9,7 +9,7 @@ namespace Azure.Monitor.Query.Models { [CodeGenModel("Table")] - public partial class LogsQueryResultTable + public partial class LogsTable { private IReadOnlyList _rows; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs index ca73c51bf9968..80ff830731504 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs @@ -24,7 +24,7 @@ public partial class LogsQueryResult /// /// Gets the single table result of the query. /// - public LogsQueryResultTable Table + public LogsTable Table { get { @@ -41,7 +41,7 @@ public LogsQueryResultTable Table /// Gets the multi-table result of the query. /// [CodeGenMember("Tables")] - public IReadOnlyList AllTables { get; } + public IReadOnlyList AllTables { get; } /// /// Returns the query statistics if the is set to true. null otherwise. diff --git a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs index 98f098faf9c86..4181f3e457c8d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs @@ -10,7 +10,7 @@ namespace Azure.Monitor.Query internal class RowBinder: TypeBinder { internal static RowBinder Shared = new(); - internal IReadOnlyList BindResults(IReadOnlyList tables) + internal IReadOnlyList BindResults(IReadOnlyList tables) { List results = new List(); if (typeof(IDictionary).IsAssignableFrom(typeof(T))) @@ -98,7 +98,7 @@ protected override bool TryGet(BoundMemberInfo memberInfo, LogsQueryResultRow else { throw new NotSupportedException($"The {typeof(T)} type is not supported as a deserialization target. " + - "Supported types are string, bool, long, decimal, double, object, Guid, DateTimeOffset, TimeSpan, BinaryData."); + "Supported types are string, bool, long, decimal, double, object, Guid, DateTimeOffset, TimeRange, BinaryData."); } return true; diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientSamples.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientSamples.cs index 8fe8509a84f11..e86da46342b21 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientSamples.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientSamples.cs @@ -31,7 +31,7 @@ public async Task QueryLogsAsTable() "AzureActivity | top 10 by TimeGenerated", new DateTimeRange(TimeSpan.FromDays(1))); - LogsQueryResultTable table = response.Value.Table; + LogsTable table = response.Value.Table; foreach (var row in table.Rows) { @@ -58,7 +58,7 @@ public async Task QueryLogsAsTablePrintAll() "AzureActivity | top 10 by TimeGenerated", new DateTimeRange(TimeSpan.FromDays(1))); - LogsQueryResultTable table = response.Value.Table; + LogsTable table = response.Value.Table; foreach (var column in table.Columns) { diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs index 6bdd28b49ec88..304440dd34f6a 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsQueryClientLiveTests.cs @@ -57,7 +57,7 @@ public async Task CanQueryMetrics() new MetricsQueryOptions() { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, duration) + TimeRange = new DateTimeRange(_testData.StartTime, duration) }); var timeSeriesData = results.Value.Metrics[0].TimeSeries[0].Data; @@ -80,7 +80,7 @@ public async Task CanQueryMetricsAllAggregations() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.StartTime.Add(_testData.Duration)), + TimeRange = new DateTimeRange(_testData.StartTime, _testData.StartTime.Add(_testData.Duration)), Aggregations = { MetricAggregationType.Average, @@ -113,7 +113,7 @@ public async Task CanQueryMetricsStartEnd() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), + TimeRange = new DateTimeRange(_testData.StartTime, _testData.EndTime), }); var timeSeriesData = results.Value.Metrics[0].TimeSeries[0].Data; @@ -133,7 +133,7 @@ public async Task CanQueryMetricsStartDuration() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.Duration) + TimeRange = new DateTimeRange(_testData.StartTime, _testData.Duration) }); var timeSeriesData = results.Value.Metrics[0].TimeSeries[0].Data; @@ -153,7 +153,7 @@ public async Task CanQueryMetricsDurationEnd() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.Duration, _testData.EndTime) + TimeRange = new DateTimeRange(_testData.Duration, _testData.EndTime) }); var timeSeriesData = results.Value.Metrics[0].TimeSeries[0].Data; @@ -190,8 +190,8 @@ public async Task CanQueryMetricsStartEndInterval() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), - Interval = TimeSpan.FromMinutes(5) + TimeRange = new DateTimeRange(_testData.StartTime, _testData.EndTime), + Granularity = TimeSpan.FromMinutes(5) }); var timeSeriesData = results.Value.Metrics[0].TimeSeries[0].Data; @@ -211,7 +211,7 @@ public async Task CanQueryMetricsFilter() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), + TimeRange = new DateTimeRange(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '{_testData.Name1}'", Aggregations = { @@ -234,7 +234,7 @@ public async Task CanQueryMetricsFilterTop() new MetricsQueryOptions { MetricNamespace = _testData.MetricNamespace, - TimeSpan = new DateTimeRange(_testData.StartTime, _testData.EndTime), + TimeRange = new DateTimeRange(_testData.StartTime, _testData.EndTime), Filter = $"Name eq '*'", Top = 1, Aggregations = diff --git a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs index a471905f4645f..1c2e2d3388237 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/MetricsTestData.cs @@ -110,9 +110,9 @@ private async Task MetricsPropagated(MetricsQueryClient metricQueryClient) var metrics = await metricQueryClient.QueryAsync(_testEnvironment.MetricsResource, new[] {MetricName}, new MetricsQueryOptions() { - TimeSpan = new DateTimeRange(StartTime, Duration), + TimeRange = new DateTimeRange(StartTime, Duration), MetricNamespace = MetricNamespace, - Interval = TimeSpan.FromMinutes(1), + Granularity = TimeSpan.FromMinutes(1), Aggregations = { MetricAggregationType.Count diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs deleted file mode 100644 index 0c6970d3e4d22..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// A string indicating what maskingMode to use to mask the personal information detected in the input text. - public readonly partial struct PiiDetectionSkillMaskingMode : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public PiiDetectionSkillMaskingMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string ReplaceValue = "replace"; - - /// No masking occurs and the maskedText output will not be returned. - public static PiiDetectionSkillMaskingMode None { get; } = new PiiDetectionSkillMaskingMode(NoneValue); - /// Replaces the detected entities with the character given in the maskingCharacter parameter. The character will be repeated to the length of the detected entity so that the offsets will correctly correspond to both the input text as well as the output maskedText. - public static PiiDetectionSkillMaskingMode Replace { get; } = new PiiDetectionSkillMaskingMode(ReplaceValue); - /// Determines if two values are the same. - public static bool operator ==(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PiiDetectionSkillMaskingMode(string value) => new PiiDetectionSkillMaskingMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PiiDetectionSkillMaskingMode other && Equals(other); - /// - public bool Equals(PiiDetectionSkillMaskingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} From 81ff204d352b1446fe88903f50394e250515bcd8 Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Tue, 24 Aug 2021 00:22:23 -0700 Subject: [PATCH 2/6] wip --- .../src/Generated/CodeModel.yaml | 9461 +++++++++++++++++ .../src/Generated/Configuration.json | 9 + .../Generated/MetricDefinitionsRestClient.cs | 112 - .../Generated/MetricNamespacesRestClient.cs | 112 - .../src/Generated/MetricsRestClient.cs | 176 - .../Models/BatchQueryRequest.Serialization.cs | 48 - .../src/Generated/Models/BatchQueryRequest.cs | 56 - .../BatchQueryResponse.Serialization.cs | 68 - .../Generated/Models/BatchQueryResponse.cs | 40 - .../Models/BatchRequest.Serialization.cs | 28 - .../src/Generated/Models/BatchRequest.cs | 33 - .../Models/ErrorDetail.Serialization.cs | 75 - .../src/Generated/Models/ErrorDetail.cs | 67 - .../Models/ErrorInfo.Serialization.cs | 74 - .../src/Generated/Models/ErrorInfo.cs | 63 - .../Models/ErrorResponse.Serialization.cs | 29 - .../src/Generated/Models/ErrorResponse.cs | 31 - ...rrorResponseAutoGenerated.Serialization.cs | 35 - .../Models/ErrorResponseAutoGenerated.cs | 32 - .../Models/LocalizableString.Serialization.cs | 35 - .../src/Generated/Models/LocalizableString.cs | 42 - .../LogsBatchQueryResult.Serialization.cs | 17 - .../Generated/Models/LogsBatchQueryResult.cs | 37 - .../LogsBatchQueryResults.Serialization.cs | 40 - .../Generated/Models/LogsBatchQueryResults.cs | 29 - .../src/Generated/Models/LogsColumnType.cs | 75 - .../Models/LogsQueryResult.Serialization.cs | 53 - .../src/Generated/Models/LogsQueryResult.cs | 44 - .../LogsQueryResultColumn.Serialization.cs | 35 - .../Generated/Models/LogsQueryResultColumn.cs | 35 - .../LogsQueryResultTable.Serialization.cs | 47 - .../Generated/Models/LogsQueryResultTable.cs | 57 - .../Generated/Models/MetadataApplication.cs | 57 - .../Models/MetadataApplicationRelated.cs | 28 - .../src/Generated/Models/MetadataCategory.cs | 43 - .../Models/MetadataCategoryRelated.cs | 37 - .../Models/MetadataColumnDataType.cs | 75 - .../src/Generated/Models/MetadataFunction.cs | 59 - .../Models/MetadataFunctionRelated.cs | 37 - .../Generated/Models/MetadataPermissions.cs | 40 - .../MetadataPermissionsApplicationsItem.cs | 31 - .../MetadataPermissionsResourcesItem.cs | 36 - .../MetadataPermissionsWorkspacesItem.cs | 36 - .../src/Generated/Models/MetadataQuery.cs | 54 - .../Generated/Models/MetadataQueryRelated.cs | 34 - .../Generated/Models/MetadataResourceType.cs | 54 - .../Models/MetadataResourceTypeRelated.cs | 40 - .../src/Generated/Models/MetadataResults.cs | 52 - .../src/Generated/Models/MetadataSolution.cs | 55 - .../Models/MetadataSolutionRelated.cs | 46 - .../src/Generated/Models/MetadataTable.cs | 57 - .../Models/MetadataTableColumnsItem.cs | 41 - .../Generated/Models/MetadataTableRelated.cs | 40 - .../Models/MetadataValue.Serialization.cs | 40 - .../src/Generated/Models/MetadataValue.cs | 32 - .../src/Generated/Models/MetadataWorkspace.cs | 57 - .../Models/MetadataWorkspaceRelated.cs | 37 - .../Generated/Models/Metric.Serialization.cs | 77 - .../src/Generated/Models/Metric.cs | 80 - .../MetricAggregationType.Serialization.cs | 36 - .../MetricAvailability.Serialization.cs | 46 - .../Generated/Models/MetricAvailability.cs | 36 - .../src/Generated/Models/MetricClass.cs | 60 - .../Models/MetricDefinition.Serialization.cs | 157 - .../src/Generated/Models/MetricDefinition.cs | 78 - ...etricDefinitionCollection.Serialization.cs | 35 - .../Models/MetricDefinitionCollection.cs | 40 - .../Models/MetricNamespace.Serialization.cs | 63 - .../src/Generated/Models/MetricNamespace.cs | 42 - ...MetricNamespaceCollection.Serialization.cs | 35 - .../Models/MetricNamespaceCollection.cs | 40 - .../MetricNamespaceName.Serialization.cs | 29 - .../Generated/Models/MetricNamespaceName.cs | 28 - .../src/Generated/Models/MetricUnit.cs | 84 - .../Models/MetricValue.Serialization.cs | 85 - .../src/Generated/Models/MetricValue.cs | 52 - .../MetricsQueryResult.Serialization.cs | 76 - .../Generated/Models/MetricsQueryResult.cs | 60 - .../Models/NamespaceClassification.cs | 54 - .../Models/QueryBody.Serialization.cs | 38 - .../src/Generated/Models/QueryBody.cs | 36 - .../Models/ResultType.Serialization.cs | 28 - .../Models/TimeSeriesElement.Serialization.cs | 56 - .../src/Generated/Models/TimeSeriesElement.cs | 34 - .../src/Generated/QueryModelFactory.cs | 46 - .../src/Generated/QueryRestClient.cs | 282 - .../src/MetricsQueryOptions.cs | 2 +- .../src/Models/LogsBatchQueryResult.cs | 4 +- ...LogsQueryResults.cs => LogsQueryResult.cs} | 0 .../{LogsQueryResultTable.cs => LogsTable.cs} | 12 +- ...{LogsQueryResultRow.cs => LogsTableRow.cs} | 7 +- .../Azure.Monitor.Query/src/Models/Metric.cs | 2 +- .../src/Models/MetricsQueryResult.cs | 2 +- .../src/Models/QueryResultColumn.cs | 2 +- .../src/Properties/AssemblyInfo.cs | 2 +- .../Azure.Monitor.Query/src/RowBinder.cs | 6 +- .../tests/LogsQueryClientClientLiveTests.cs | 2 +- 97 files changed, 9491 insertions(+), 4576 deletions(-) create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResults.cs => LogsQueryResult.cs} (100%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResultTable.cs => LogsTable.cs} (78%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResultRow.cs => LogsTableRow.cs} (97%) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml b/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml new file mode 100644 index 0000000000000..ca1320e32337e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml @@ -0,0 +1,9461 @@ +!CodeModel +info: !Info + description: This API exposes Azure Log Analytics query capabilities + contact: + name: AIAPI Team + email: aiapi@microsoft.com + url: https://dev.loganalytics.io/support + license: + name: Microsoft + url: https://dev.loganalytics.io/license + termsOfService: https://dev.loganalytics.io/tos + title: Query +schemas: !Schemas + booleans: + - !BooleanSchema &ref_32 + type: boolean + language: !Languages + default: + name: Boolean + description: Flag to indicate whether the dimension is required. + protocol: !Protocols {} + - !BooleanSchema &ref_114 + type: boolean + language: !Languages + default: + name: Boolean + description: A flag indicating this column is a preferred facet + protocol: !Protocols {} + numbers: + - !NumberSchema &ref_28 + type: integer + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + precision: 32 + language: !Languages + default: + name: BatchQueryResponseStatus + description: '' + protocol: !Protocols {} + - !NumberSchema &ref_283 + type: integer + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 32 + language: !Languages + default: + name: Integer + description: '' + protocol: !Protocols {} + - !NumberSchema &ref_50 + type: integer + apiVersions: + - !ApiVersion + version: '2018-01-01' + minimum: 0 + precision: 32 + language: !Languages + default: + name: ResponseCost + description: The integer value representing the relative cost of the query. + protocol: !Protocols {} + - !NumberSchema &ref_62 + type: number + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 64 + language: !Languages + default: + name: MetricValueAverage + description: the average value in the time range. + protocol: !Protocols {} + - !NumberSchema &ref_63 + type: number + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 64 + language: !Languages + default: + name: MetricValueMinimum + description: the least value in the time range. + protocol: !Protocols {} + - !NumberSchema &ref_64 + type: number + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 64 + language: !Languages + default: + name: MetricValueMaximum + description: the greatest value in the time range. + protocol: !Protocols {} + - !NumberSchema &ref_65 + type: number + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 64 + language: !Languages + default: + name: MetricValueTotal + description: the sum of all of the values in the time range. + protocol: !Protocols {} + - !NumberSchema &ref_66 + type: number + apiVersions: + - !ApiVersion + version: '2018-01-01' + precision: 64 + language: !Languages + default: + name: MetricValueCount + description: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. + protocol: !Protocols {} + strings: + - !StringSchema &ref_0 + type: string + language: !Languages + default: + name: String + description: simple string + protocol: !Protocols {} + - !StringSchema &ref_1 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + - !StringSchema &ref_2 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: TableName + description: The name of the table. + protocol: !Protocols {} + - !StringSchema &ref_3 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ColumnName + description: The name of this column. + protocol: !Protocols {} + - !StringSchema &ref_8 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorInfoCode + description: A machine readable error code. + protocol: !Protocols {} + - !StringSchema &ref_9 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorInfoMessage + description: A human readable error message. + protocol: !Protocols {} + - !StringSchema &ref_10 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorDetailCode + description: The error's code. + protocol: !Protocols {} + - !StringSchema &ref_11 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorDetailMessage + description: A human readable error message. + protocol: !Protocols {} + - !StringSchema &ref_12 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorDetailTarget + description: Indicates which property in the request is responsible for the error. + protocol: !Protocols {} + - !StringSchema &ref_13 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorDetailValue + description: Indicates which value in 'target' is responsible for the error. + protocol: !Protocols {} + - !StringSchema &ref_14 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: ErrorDetailResourcesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_17 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: QueryParam + description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) + protocol: !Protocols {} + - !StringSchema &ref_18 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: TimespanParam + description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + protocol: !Protocols {} + - !StringSchema &ref_19 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: WorkspacesParamItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_20 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: BatchQueryRequestId + description: The error details. + protocol: !Protocols {} + - !StringSchema &ref_25 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: BatchQueryRequestWorkspace + description: Workspace Id to be included in the query + protocol: !Protocols {} + - !StringSchema &ref_27 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: BatchQueryResponseId + description: '' + protocol: !Protocols {} + - !StringSchema &ref_275 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + - !StringSchema &ref_277 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + - !StringSchema &ref_33 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDefinitionResourceId + description: the resource identifier of the resource that emitted the metric. + protocol: !Protocols {} + - !StringSchema &ref_34 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDefinitionNamespace + description: the namespace the metric belongs to. + protocol: !Protocols {} + - !StringSchema &ref_35 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: LocalizableStringValue + description: the invariant value. + protocol: !Protocols {} + - !StringSchema &ref_36 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: LocalizableStringLocalizedValue + description: the locale specific value. + protocol: !Protocols {} + - !StringSchema &ref_37 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDefinitionDisplayDescription + description: Detailed description of this metric. + protocol: !Protocols {} + - !StringSchema &ref_38 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDefinitionCategory + description: Custom category name for this metric. + protocol: !Protocols {} + - !StringSchema &ref_44 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDefinitionId + description: the resource identifier of the metric definition. + protocol: !Protocols {} + - !StringSchema &ref_48 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: ErrorResponseCode + description: Error code + protocol: !Protocols {} + - !StringSchema &ref_49 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: ErrorResponseMessage + description: Error message indicating why the operation failed. + protocol: !Protocols {} + - !StringSchema &ref_51 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: ResponseTimespan + description: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. + protocol: !Protocols {} + - !StringSchema &ref_53 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: ResponseNamespace + description: The namespace of the metrics being queried + protocol: !Protocols {} + - !StringSchema &ref_54 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: ResponseResourceregion + description: The region of the resource being queried for metrics. + protocol: !Protocols {} + - !StringSchema &ref_55 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricId + description: the metric Id. + protocol: !Protocols {} + - !StringSchema &ref_56 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricType + description: the resource type of the metric resource. + protocol: !Protocols {} + - !StringSchema &ref_57 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricDisplayDescription + description: Detailed description of this metric. + protocol: !Protocols {} + - !StringSchema &ref_58 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricErrorCode + description: '''Success'' or the error details on query failures for this metric.' + protocol: !Protocols {} + - !StringSchema &ref_59 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricErrorMessage + description: Error message encountered querying this specific metric. + protocol: !Protocols {} + - !StringSchema &ref_60 + type: string + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetadataValue + description: the value of the metadata. + protocol: !Protocols {} + - !StringSchema &ref_297 + type: string + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + - !StringSchema &ref_71 + type: string + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: MetricNamespaceId + description: The ID of the metric namespace. + protocol: !Protocols {} + - !StringSchema &ref_72 + type: string + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: MetricNamespaceType + description: The type of the namespace. + protocol: !Protocols {} + - !StringSchema &ref_73 + type: string + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: MetricNamespaceName + description: The escaped name of the namespace. + protocol: !Protocols {} + - !StringSchema &ref_75 + type: string + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + language: !Languages + default: + name: MetricNamespaceNameMetricNamespaceName + description: The metric namespace name. + protocol: !Protocols {} + - !StringSchema + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + defaultValue: '' + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + - !StringSchema &ref_78 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryId + description: The ID of the category + protocol: !Protocols {} + - !StringSchema &ref_79 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryDisplayName + description: The display name of the category + protocol: !Protocols {} + - !StringSchema &ref_80 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryDescription + description: The description of the category + protocol: !Protocols {} + - !StringSchema &ref_81 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_82 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_83 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryRelatedResourceTypesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_84 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryRelatedQueriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_85 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataCategoryRelatedSolutionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_86 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeId + description: The ID of the resource-type + protocol: !Protocols {} + - !StringSchema &ref_87 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceType + description: The type of the resource-type + protocol: !Protocols {} + - !StringSchema &ref_88 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeDisplayName + description: The display name of the resource-type + protocol: !Protocols {} + - !StringSchema &ref_89 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeDescription + description: The description of the resource-type + protocol: !Protocols {} + - !StringSchema &ref_90 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeLabelsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_91 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_92 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_93 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedCategoriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_94 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedQueriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_95 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedWorkspacesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_96 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataResourceTypeRelatedResourcesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_97 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionId + description: The ID of the Log Analytics solution + protocol: !Protocols {} + - !StringSchema &ref_98 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionName + description: The name of the Log Analytics solution + protocol: !Protocols {} + - !StringSchema &ref_99 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionDisplayName + description: The display name of the Log Analytics solution + protocol: !Protocols {} + - !StringSchema &ref_100 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionDescription + description: The description of the Log Analytics solution + protocol: !Protocols {} + - !StringSchema &ref_101 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_102 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_103 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionRelatedCategoriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_104 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionRelatedQueriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_105 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataSolutionRelatedWorkspacesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_106 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableId + description: The ID of the table + protocol: !Protocols {} + - !StringSchema &ref_107 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableName + description: The name of the table + protocol: !Protocols {} + - !StringSchema &ref_108 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableDescription + description: The description of the table + protocol: !Protocols {} + - !StringSchema &ref_109 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableTimespanColumn + description: The column associated with the timespan query parameter for the table + protocol: !Protocols {} + - !StringSchema &ref_110 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableLabelsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_111 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableColumnsItemName + description: The name of the column + protocol: !Protocols {} + - !StringSchema &ref_112 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableColumnsItemDescription + description: The description of the column + protocol: !Protocols {} + - !StringSchema &ref_115 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedCategoriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_116 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedSolutionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_117 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedResourceTypesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_118 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedWorkspacesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_119 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_120 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataTableRelatedQueriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_121 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionId + description: The ID of the function. + protocol: !Protocols {} + - !StringSchema &ref_122 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionName + description: The name of the function, to be used in queries. + protocol: !Protocols {} + - !StringSchema &ref_123 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionParameters + description: The parameters/arguments of the function, if any. + protocol: !Protocols {} + - !StringSchema &ref_124 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionDisplayName + description: The display name of the function. + protocol: !Protocols {} + - !StringSchema &ref_125 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionDescription + description: The description of the function. + protocol: !Protocols {} + - !StringSchema &ref_126 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionBody + description: The KQL body of the function. + protocol: !Protocols {} + - !StringSchema &ref_127 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_128 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionRelatedSolutionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_129 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionRelatedResourceTypesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_130 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionRelatedCategoriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_131 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataFunctionRelatedWorkspacesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_132 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryId + description: The ID of the query. + protocol: !Protocols {} + - !StringSchema &ref_133 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryDisplayName + description: The display name of the query. + protocol: !Protocols {} + - !StringSchema &ref_134 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryDescription + description: The description of the query. + protocol: !Protocols {} + - !StringSchema &ref_135 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryBody + description: The KQL body of the query. + protocol: !Protocols {} + - !StringSchema &ref_136 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryLabelsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_137 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryRelatedCategoriesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_138 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryRelatedSolutionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_139 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryRelatedResourceTypesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_140 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataQueryRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_141 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationId + description: The ID of the Application Insights app. + protocol: !Protocols {} + - !StringSchema &ref_142 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationResourceId + description: The ARM resource ID of the Application Insights app. + protocol: !Protocols {} + - !StringSchema &ref_143 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationName + description: The name of the Application Insights app. + protocol: !Protocols {} + - !StringSchema &ref_144 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationRegion + description: The Azure region of the Application Insights app. + protocol: !Protocols {} + - !StringSchema &ref_145 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_146 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataApplicationRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_147 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceId + description: The ID of the Log Analytics workspace. + protocol: !Protocols {} + - !StringSchema &ref_148 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceResourceId + description: The ARM resource ID of the Log Analytics workspace. + protocol: !Protocols {} + - !StringSchema &ref_149 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceName + description: The name of the Log Analytics workspace. + protocol: !Protocols {} + - !StringSchema &ref_150 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRegion + description: The Azure region of the Log Analytics workspace. + protocol: !Protocols {} + - !StringSchema &ref_151 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRelatedTablesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_152 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRelatedSolutionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_153 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRelatedResourceTypesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_154 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRelatedFunctionsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_155 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataWorkspaceRelatedResourcesItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_157 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataPermissionsWorkspacesItemResourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + - !StringSchema &ref_158 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataPermissionsWorkspacesPropertiesItemsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_159 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataPermissionsResourcesItemResourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + - !StringSchema &ref_160 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataPermissionsResourcesPropertiesItemsItem + description: '' + protocol: !Protocols {} + - !StringSchema &ref_161 + type: string + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: MetadataPermissionsApplicationsItemResourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + - !StringSchema + type: string + apiVersions: + - !ApiVersion + version: '2.0' + minLength: 1 + language: !Languages + default: + name: String + description: '' + protocol: !Protocols {} + choices: + - !ChoiceSchema &ref_4 + choices: + - !ChoiceValue + value: bool + language: + default: + name: Bool + description: '' + - !ChoiceValue + value: datetime + language: + default: + name: Datetime + description: '' + - !ChoiceValue + value: dynamic + language: + default: + name: Dynamic + description: '' + - !ChoiceValue + value: int + language: + default: + name: Int + description: '' + - !ChoiceValue + value: long + language: + default: + name: Long + description: '' + - !ChoiceValue + value: real + language: + default: + name: Real + description: '' + - !ChoiceValue + value: string + language: + default: + name: String + description: '' + - !ChoiceValue + value: guid + language: + default: + name: Guid + description: '' + - !ChoiceValue + value: decimal + language: + default: + name: Decimal + description: '' + - !ChoiceValue + value: timespan + language: + default: + name: Timespan + description: '' + type: choice + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + choiceType: *ref_0 + language: !Languages + default: + name: LogsColumnType + description: The data type of this column. + protocol: !Protocols {} + - !ChoiceSchema &ref_39 + choices: + - !ChoiceValue + value: Availability + language: + default: + name: Availability + description: '' + - !ChoiceValue + value: Transactions + language: + default: + name: Transactions + description: '' + - !ChoiceValue + value: Errors + language: + default: + name: Errors + description: '' + - !ChoiceValue + value: Latency + language: + default: + name: Latency + description: '' + - !ChoiceValue + value: Saturation + language: + default: + name: Saturation + description: '' + type: choice + apiVersions: + - !ApiVersion + version: '2018-01-01' + choiceType: *ref_0 + language: !Languages + default: + name: MetricClass + description: The class of the metric. + protocol: !Protocols {} + - !ChoiceSchema &ref_40 + choices: + - !ChoiceValue + value: Count + language: + default: + name: Count + description: '' + - !ChoiceValue + value: Bytes + language: + default: + name: Bytes + description: '' + - !ChoiceValue + value: Seconds + language: + default: + name: Seconds + description: '' + - !ChoiceValue + value: CountPerSecond + language: + default: + name: CountPerSecond + description: '' + - !ChoiceValue + value: BytesPerSecond + language: + default: + name: BytesPerSecond + description: '' + - !ChoiceValue + value: Percent + language: + default: + name: Percent + description: '' + - !ChoiceValue + value: MilliSeconds + language: + default: + name: MilliSeconds + description: '' + - !ChoiceValue + value: ByteSeconds + language: + default: + name: ByteSeconds + description: '' + - !ChoiceValue + value: Unspecified + language: + default: + name: Unspecified + description: '' + - !ChoiceValue + value: Cores + language: + default: + name: Cores + description: '' + - !ChoiceValue + value: MilliCores + language: + default: + name: MilliCores + description: '' + - !ChoiceValue + value: NanoCores + language: + default: + name: NanoCores + description: '' + - !ChoiceValue + value: BitsPerSecond + language: + default: + name: BitsPerSecond + description: '' + type: choice + apiVersions: + - !ApiVersion + version: '2018-01-01' + choiceType: *ref_0 + language: !Languages + default: + name: MetricUnit + description: The unit of the metric. + protocol: !Protocols {} + - !ChoiceSchema &ref_74 + choices: + - !ChoiceValue + value: Platform + language: + default: + name: Platform + description: '' + - !ChoiceValue + value: Custom + language: + default: + name: Custom + description: '' + - !ChoiceValue + value: Qos + language: + default: + name: Qos + description: '' + type: choice + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + choiceType: *ref_0 + language: !Languages + default: + name: NamespaceClassification + description: Kind of namespace + protocol: !Protocols {} + - !ChoiceSchema &ref_113 + choices: + - !ChoiceValue + value: bool + language: + default: + name: Bool + description: '' + - !ChoiceValue + value: datetime + language: + default: + name: Datetime + description: '' + - !ChoiceValue + value: dynamic + language: + default: + name: Dynamic + description: '' + - !ChoiceValue + value: int + language: + default: + name: Int + description: '' + - !ChoiceValue + value: long + language: + default: + name: Long + description: '' + - !ChoiceValue + value: real + language: + default: + name: Real + description: '' + - !ChoiceValue + value: string + language: + default: + name: String + description: '' + - !ChoiceValue + value: guid + language: + default: + name: Guid + description: '' + - !ChoiceValue + value: decimal + language: + default: + name: Decimal + description: '' + - !ChoiceValue + value: timespan + language: + default: + name: Timespan + description: '' + type: choice + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + choiceType: *ref_0 + language: !Languages + default: + name: MetadataColumnDataType + description: The data type of the column + protocol: !Protocols {} + sealedChoices: + - !SealedChoiceSchema &ref_41 + choices: + - !ChoiceValue + value: None + language: + default: + name: None + description: '' + - !ChoiceValue + value: Average + language: + default: + name: Average + description: '' + - !ChoiceValue + value: Count + language: + default: + name: Count + description: '' + - !ChoiceValue + value: Minimum + language: + default: + name: Minimum + description: '' + - !ChoiceValue + value: Maximum + language: + default: + name: Maximum + description: '' + - !ChoiceValue + value: Total + language: + default: + name: Total + description: '' + type: sealed-choice + apiVersions: + - !ApiVersion + version: '2018-01-01' + choiceType: *ref_0 + language: !Languages + default: + name: AggregationType + description: the aggregation type of the metric. + protocol: !Protocols {} + - !SealedChoiceSchema &ref_284 + choices: + - !ChoiceValue + value: Data + language: + default: + name: Data + description: '' + - !ChoiceValue + value: Metadata + language: + default: + name: Metadata + description: '' + type: sealed-choice + apiVersions: + - !ApiVersion + version: '2018-01-01' + choiceType: *ref_0 + language: !Languages + default: + name: ResultType + description: '' + protocol: !Protocols {} + constants: + - !ConstantSchema &ref_261 + type: constant + value: !ConstantValue + value: application/json + valueType: *ref_0 + language: !Languages + default: + name: Accept + description: 'Accept: application/json' + protocol: !Protocols {} + - !ConstantSchema &ref_267 + type: constant + value: !ConstantValue + value: application/json + valueType: *ref_0 + language: !Languages + default: + name: ApplicationJson + description: Content Type 'application/json' + protocol: !Protocols {} + - !ConstantSchema &ref_23 + type: constant + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + value: !ConstantValue + value: /query + valueType: *ref_0 + language: !Languages + default: + name: BatchQueryRequestPath + description: '' + protocol: !Protocols {} + - !ConstantSchema &ref_24 + type: constant + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + value: !ConstantValue + value: POST + valueType: *ref_0 + language: !Languages + default: + name: BatchQueryRequestMethod + description: '' + protocol: !Protocols {} + - !ConstantSchema &ref_276 + type: constant + value: !ConstantValue + value: '2018-01-01' + valueType: *ref_0 + language: !Languages + default: + name: ApiVersion201801 + description: Api Version (2018-01-01) + protocol: !Protocols {} + - !ConstantSchema &ref_296 + type: constant + value: !ConstantValue + value: 2017-12-01-preview + valueType: *ref_0 + language: !Languages + default: + name: ApiVersion20171201Preview + description: Api Version (2017-12-01-preview) + protocol: !Protocols {} + dictionaries: + - !DictionarySchema &ref_21 + type: dictionary + elementType: *ref_1 + language: !Languages + default: + name: BatchQueryRequestHeaders + description: Dictionary of + protocol: !Protocols {} + - !DictionarySchema &ref_29 + type: dictionary + elementType: *ref_1 + language: !Languages + default: + name: BatchQueryResponseHeaders + description: Dictionary of + protocol: !Protocols {} + any: + - !AnySchema &ref_156 + type: any + language: !Languages + default: + name: any + description: Anything + protocol: !Protocols {} + anyObjects: + - !AnyObjectSchema &ref_5 + type: any-object + language: !Languages + default: + name: AnyObject + description: Any object + protocol: !Protocols {} + dateTimes: + - !DateTimeSchema &ref_61 + type: date-time + format: date-time + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricValueTimeStamp + description: the timestamp for the metric value in ISO 8601 format. + protocol: !Protocols {} + durations: + - !DurationSchema &ref_260 + type: duration + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + language: !Languages + default: + name: Duration + description: '' + protocol: !Protocols {} + - !DurationSchema &ref_42 + type: duration + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricAvailabilityTimeGrain + description: the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + protocol: !Protocols {} + - !DurationSchema &ref_43 + type: duration + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: MetricAvailabilityRetention + description: the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + protocol: !Protocols {} + - !DurationSchema &ref_282 + type: duration + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: Duration + description: '' + protocol: !Protocols {} + - !DurationSchema &ref_52 + type: duration + apiVersions: + - !ApiVersion + version: '2018-01-01' + language: !Languages + default: + name: ResponseInterval + description: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. + protocol: !Protocols {} + objects: + - !ObjectSchema &ref_265 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_186 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_6 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_2 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the table. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_183 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_7 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_3 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of this column. + protocol: !Protocols {} + - !Property + schema: *ref_4 + required: true + serializedName: type + language: !Languages + default: + name: type + description: The data type of this column. + protocol: !Protocols {} + serializationFormats: + - json + summary: A table column. + usage: + - output + language: !Languages + default: + name: Column + description: A column in a table. + namespace: '' + summary: A table column. + protocol: !Protocols {} + language: !Languages + default: + name: TableColumns + description: The list of columns in this table. + protocol: !Protocols {} + required: true + serializedName: columns + language: !Languages + default: + name: columns + description: The list of columns in this table. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_185 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ArraySchema &ref_184 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_5 + language: !Languages + default: + name: TableRowsItem + description: Array of AnyObject + protocol: !Protocols {} + language: !Languages + default: + name: TableRows + description: The resulting rows from this query. + protocol: !Protocols {} + required: true + serializedName: rows + language: !Languages + default: + name: rows + description: The resulting rows from this query. + protocol: !Protocols {} + serializationFormats: + - json + summary: A query response table. + usage: + - output + language: !Languages + default: + name: Table + description: Contains the columns and rows for one table in a query response. + namespace: '' + summary: A query response table. + protocol: !Protocols {} + language: !Languages + default: + name: QueryResultsTables + description: The list of tables, columns and rows. + protocol: !Protocols {} + required: true + serializedName: tables + language: !Languages + default: + name: tables + description: The list of tables, columns and rows. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: statistics + language: !Languages + default: + name: statistics + description: Any object + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: render + language: !Languages + default: + name: render + description: Any object + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: error + language: !Languages + default: + name: error + description: Any object + protocol: !Protocols {} + serializationFormats: + - json + summary: A query response. + usage: + - output + language: !Languages + default: + name: QueryResults + description: Contains the tables, columns & rows resulting from a query. + namespace: '' + summary: A query response. + protocol: !Protocols {} + - *ref_6 + - *ref_7 + - !ObjectSchema &ref_266 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ObjectSchema &ref_15 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_8 + required: true + serializedName: code + language: !Languages + default: + name: code + description: A machine readable error code. + protocol: !Protocols {} + - !Property + schema: *ref_9 + required: true + serializedName: message + language: !Languages + default: + name: message + description: A human readable error message. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_188 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_16 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_10 + required: true + serializedName: code + language: !Languages + default: + name: code + description: The error's code. + protocol: !Protocols {} + - !Property + schema: *ref_11 + required: true + serializedName: message + language: !Languages + default: + name: message + description: A human readable error message. + protocol: !Protocols {} + - !Property + schema: *ref_12 + required: false + serializedName: target + language: !Languages + default: + name: target + description: Indicates which property in the request is responsible for the error. + protocol: !Protocols {} + - !Property + schema: *ref_13 + required: false + serializedName: value + language: !Languages + default: + name: value + description: Indicates which value in 'target' is responsible for the error. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_187 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_14 + language: !Languages + default: + name: ErrorDetailResources + description: Indicates resources which were responsible for the error. + protocol: !Protocols {} + required: false + serializedName: resources + language: !Languages + default: + name: resources + description: Indicates resources which were responsible for the error. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: additionalProperties + language: !Languages + default: + name: additionalProperties + description: Additional properties that can be provided on the error details object + protocol: !Protocols {} + serializationFormats: + - json + summary: Error details. + usage: + - exception + - output + language: !Languages + default: + name: ErrorDetail + description: Error details. + namespace: '' + summary: Error details. + protocol: !Protocols {} + language: !Languages + default: + name: ErrorInfoDetails + description: error details. + protocol: !Protocols {} + required: false + serializedName: details + language: !Languages + default: + name: details + description: error details. + protocol: !Protocols {} + - !Property + schema: *ref_15 + required: false + serializedName: innererror + language: !Languages + default: + name: innererror + description: Inner error details if they exist. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: additionalProperties + language: !Languages + default: + name: additionalProperties + description: Additional properties that can be provided on the error info object + protocol: !Protocols {} + serializationFormats: + - json + summary: The code and message for an error. + usage: + - exception + - output + language: !Languages + default: + name: ErrorInfo + description: The code and message for an error. + namespace: '' + summary: The code and message for an error. + protocol: !Protocols {} + required: true + serializedName: error + language: !Languages + default: + name: error + description: The error details. + protocol: !Protocols {} + serializationFormats: + - json + summary: Error details. + usage: + - exception + language: !Languages + default: + name: ErrorResponse + description: Contains details when the response code indicates an error. + namespace: '' + summary: Error details. + protocol: !Protocols {} + - *ref_15 + - *ref_16 + - !ObjectSchema &ref_22 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_17 + required: true + serializedName: query + language: !Languages + default: + name: query + description: The query to execute. + protocol: !Protocols {} + - !Property + schema: *ref_18 + required: false + serializedName: timespan + language: !Languages + default: + name: timespan + description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_189 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_19 + language: !Languages + default: + name: WorkspacesParam + description: Workspace names to include in cross-workspace queries. + protocol: !Protocols {} + required: false + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: A list of workspaces that are included in the query. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - input + language: !Languages + default: + name: QueryBody + description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) + namespace: '' + protocol: !Protocols {} + - !ObjectSchema &ref_271 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_190 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_26 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_20 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The error details. + protocol: !Protocols {} + - !Property + schema: *ref_21 + required: false + serializedName: headers + language: !Languages + default: + name: headers + description: Dictionary of + protocol: !Protocols {} + - !Property + schema: *ref_22 + required: true + serializedName: body + language: !Languages + default: + name: body + description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) + protocol: !Protocols {} + - !Property + schema: *ref_23 + required: false + serializedName: path + language: !Languages + default: + name: path + description: '' + protocol: !Protocols {} + - !Property + schema: *ref_24 + required: false + serializedName: method + language: !Languages + default: + name: method + description: '' + protocol: !Protocols {} + - !Property + schema: *ref_25 + required: true + serializedName: workspace + language: !Languages + default: + name: workspace + description: Workspace Id to be included in the query + protocol: !Protocols {} + serializationFormats: + - json + usage: + - input + language: !Languages + default: + name: BatchQueryRequest + description: An single request in a batch. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: BatchRequestRequests + description: An single request in a batch. + protocol: !Protocols {} + required: true + serializedName: requests + language: !Languages + default: + name: requests + description: An single request in a batch. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - input + language: !Languages + default: + name: BatchRequest + description: An array of requests. + namespace: '' + protocol: !Protocols {} + - *ref_26 + - !ObjectSchema &ref_273 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_192 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_30 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_27 + serializedName: id + language: !Languages + default: + name: id + description: '' + protocol: !Protocols {} + - !Property + schema: *ref_28 + serializedName: status + language: !Languages + default: + name: status + description: '' + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_31 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_191 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_6 + language: !Languages + default: + name: BatchQueryResultsTables + description: The list of tables, columns and rows. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The list of tables, columns and rows. + protocol: !Protocols {} + - !Property + schema: *ref_5 + serializedName: statistics + language: !Languages + default: + name: statistics + description: Statistics represented in JSON format. + protocol: !Protocols {} + - !Property + schema: *ref_5 + serializedName: render + language: !Languages + default: + name: render + description: Visualization data in JSON format. + protocol: !Protocols {} + - !Property + schema: *ref_15 + serializedName: error + language: !Languages + default: + name: error + description: The code and message for an error. + protocol: !Protocols {} + serializationFormats: + - json + summary: A query response for a single query in a batch. + usage: + - output + language: !Languages + default: + name: BatchQueryResults + description: Contains the tables, columns & rows resulting from a query. + namespace: '' + summary: A query response for a single query in a batch. + protocol: !Protocols {} + serializedName: body + language: !Languages + default: + name: body + description: Contains the tables, columns & rows resulting from a query. + protocol: !Protocols {} + - !Property + schema: *ref_29 + serializedName: headers + language: !Languages + default: + name: headers + description: Dictionary of + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: BatchQueryResponse + description: '' + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: BatchResponseResponses + description: An array of responses corresponding to each individual request in a batch. + protocol: !Protocols {} + serializedName: responses + language: !Languages + default: + name: responses + description: An array of responses corresponding to each individual request in a batch. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: BatchResponse + description: Response to a batch query. + namespace: '' + protocol: !Protocols {} + - *ref_30 + - *ref_31 + - !ObjectSchema &ref_280 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: !ArraySchema &ref_196 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_46 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_32 + serializedName: isDimensionRequired + language: !Languages + default: + name: isDimensionRequired + description: Flag to indicate whether the dimension is required. + protocol: !Protocols {} + - !Property + schema: *ref_33 + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: the resource identifier of the resource that emitted the metric. + protocol: !Protocols {} + - !Property + schema: *ref_34 + serializedName: namespace + language: !Languages + default: + name: namespace + description: the namespace the metric belongs to. + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_45 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_35 + required: true + serializedName: value + language: !Languages + default: + name: value + description: the invariant value. + protocol: !Protocols {} + - !Property + schema: *ref_36 + required: false + serializedName: localizedValue + language: !Languages + default: + name: localizedValue + description: the locale specific value. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: LocalizableString + description: The localizable string class. + namespace: '' + protocol: !Protocols {} + serializedName: name + language: !Languages + default: + name: name + description: the name and the display name of the metric, i.e. it is a localizable string. + protocol: !Protocols {} + - !Property + schema: *ref_37 + serializedName: displayDescription + language: !Languages + default: + name: displayDescription + description: Detailed description of this metric. + protocol: !Protocols {} + - !Property + schema: *ref_38 + serializedName: category + language: !Languages + default: + name: category + description: Custom category name for this metric. + protocol: !Protocols {} + - !Property + schema: *ref_39 + serializedName: metricClass + language: !Languages + default: + name: metricClass + description: The class of the metric. + protocol: !Protocols {} + - !Property + schema: *ref_40 + serializedName: unit + language: !Languages + default: + name: unit + description: The unit of the metric. + protocol: !Protocols {} + - !Property + schema: *ref_41 + serializedName: primaryAggregationType + language: !Languages + default: + name: primaryAggregationType + description: the primary aggregation type value defining how to use the values for display. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_193 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: *ref_41 + language: !Languages + default: + name: MetricDefinitionSupportedAggregationTypes + description: the collection of what aggregation types are supported. + protocol: !Protocols {} + serializedName: supportedAggregationTypes + language: !Languages + default: + name: supportedAggregationTypes + description: the collection of what aggregation types are supported. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_194 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_47 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_42 + serializedName: timeGrain + language: !Languages + default: + name: timeGrain + description: the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + protocol: !Protocols {} + - !Property + schema: *ref_43 + serializedName: retention + language: !Languages + default: + name: retention + description: the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricAvailability + description: Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetricDefinitionMetricAvailabilities + description: the collection of what aggregation intervals are available to be queried. + protocol: !Protocols {} + serializedName: metricAvailabilities + language: !Languages + default: + name: metricAvailabilities + description: the collection of what aggregation intervals are available to be queried. + protocol: !Protocols {} + - !Property + schema: *ref_44 + serializedName: id + language: !Languages + default: + name: id + description: the resource identifier of the metric definition. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_195 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: *ref_45 + language: !Languages + default: + name: MetricDefinitionDimensions + description: the name and the display name of the dimension, i.e. it is a localizable string. + protocol: !Protocols {} + serializedName: dimensions + language: !Languages + default: + name: dimensions + description: the name and the display name of the dimension, i.e. it is a localizable string. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricDefinition + description: Metric definition class specifies the metadata for a metric. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetricDefinitionCollectionValue + description: the values for the metric definitions. + protocol: !Protocols {} + required: true + serializedName: value + language: !Languages + default: + name: value + description: the values for the metric definitions. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricDefinitionCollection + description: Represents collection of metric definitions. + namespace: '' + protocol: !Protocols {} + - *ref_46 + - *ref_45 + - *ref_47 + - !ObjectSchema &ref_281 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + - !ApiVersion + version: 2017-12-01-preview + properties: + - !Property + schema: *ref_48 + serializedName: code + language: !Languages + default: + name: code + description: Error code + protocol: !Protocols {} + - !Property + schema: *ref_49 + serializedName: message + language: !Languages + default: + name: message + description: Error message indicating why the operation failed. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - exception + language: !Languages + default: + name: ErrorResponseAutoGenerated + description: Describes the format of Error response. + namespace: '' + protocol: !Protocols {} + - !ObjectSchema &ref_295 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_50 + required: false + serializedName: cost + language: !Languages + default: + name: cost + description: The integer value representing the relative cost of the query. + protocol: !Protocols {} + - !Property + schema: *ref_51 + required: true + serializedName: timespan + language: !Languages + default: + name: timespan + description: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. + protocol: !Protocols {} + - !Property + schema: *ref_52 + required: false + serializedName: interval + language: !Languages + default: + name: interval + description: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. + protocol: !Protocols {} + - !Property + schema: *ref_53 + required: false + serializedName: namespace + language: !Languages + default: + name: namespace + description: The namespace of the metrics being queried + protocol: !Protocols {} + - !Property + schema: *ref_54 + required: false + serializedName: resourceregion + language: !Languages + default: + name: resourceregion + description: The region of the resource being queried for metrics. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_200 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_67 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_55 + required: true + serializedName: id + language: !Languages + default: + name: id + description: the metric Id. + protocol: !Protocols {} + - !Property + schema: *ref_56 + required: true + serializedName: type + language: !Languages + default: + name: type + description: the resource type of the metric resource. + protocol: !Protocols {} + - !Property + schema: *ref_45 + required: true + serializedName: name + language: !Languages + default: + name: name + description: the name and the display name of the metric, i.e. it is localizable string. + protocol: !Protocols {} + - !Property + schema: *ref_57 + required: false + serializedName: displayDescription + language: !Languages + default: + name: displayDescription + description: Detailed description of this metric. + protocol: !Protocols {} + - !Property + schema: *ref_58 + required: false + serializedName: errorCode + language: !Languages + default: + name: errorCode + description: '''Success'' or the error details on query failures for this metric.' + protocol: !Protocols {} + - !Property + schema: *ref_59 + required: false + serializedName: errorMessage + language: !Languages + default: + name: errorMessage + description: Error message encountered querying this specific metric. + protocol: !Protocols {} + - !Property + schema: *ref_40 + required: true + serializedName: unit + language: !Languages + default: + name: unit + description: The unit of the metric. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_199 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_68 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: !ArraySchema &ref_197 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_69 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_45 + serializedName: name + language: !Languages + default: + name: name + description: the name of the metadata. + protocol: !Protocols {} + - !Property + schema: *ref_60 + serializedName: value + language: !Languages + default: + name: value + description: the value of the metadata. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetadataValue + description: Represents a metric metadata value. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: TimeSeriesElementMetadatavalues + description: the metadata values returned if $filter was specified in the call. + protocol: !Protocols {} + serializedName: metadatavalues + language: !Languages + default: + name: metadatavalues + description: the metadata values returned if $filter was specified in the call. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_198 + type: array + apiVersions: + - !ApiVersion + version: '2018-01-01' + elementType: !ObjectSchema &ref_70 + type: object + apiVersions: + - !ApiVersion + version: '2018-01-01' + properties: + - !Property + schema: *ref_61 + required: true + serializedName: timeStamp + language: !Languages + default: + name: timeStamp + description: the timestamp for the metric value in ISO 8601 format. + protocol: !Protocols {} + - !Property + schema: *ref_62 + required: false + serializedName: average + language: !Languages + default: + name: average + description: the average value in the time range. + protocol: !Protocols {} + - !Property + schema: *ref_63 + required: false + serializedName: minimum + language: !Languages + default: + name: minimum + description: the least value in the time range. + protocol: !Protocols {} + - !Property + schema: *ref_64 + required: false + serializedName: maximum + language: !Languages + default: + name: maximum + description: the greatest value in the time range. + protocol: !Protocols {} + - !Property + schema: *ref_65 + required: false + serializedName: total + language: !Languages + default: + name: total + description: the sum of all of the values in the time range. + protocol: !Protocols {} + - !Property + schema: *ref_66 + required: false + serializedName: count + language: !Languages + default: + name: count + description: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricValue + description: Represents a metric value. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: TimeSeriesElementData + description: An array of data points representing the metric values. This is only returned if a result type of data is specified. + protocol: !Protocols {} + serializedName: data + language: !Languages + default: + name: data + description: An array of data points representing the metric values. This is only returned if a result type of data is specified. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: TimeSeriesElement + description: A time series result type. The discriminator value is always TimeSeries in this case. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetricTimeseries + description: the time series returned when a data query is performed. + protocol: !Protocols {} + required: true + serializedName: timeseries + language: !Languages + default: + name: timeseries + description: the time series returned when a data query is performed. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: Metric + description: The result data of a query. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: ResponseValue + description: the value of the collection. + protocol: !Protocols {} + required: true + serializedName: value + language: !Languages + default: + name: value + description: the value of the collection. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: Response + description: The response to a metrics query. + namespace: '' + protocol: !Protocols {} + - *ref_67 + - *ref_68 + - *ref_69 + - *ref_70 + - !ObjectSchema &ref_300 + type: object + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + properties: + - !Property + schema: !ArraySchema &ref_201 + type: array + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + elementType: !ObjectSchema &ref_76 + type: object + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + properties: + - !Property + schema: *ref_71 + serializedName: id + language: !Languages + default: + name: id + description: The ID of the metric namespace. + protocol: !Protocols {} + - !Property + schema: *ref_72 + serializedName: type + language: !Languages + default: + name: type + description: The type of the namespace. + protocol: !Protocols {} + - !Property + schema: *ref_73 + serializedName: name + language: !Languages + default: + name: name + description: The escaped name of the namespace. + protocol: !Protocols {} + - !Property + schema: *ref_74 + serializedName: classification + language: !Languages + default: + name: classification + description: Kind of namespace + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_77 + type: object + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + properties: + - !Property + schema: *ref_75 + serializedName: metricNamespaceName + language: !Languages + default: + name: metricNamespaceName + description: The metric namespace name. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricNamespaceName + description: The fully qualified metric namespace name. + namespace: '' + protocol: !Protocols {} + serializedName: properties + language: !Languages + default: + name: properties + description: Properties which include the fully qualified namespace name. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricNamespace + description: Metric namespace class specifies the metadata for a metric namespace. + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetricNamespaceCollectionValue + description: The values for the metric namespaces. + protocol: !Protocols {} + required: true + serializedName: value + language: !Languages + default: + name: value + description: The values for the metric namespaces. + protocol: !Protocols {} + serializationFormats: + - json + usage: + - output + language: !Languages + default: + name: MetricNamespaceCollection + description: Represents collection of metric namespaces. + namespace: '' + protocol: !Protocols {} + - *ref_76 + - *ref_77 + - !ObjectSchema + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_207 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_162 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_78 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the category + protocol: !Protocols {} + - !Property + schema: *ref_79 + required: true + serializedName: displayName + language: !Languages + default: + name: displayName + description: The display name of the category + protocol: !Protocols {} + - !Property + schema: *ref_80 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the category + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_163 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_202 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_81 + language: !Languages + default: + name: MetadataCategoryRelatedTables + description: The tables related to the category + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The tables related to the category + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_203 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_82 + language: !Languages + default: + name: MetadataCategoryRelatedFunctions + description: The functions related to the category + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The functions related to the category + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_204 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_83 + language: !Languages + default: + name: MetadataCategoryRelatedResourceTypes + description: The resource types related to the category + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The resource types related to the category + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_205 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_84 + language: !Languages + default: + name: MetadataCategoryRelatedQueries + description: The saved queries related to the category + protocol: !Protocols {} + serializedName: queries + language: !Languages + default: + name: queries + description: The saved queries related to the category + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_206 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_85 + language: !Languages + default: + name: MetadataCategoryRelatedSolutions + description: The Log Analytics solutions related to the category + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The Log Analytics solutions related to the category + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataCategoryRelated + description: The related metadata items for the category + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the category + protocol: !Protocols {} + summary: A metadata category. + language: !Languages + default: + name: MetadataCategory + description: Categories are used to group other metadata entities. + namespace: '' + summary: A metadata category. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsCategories + description: The list of categories that are referenced in this metadata response. + protocol: !Protocols {} + serializedName: categories + language: !Languages + default: + name: categories + description: The list of categories that are referenced in this metadata response. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_215 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_164 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_86 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the resource-type + protocol: !Protocols {} + - !Property + schema: *ref_87 + required: true + serializedName: type + language: !Languages + default: + name: type + description: The type of the resource-type + protocol: !Protocols {} + - !Property + schema: *ref_88 + required: false + serializedName: displayName + language: !Languages + default: + name: displayName + description: The display name of the resource-type + protocol: !Protocols {} + - !Property + schema: *ref_89 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_208 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_90 + language: !Languages + default: + name: MetadataResourceTypeLabels + description: The user-defined labels of the resource-type + protocol: !Protocols {} + required: false + serializedName: labels + language: !Languages + default: + name: labels + description: The user-defined labels of the resource-type + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: tags + language: !Languages + default: + name: tags + description: The tags associated with the resource-type + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: properties + language: !Languages + default: + name: properties + description: The properties of the resource-type + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_165 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_209 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_91 + language: !Languages + default: + name: MetadataResourceTypeRelatedTables + description: The tables related to the resource-type + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The tables related to the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_210 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_92 + language: !Languages + default: + name: MetadataResourceTypeRelatedFunctions + description: The functions related to the resource-type + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The functions related to the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_211 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_93 + language: !Languages + default: + name: MetadataResourceTypeRelatedCategories + description: The categories related to the resource-type + protocol: !Protocols {} + serializedName: categories + language: !Languages + default: + name: categories + description: The categories related to the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_212 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_94 + language: !Languages + default: + name: MetadataResourceTypeRelatedQueries + description: The queries related to the resource-type + protocol: !Protocols {} + serializedName: queries + language: !Languages + default: + name: queries + description: The queries related to the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_213 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_95 + language: !Languages + default: + name: MetadataResourceTypeRelatedWorkspaces + description: The Log Analytics workspaces related to the resource-type + protocol: !Protocols {} + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The Log Analytics workspaces related to the resource-type + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_214 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_96 + language: !Languages + default: + name: MetadataResourceTypeRelatedResources + description: The Azure resources related to the resource-type + protocol: !Protocols {} + serializedName: resources + language: !Languages + default: + name: resources + description: The Azure resources related to the resource-type + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataResourceTypeRelated + description: The related metadata items for the resource-type + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the resource-type + protocol: !Protocols {} + summary: A type of resource in Azure. + language: !Languages + default: + name: MetadataResourceType + description: Metadata about types of Azure resources, containing relevant tables, functions, etc. + namespace: '' + summary: A type of resource in Azure. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsResourceTypes + description: The list of resource types that are referenced in this metadata response. + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The list of resource types that are referenced in this metadata response. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_221 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_166 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_97 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: *ref_98 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: *ref_99 + required: false + serializedName: displayName + language: !Languages + default: + name: displayName + description: The display name of the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: *ref_100 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: tags + language: !Languages + default: + name: tags + description: The tags that are associated with the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: properties + language: !Languages + default: + name: properties + description: The properties of the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_167 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_216 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_101 + language: !Languages + default: + name: MetadataSolutionRelatedTables + description: The tables related to the Log Analytics solution + protocol: !Protocols {} + required: true + serializedName: tables + language: !Languages + default: + name: tables + description: The tables related to the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_217 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_102 + language: !Languages + default: + name: MetadataSolutionRelatedFunctions + description: The functions related to the Log Analytics solution + protocol: !Protocols {} + required: false + serializedName: functions + language: !Languages + default: + name: functions + description: The functions related to the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_218 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_103 + language: !Languages + default: + name: MetadataSolutionRelatedCategories + description: The categories related to the Log Analytics solution + protocol: !Protocols {} + required: false + serializedName: categories + language: !Languages + default: + name: categories + description: The categories related to the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_219 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_104 + language: !Languages + default: + name: MetadataSolutionRelatedQueries + description: The saved queries related to the Log Analytics solution + protocol: !Protocols {} + required: false + serializedName: queries + language: !Languages + default: + name: queries + description: The saved queries related to the Log Analytics solution + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_220 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_105 + language: !Languages + default: + name: MetadataSolutionRelatedWorkspaces + description: The Workspaces referenced in the metadata request that are related to the Log Analytics solution + protocol: !Protocols {} + required: false + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The Workspaces referenced in the metadata request that are related to the Log Analytics solution + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataSolutionRelated + description: The related metadata items for the Log Analytics solution + namespace: '' + protocol: !Protocols {} + required: true + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the Log Analytics solution + protocol: !Protocols {} + summary: A Log Analytics solution. + language: !Languages + default: + name: MetadataSolution + description: Solutions can group tables and functions that are associated with a certain Azure Log Analytics offering. + namespace: '' + summary: A Log Analytics solution. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsSolutions + description: The list of Log Analytics solutions installed on the workspace. + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The list of Log Analytics solutions installed on the workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_230 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_168 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_106 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the table + protocol: !Protocols {} + - !Property + schema: *ref_107 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the table + protocol: !Protocols {} + - !Property + schema: *ref_108 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the table + protocol: !Protocols {} + - !Property + schema: *ref_109 + required: false + serializedName: timespanColumn + language: !Languages + default: + name: timespanColumn + description: The column associated with the timespan query parameter for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_222 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_110 + language: !Languages + default: + name: MetadataTableLabels + description: The user defined labels of the table + protocol: !Protocols {} + required: false + serializedName: labels + language: !Languages + default: + name: labels + description: The user defined labels of the table + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: tags + language: !Languages + default: + name: tags + description: The tags associated with the table + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: properties + language: !Languages + default: + name: properties + description: The properties of the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_223 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_169 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_111 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the column + protocol: !Protocols {} + - !Property + schema: *ref_112 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the column + protocol: !Protocols {} + - !Property + schema: *ref_113 + required: true + serializedName: type + language: !Languages + default: + name: type + description: The data type of the column + protocol: !Protocols {} + - !Property + schema: *ref_114 + required: false + serializedName: isPreferredFacet + language: !Languages + default: + name: isPreferredFacet + description: A flag indicating this column is a preferred facet + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: source + language: !Languages + default: + name: source + description: an indication of the source of the column, used only when multiple workspaces have conflicting definition for the column + protocol: !Protocols {} + language: !Languages + default: + name: MetadataTableColumnsItem + description: '' + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetadataTableColumns + description: The list of columns defined on the table + protocol: !Protocols {} + required: false + serializedName: columns + language: !Languages + default: + name: columns + description: The list of columns defined on the table + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_170 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_224 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_115 + language: !Languages + default: + name: MetadataTableRelatedCategories + description: The related categories for the table + protocol: !Protocols {} + serializedName: categories + language: !Languages + default: + name: categories + description: The related categories for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_225 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_116 + language: !Languages + default: + name: MetadataTableRelatedSolutions + description: The related Log Analytics solutions for the table + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The related Log Analytics solutions for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_226 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_117 + language: !Languages + default: + name: MetadataTableRelatedResourceTypes + description: The related resource types for the table + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The related resource types for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_227 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_118 + language: !Languages + default: + name: MetadataTableRelatedWorkspaces + description: The related Log Analytics workspaces for the table + protocol: !Protocols {} + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The related Log Analytics workspaces for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_228 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_119 + language: !Languages + default: + name: MetadataTableRelatedFunctions + description: The related functions for the table + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The related functions for the table + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_229 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_120 + language: !Languages + default: + name: MetadataTableRelatedQueries + description: The related saved queries for the table + protocol: !Protocols {} + serializedName: queries + language: !Languages + default: + name: queries + description: The related saved queries for the table + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataTableRelated + description: The related metadata items for the table + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the table + protocol: !Protocols {} + summary: A data table that takes part in a workspace schema. + language: !Languages + default: + name: MetadataTable + description: Tables are part of the workspace schema, and contain a list of columns and a reference to other relevant metadata items. + namespace: '' + summary: A data table that takes part in a workspace schema. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsTables + description: The list of tables and columns that comprise the schema of the workspace. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The list of tables and columns that comprise the schema of the workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_236 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_171 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_121 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the function. + protocol: !Protocols {} + - !Property + schema: *ref_122 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the function, to be used in queries. + protocol: !Protocols {} + - !Property + schema: *ref_123 + required: false + serializedName: parameters + language: !Languages + default: + name: parameters + description: The parameters/arguments of the function, if any. + protocol: !Protocols {} + - !Property + schema: *ref_124 + required: false + serializedName: displayName + language: !Languages + default: + name: displayName + description: The display name of the function. + protocol: !Protocols {} + - !Property + schema: *ref_125 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the function. + protocol: !Protocols {} + - !Property + schema: *ref_126 + required: true + serializedName: body + language: !Languages + default: + name: body + description: The KQL body of the function. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: tags + language: !Languages + default: + name: tags + description: The tags associated with the function. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: properties + language: !Languages + default: + name: properties + description: The properties of the function. + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_172 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_231 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_127 + language: !Languages + default: + name: MetadataFunctionRelatedTables + description: The related tables for the function. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The related tables for the function. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_232 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_128 + language: !Languages + default: + name: MetadataFunctionRelatedSolutions + description: The related Log Analytics solutions for the function. + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The related Log Analytics solutions for the function. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_233 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_129 + language: !Languages + default: + name: MetadataFunctionRelatedResourceTypes + description: The related resource types for the function. + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The related resource types for the function. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_234 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_130 + language: !Languages + default: + name: MetadataFunctionRelatedCategories + description: The related categories for the function. + protocol: !Protocols {} + serializedName: categories + language: !Languages + default: + name: categories + description: The related categories for the function. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_235 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_131 + language: !Languages + default: + name: MetadataFunctionRelatedWorkspaces + description: The related workspaces for the function. + protocol: !Protocols {} + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The related workspaces for the function. + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataFunctionRelated + description: The related metadata items for the function. + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the function. + protocol: !Protocols {} + summary: A stored function. + language: !Languages + default: + name: MetadataFunction + description: Functions are stored Kusto queries that can be specified as part of queries by using their name. + namespace: '' + summary: A stored function. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsFunctions + description: The list of functions stored on the workspace, or introduced by solutions etc. + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The list of functions stored on the workspace, or introduced by solutions etc. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_242 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_173 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_132 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the query. + protocol: !Protocols {} + - !Property + schema: *ref_133 + required: false + serializedName: displayName + language: !Languages + default: + name: displayName + description: The display name of the query. + protocol: !Protocols {} + - !Property + schema: *ref_134 + required: false + serializedName: description + language: !Languages + default: + name: description + description: The description of the query. + protocol: !Protocols {} + - !Property + schema: *ref_135 + required: true + serializedName: body + language: !Languages + default: + name: body + description: The KQL body of the query. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_237 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_136 + language: !Languages + default: + name: MetadataQueryLabels + description: The user defined labels associated with the query. + protocol: !Protocols {} + required: false + serializedName: labels + language: !Languages + default: + name: labels + description: The user defined labels associated with the query. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: tags + language: !Languages + default: + name: tags + description: The tags associated with the query. + protocol: !Protocols {} + - !Property + schema: *ref_5 + required: false + serializedName: properties + language: !Languages + default: + name: properties + description: The properties of the query. + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_174 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_238 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_137 + language: !Languages + default: + name: MetadataQueryRelatedCategories + description: The related categories for the query. + protocol: !Protocols {} + serializedName: categories + language: !Languages + default: + name: categories + description: The related categories for the query. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_239 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_138 + language: !Languages + default: + name: MetadataQueryRelatedSolutions + description: The related Log Analytics solutions for the query. + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The related Log Analytics solutions for the query. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_240 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_139 + language: !Languages + default: + name: MetadataQueryRelatedResourceTypes + description: The related resource types for the query. + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The related resource types for the query. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_241 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_140 + language: !Languages + default: + name: MetadataQueryRelatedTables + description: The related tables for the query. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The related tables for the query. + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataQueryRelated + description: The related metadata items for the query. + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the query. + protocol: !Protocols {} + summary: A stored query. + language: !Languages + default: + name: MetadataQuery + description: Queries are stored pieces of KQL, along with a list of relevant metadata items. + namespace: '' + summary: A stored query. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsQueries + description: The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. + protocol: !Protocols {} + serializedName: queries + language: !Languages + default: + name: queries + description: The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_245 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_175 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_141 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the Application Insights app. + protocol: !Protocols {} + - !Property + schema: *ref_142 + required: true + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: The ARM resource ID of the Application Insights app. + protocol: !Protocols {} + - !Property + schema: *ref_143 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the Application Insights app. + protocol: !Protocols {} + - !Property + schema: *ref_144 + required: true + serializedName: region + language: !Languages + default: + name: region + description: The Azure region of the Application Insights app. + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_176 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_243 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_145 + language: !Languages + default: + name: MetadataApplicationRelatedTables + description: The related tables for the Application Insights app. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The related tables for the Application Insights app. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_244 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_146 + language: !Languages + default: + name: MetadataApplicationRelatedFunctions + description: The related functions for the Application Insights app. + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The related functions for the Application Insights app. + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataApplicationRelated + description: The related metadata items for the Application Insights app. + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the Application Insights app. + protocol: !Protocols {} + summary: An Application Insights application. + language: !Languages + default: + name: MetadataApplication + description: Application Insights apps that were part of the metadata request and that the user has access to. + namespace: '' + summary: An Application Insights application. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsApplications + description: The list of Application Insights apps that were referenced in the metadata request. + protocol: !Protocols {} + serializedName: applications + language: !Languages + default: + name: applications + description: The list of Application Insights apps that were referenced in the metadata request. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_251 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_177 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_147 + required: true + serializedName: id + language: !Languages + default: + name: id + description: The ID of the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: *ref_148 + required: true + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: The ARM resource ID of the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: *ref_149 + required: true + serializedName: name + language: !Languages + default: + name: name + description: The name of the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: *ref_150 + required: true + serializedName: region + language: !Languages + default: + name: region + description: The Azure region of the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: !ObjectSchema &ref_178 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_246 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_151 + language: !Languages + default: + name: MetadataWorkspaceRelatedTables + description: The related tables for the Log Analytics workspace. + protocol: !Protocols {} + serializedName: tables + language: !Languages + default: + name: tables + description: The related tables for the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_247 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_152 + language: !Languages + default: + name: MetadataWorkspaceRelatedSolutions + description: The related Log Analytics solutions for the Log Analytics workspace. + protocol: !Protocols {} + serializedName: solutions + language: !Languages + default: + name: solutions + description: The related Log Analytics solutions for the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_248 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_153 + language: !Languages + default: + name: MetadataWorkspaceRelatedResourceTypes + description: The related resource types for the Log Analytics workspace. + protocol: !Protocols {} + serializedName: resourceTypes + language: !Languages + default: + name: resourceTypes + description: The related resource types for the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_249 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_154 + language: !Languages + default: + name: MetadataWorkspaceRelatedFunctions + description: The related functions for the Log Analytics workspace. + protocol: !Protocols {} + serializedName: functions + language: !Languages + default: + name: functions + description: The related functions for the Log Analytics workspace. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_250 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_155 + language: !Languages + default: + name: MetadataWorkspaceRelatedResources + description: The related Azure resources for the Log Analytics workspace. + protocol: !Protocols {} + serializedName: resources + language: !Languages + default: + name: resources + description: The related Azure resources for the Log Analytics workspace. + protocol: !Protocols {} + extensions: + x-internal-autorest-anonymous-schema: + anonymous: true + language: !Languages + default: + name: MetadataWorkspaceRelated + description: The related metadata items for the Log Analytics workspace. + namespace: '' + protocol: !Protocols {} + required: false + serializedName: related + language: !Languages + default: + name: related + description: The related metadata items for the Log Analytics workspace. + protocol: !Protocols {} + summary: A Log Analytics workspace. + language: !Languages + default: + name: MetadataWorkspace + description: Log Analytics workspaces that were part of the metadata request and that the user has access to. + namespace: '' + summary: A Log Analytics workspace. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsWorkspaces + description: The list of Log Analytics workspaces that were referenced in the metadata request. + protocol: !Protocols {} + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The list of Log Analytics workspaces that were referenced in the metadata request. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_252 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_156 + uniqueItems: true + language: !Languages + default: + name: MetadataResultsResources + description: The list of Azure resources that were referenced in the metadata request. + protocol: !Protocols {} + serializedName: resources + language: !Languages + default: + name: resources + description: The list of Azure resources that were referenced in the metadata request. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_258 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_179 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: !ArraySchema &ref_254 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_180 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_157 + required: true + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_253 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_158 + language: !Languages + default: + name: MetadataPermissionsWorkspacesItemDenyTables + description: The list of tables that were denied access for the resource ID. + protocol: !Protocols {} + required: false + serializedName: denyTables + language: !Languages + default: + name: denyTables + description: The list of tables that were denied access for the resource ID. + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsWorkspacesItem + description: '' + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsWorkspaces + description: The permission indication for the workspaces on the metadata request. + protocol: !Protocols {} + required: true + serializedName: workspaces + language: !Languages + default: + name: workspaces + description: The permission indication for the workspaces on the metadata request. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_256 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_181 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_159 + required: true + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_255 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: *ref_160 + language: !Languages + default: + name: MetadataPermissionsResourcesItemDenyTables + description: The list of tables that were denied access for the resource ID. + protocol: !Protocols {} + required: false + serializedName: denyTables + language: !Languages + default: + name: denyTables + description: The list of tables that were denied access for the resource ID. + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsResourcesItem + description: '' + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsResources + description: The permission indication for the Azure resources on the metadata request. + protocol: !Protocols {} + required: false + serializedName: resources + language: !Languages + default: + name: resources + description: The permission indication for the Azure resources on the metadata request. + protocol: !Protocols {} + - !Property + schema: !ArraySchema &ref_257 + type: array + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + elementType: !ObjectSchema &ref_182 + type: object + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + properties: + - !Property + schema: *ref_161 + required: true + serializedName: resourceId + language: !Languages + default: + name: resourceId + description: The resource ID on the permission indication. + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsApplicationsItem + description: '' + namespace: '' + protocol: !Protocols {} + language: !Languages + default: + name: MetadataPermissionsApplications + description: The permission indication for the Application Insights apps on the metadata request. + protocol: !Protocols {} + required: false + serializedName: applications + language: !Languages + default: + name: applications + description: The permission indication for the Application Insights apps on the metadata request. + protocol: !Protocols {} + summary: Permission information. + language: !Languages + default: + name: MetadataPermissions + description: Permission information for the metadata call, includes apps/workspaces/resource the user didn't have access to. + namespace: '' + summary: Permission information. + protocol: !Protocols {} + uniqueItems: true + language: !Languages + default: + name: MetadataResultsPermissions + description: The list of permission rules that affected the metadata request. + protocol: !Protocols {} + serializedName: permissions + language: !Languages + default: + name: permissions + description: The list of permission rules that affected the metadata request. + protocol: !Protocols {} + summary: A metadata response. + language: !Languages + default: + name: MetadataResults + description: The metadata response for the app, including available tables, etc. + namespace: '' + summary: A metadata response. + protocol: !Protocols {} + - *ref_162 + - *ref_163 + - *ref_164 + - *ref_165 + - *ref_166 + - *ref_167 + - *ref_168 + - *ref_169 + - *ref_170 + - *ref_171 + - *ref_172 + - *ref_173 + - *ref_174 + - *ref_175 + - *ref_176 + - *ref_177 + - *ref_178 + - *ref_179 + - *ref_180 + - *ref_181 + - *ref_182 + arrays: + - *ref_183 + - *ref_184 + - *ref_185 + - *ref_186 + - *ref_187 + - *ref_188 + - *ref_189 + - *ref_190 + - *ref_191 + - *ref_192 + - *ref_193 + - *ref_194 + - *ref_195 + - *ref_196 + - *ref_197 + - *ref_198 + - *ref_199 + - *ref_200 + - *ref_201 + - *ref_202 + - *ref_203 + - *ref_204 + - *ref_205 + - *ref_206 + - *ref_207 + - *ref_208 + - *ref_209 + - *ref_210 + - *ref_211 + - *ref_212 + - *ref_213 + - *ref_214 + - *ref_215 + - *ref_216 + - *ref_217 + - *ref_218 + - *ref_219 + - *ref_220 + - *ref_221 + - *ref_222 + - *ref_223 + - *ref_224 + - *ref_225 + - *ref_226 + - *ref_227 + - *ref_228 + - *ref_229 + - *ref_230 + - *ref_231 + - *ref_232 + - *ref_233 + - *ref_234 + - *ref_235 + - *ref_236 + - *ref_237 + - *ref_238 + - *ref_239 + - *ref_240 + - *ref_241 + - *ref_242 + - *ref_243 + - *ref_244 + - *ref_245 + - *ref_246 + - *ref_247 + - *ref_248 + - *ref_249 + - *ref_250 + - *ref_251 + - *ref_252 + - *ref_253 + - *ref_254 + - *ref_255 + - *ref_256 + - *ref_257 + - *ref_258 +globalParameters: + - !Parameter &ref_259 + schema: *ref_0 + clientDefaultValue: https://api.loganalytics.io/v1 + implementation: Client + origin: modelerfour:synthesized/host + required: true + extensions: + x-ms-skip-url-encoding: true + language: !Languages + default: + name: $host + description: server parameter + serializedName: $host + protocol: !Protocols + http: !HttpParameter + in: uri + - !Parameter &ref_274 + schema: *ref_0 + clientDefaultValue: https://management.azure.com + implementation: Client + origin: modelerfour:synthesized/host + required: true + extensions: + x-ms-skip-url-encoding: true + language: !Languages + default: + name: $host + description: server parameter + serializedName: $host + protocol: !Protocols + http: !HttpParameter + in: uri +operationGroups: + - !OperationGroup + $key: Query + operations: + - !Operation + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + parameters: + - *ref_259 + - !Parameter &ref_262 + schema: *ref_1 + implementation: Method + required: true + language: !Languages + default: + name: workspaceId + description: ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + serializedName: workspaceId + protocol: !Protocols + http: !HttpParameter + in: path + - !Parameter &ref_263 + schema: *ref_1 + implementation: Method + required: true + language: !Languages + default: + name: query + description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) + serializedName: query + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_264 + schema: *ref_260 + implementation: Method + language: !Languages + default: + name: timespan + description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + serializedName: timespan + protocol: !Protocols + http: !HttpParameter + in: query + requests: + - !Request + parameters: + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: [] + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpRequest + path: /workspaces/{workspaceId}/query + method: get + uri: '{$host}' + signatureParameters: + - *ref_262 + - *ref_263 + - *ref_264 + responses: + - !SchemaResponse + schema: *ref_265 + language: !Languages + default: + name: '' + description: OK. The API call succeeded and the Analytics query result is in the response payload + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_266 + language: !Languages + default: + name: '' + description: An error response object. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + cross-workspace: + description: A cross workspace query that the type and count of each row per workspace. + parameters: + query: union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId + workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 + workspaces: draft-test,draft-test-2 + title: Cross Workspace Query + responses: + '200': + body: + tables: + - name: PrimaryResult + columns: + - name: Type + type: string + - name: TenantId + type: string + - name: count_ + type: long + rows: + - - Usage + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '1' + - - Usage + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '1' + - - BillingFact + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '1' + - - BillingFact + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '1' + - - Operation + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '7' + - - Operation + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '5' + simple-query: + description: A simple query that returns query results. + parameters: + query: Usage | take 10 + timespan: PT12H + workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 + title: Simple Query + responses: + '200': + body: + tables: + - name: PrimaryResult + columns: + - name: TenantId + type: string + - name: Computer + type: string + - name: TimeGenerated + type: datetime + - name: SourceSystem + type: string + - name: StartTime + type: datetime + - name: EndTime + type: datetime + - name: ResourceUri + type: string + - name: LinkedResourceUri + type: string + - name: DataType + type: string + - name: Solution + type: string + - name: BatchesWithinSla + type: long + - name: BatchesOutsideSla + type: long + - name: BatchesCapped + type: long + - name: TotalBatches + type: long + - name: AvgLatencyInSeconds + type: real + - name: Quantity + type: real + - name: QuantityUnit + type: string + - name: IsBillable + type: bool + - name: MeterId + type: string + - name: LinkedMeterId + type: string + - name: Type + type: string + rows: + - - b438b4f6-912a-46d5-9cb1-b44069212abc + - ContosoSQLSrv1 + - '2017-08-24T06:59:59Z' + - OMS + - '2017-08-24T06:00:00Z' + - '2017-08-24T06:59:59Z' + - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it + - null + - Perf + - LogManagement + - '1' + - '0' + - '0' + - '1' + - '1.286' + - '0.076408' + - MBytes + - 'true' + - a4e29a95-5b4c-408b-80e3-113f9410566e + - 00000000-0000-0000-0000-000000000000 + - Usage + - - b438b4f6-912a-46d5-9cb1-b44069212abc + - Store010Web3 + - '2017-08-24T06:59:59Z' + - OMS + - '2017-08-24T06:00:00Z' + - '2017-08-24T06:59:59Z' + - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it + - null + - Perf + - LogManagement + - '1' + - '0' + - '0' + - '1' + - '1.7' + - '0.106767' + - MBytes + - 'true' + - a4e29a95-5b4c-408b-80e3-113f9410566e + - 00000000-0000-0000-0000-000000000000 + - Usage + headers: + x-ms-correlation-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5 + x-ms-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5 + language: !Languages + default: + name: Get + description: Executes an Analytics query for data + summary: Execute an Analytics query + protocol: !Protocols {} + - !Operation + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + parameters: + - *ref_259 + - !Parameter &ref_269 + schema: *ref_1 + implementation: Method + required: true + language: !Languages + default: + name: workspaceId + description: ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + serializedName: workspaceId + protocol: !Protocols + http: !HttpParameter + in: path + - !Parameter &ref_270 + schema: *ref_1 + implementation: Method + language: !Languages + default: + name: prefer + description: Optional. The prefer header to set server timeout, query statistics and visualization information. + serializedName: Prefer + protocol: !Protocols + http: !HttpParameter + in: header + requests: + - !Request + parameters: + - !Parameter + schema: *ref_267 + implementation: Method + origin: modelerfour:synthesized/content-type + required: true + language: !Languages + default: + name: contentType + description: Body Parameter content-type + serializedName: Content-Type + protocol: !Protocols + http: !HttpParameter + in: header + - !Parameter &ref_268 + schema: *ref_22 + implementation: Method + required: true + language: !Languages + default: + name: body + description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) + protocol: !Protocols + http: !HttpParameter + in: body + style: json + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: + - *ref_268 + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpWithBodyRequest + path: /workspaces/{workspaceId}/query + method: post + knownMediaType: json + mediaTypes: + - application/json + uri: '{$host}' + signatureParameters: + - *ref_269 + - *ref_270 + responses: + - !SchemaResponse + schema: *ref_265 + language: !Languages + default: + name: '' + description: OK. The API call succeeded and the Analytics query result is in the response payload + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_266 + language: !Languages + default: + name: '' + description: An error response object. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + cross-workspace: + description: A cross workspace query that the type and count of each row per workspace. + parameters: + body: + query: union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId + workspaces: + - draft-test + - draft-test-2 + workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 + title: Cross Workspace Query + responses: + '200': + body: + tables: + - name: PrimaryResult + columns: + - name: Type + type: string + - name: TenantId + type: string + - name: count_ + type: long + rows: + - - Usage + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '1' + - - Usage + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '1' + - - BillingFact + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '1' + - - BillingFact + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '1' + - - Operation + - 63613592-b6f7-4c3d-a390-22ba13102111 + - '7' + - - Operation + - d436f322-a9f4-4aad-9a7d-271fbf66001c + - '5' + simple-query: + description: A simple query that returns query results. + parameters: + body: + query: Usage | take 10 + timespan: PT12H + workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 + title: Simple Query + responses: + '200': + body: + tables: + - name: PrimaryResult + columns: + - name: TenantId + type: string + - name: Computer + type: string + - name: TimeGenerated + type: datetime + - name: SourceSystem + type: string + - name: StartTime + type: datetime + - name: EndTime + type: datetime + - name: ResourceUri + type: string + - name: LinkedResourceUri + type: string + - name: DataType + type: string + - name: Solution + type: string + - name: BatchesWithinSla + type: long + - name: BatchesOutsideSla + type: long + - name: BatchesCapped + type: long + - name: TotalBatches + type: long + - name: AvgLatencyInSeconds + type: real + - name: Quantity + type: real + - name: QuantityUnit + type: string + - name: IsBillable + type: bool + - name: MeterId + type: string + - name: LinkedMeterId + type: string + - name: Type + type: string + rows: + - - b438b4f6-912a-46d5-9cb1-b44069212abc + - ContosoSQLSrv1 + - '2017-08-24T06:59:59Z' + - OMS + - '2017-08-24T06:00:00Z' + - '2017-08-24T06:59:59Z' + - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it + - null + - Perf + - LogManagement + - '1' + - '0' + - '0' + - '1' + - '1.286' + - '0.076408' + - MBytes + - 'true' + - a4e29a95-5b4c-408b-80e3-113f9410566e + - 00000000-0000-0000-0000-000000000000 + - Usage + - - b438b4f6-912a-46d5-9cb1-b44069212abc + - Store010Web3 + - '2017-08-24T06:59:59Z' + - OMS + - '2017-08-24T06:00:00Z' + - '2017-08-24T06:59:59Z' + - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it + - null + - Perf + - LogManagement + - '1' + - '0' + - '0' + - '1' + - '1.7' + - '0.106767' + - MBytes + - 'true' + - a4e29a95-5b4c-408b-80e3-113f9410566e + - 00000000-0000-0000-0000-000000000000 + - Usage + language: !Languages + default: + name: Execute + description: Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + summary: Execute an Analytics query + protocol: !Protocols {} + - !Operation + apiVersions: + - !ApiVersion + version: 2021-05-19_Preview + parameters: + - *ref_259 + requests: + - !Request + parameters: + - !Parameter + schema: *ref_267 + implementation: Method + origin: modelerfour:synthesized/content-type + required: true + language: !Languages + default: + name: contentType + description: Body Parameter content-type + serializedName: Content-Type + protocol: !Protocols + http: !HttpParameter + in: header + - !Parameter &ref_272 + schema: *ref_271 + implementation: Method + required: true + language: !Languages + default: + name: body + description: The batch request body + protocol: !Protocols + http: !HttpParameter + in: body + style: json + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: + - *ref_272 + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpWithBodyRequest + path: /$batch + method: post + knownMediaType: json + mediaTypes: + - application/json + uri: '{$host}' + signatureParameters: [] + responses: + - !SchemaResponse + schema: *ref_273 + language: !Languages + default: + name: '' + description: OK. The API call succeeded and the Analytics query result is in the response payload + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_266 + language: !Languages + default: + name: '' + description: An error response object. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + metadataPost: + description: A batch query that returns query results. + parameters: + body: + requests: + - path: /query + method: POST + body: + query: AppRequests | take 2 + id: '1' + workspace: d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - path: /query + method: POST + body: + query: AppRequests | take 3 + id: '2' + workspace: d2d0e126-fa1e-4b0a-b647-250cdd471e68 + title: Batch Query + responses: + '200': + body: + responses: + - body: + tables: + - name: PrimaryResult + columns: + - name: TenantId + type: string + - name: TimeGenerated + type: datetime + - name: Id + type: string + - name: Source + type: string + - name: Name + type: string + - name: Url + type: string + - name: Success + type: bool + - name: ResultCode + type: string + - name: DurationMs + type: real + - name: PerformanceBucket + type: string + - name: Properties + type: dynamic + - name: Measurements + type: dynamic + - name: OperationName + type: string + - name: OperationId + type: string + - name: OperationLinks + type: dynamic + - name: ParentId + type: string + - name: SyntheticSource + type: string + - name: SessionId + type: string + - name: UserId + type: string + - name: UserAuthenticatedId + type: string + - name: UserAccountId + type: string + - name: AppVersion + type: string + - name: AppRoleName + type: string + - name: AppRoleInstance + type: string + - name: ClientType + type: string + - name: ClientModel + type: string + - name: ClientOS + type: string + - name: ClientIP + type: string + - name: ClientCity + type: string + - name: ClientStateOrProvince + type: string + - name: ClientCountryOrRegion + type: string + - name: ClientBrowser + type: string + - name: ResourceGUID + type: string + - name: IKey + type: string + - name: SDKVersion + type: string + - name: ItemCount + type: int + - name: ReferencedItemId + type: string + - name: ReferencedType + type: string + - name: SourceSystem + type: string + - name: Type + type: string + - name: _ResourceId + type: string + rows: + - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - '2021-06-02T00:18:13.317Z' + - a3273b160f86b5c4 + - '' + - ServiceBus.process + - '' + - true + - '200' + - 0 + - <250ms + - '{"x-opt-enqueued-time":"1622593091"}' + - null + - ServiceBus.process + - e5d21caf619d4ef564a4b5920cadce47 + - null + - c6864f9d3649f302 + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - srikanta + - PC + - '' + - '' + - 0.0.0.0 + - Edmonds + - Washington + - United States + - '' + - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be + - b4f83947-968d-4e2f-82ad-804be07697ae + - java:3.1.1-BETA.2 + - 1 + - '' + - '' + - Azure + - AppRequests + - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights + - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - '2021-06-02T00:19:13.44Z' + - bebb49e7a1344c07 + - '' + - ServiceBus.process + - '' + - true + - '200' + - 0 + - <250ms + - '{"x-opt-enqueued-time":"1622593091"}' + - null + - ServiceBus.process + - d76c6dec50d2c12267d7d3a246a0c237 + - null + - b68fff4775c77214 + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - srikanta + - PC + - '' + - '' + - 0.0.0.0 + - Edmonds + - Washington + - United States + - '' + - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be + - b4f83947-968d-4e2f-82ad-804be07697ae + - java:3.1.1-BETA.2 + - 1 + - '' + - '' + - Azure + - AppRequests + - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights + id: '1' + status: 200 + - body: + tables: + - name: PrimaryResult + columns: + - name: TenantId + type: string + - name: TimeGenerated + type: datetime + - name: Id + type: string + - name: Source + type: string + - name: Name + type: string + - name: Url + type: string + - name: Success + type: bool + - name: ResultCode + type: string + - name: DurationMs + type: real + - name: PerformanceBucket + type: string + - name: Properties + type: dynamic + - name: Measurements + type: dynamic + - name: OperationName + type: string + - name: OperationId + type: string + - name: OperationLinks + type: dynamic + - name: ParentId + type: string + - name: SyntheticSource + type: string + - name: SessionId + type: string + - name: UserId + type: string + - name: UserAuthenticatedId + type: string + - name: UserAccountId + type: string + - name: AppVersion + type: string + - name: AppRoleName + type: string + - name: AppRoleInstance + type: string + - name: ClientType + type: string + - name: ClientModel + type: string + - name: ClientOS + type: string + - name: ClientIP + type: string + - name: ClientCity + type: string + - name: ClientStateOrProvince + type: string + - name: ClientCountryOrRegion + type: string + - name: ClientBrowser + type: string + - name: ResourceGUID + type: string + - name: IKey + type: string + - name: SDKVersion + type: string + - name: ItemCount + type: int + - name: ReferencedItemId + type: string + - name: ReferencedType + type: string + - name: SourceSystem + type: string + - name: Type + type: string + - name: _ResourceId + type: string + rows: + - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - '2021-06-02T16:31:25.383Z' + - 08bf242cdc68504c + - '' + - ServiceBus.process + - '' + - true + - '200' + - 0 + - <250ms + - '{"x-opt-enqueued-time":"1622651483"}' + - null + - ServiceBus.process + - 65d9eb1ccf85b1b7ed1e2ea6bb72f563 + - null + - 146140ce8493a6ed + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - srikanta + - PC + - '' + - '' + - 0.0.0.0 + - Edmonds + - Washington + - United States + - '' + - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be + - b4f83947-968d-4e2f-82ad-804be07697ae + - java:3.1.1-BETA.2 + - 1 + - '' + - '' + - Azure + - AppRequests + - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights + - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - '2021-06-02T16:32:25.492Z' + - 9f4cd78c10d57b4f + - '' + - ServiceBus.process + - '' + - true + - '200' + - 0 + - <250ms + - '{"x-opt-enqueued-time":"1622651483"}' + - null + - ServiceBus.process + - ae054fe7b7ac3adf8b841ebbe1ecb912 + - null + - 14eab103a1969665 + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - srikanta + - PC + - '' + - '' + - 0.0.0.0 + - Edmonds + - Washington + - United States + - '' + - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be + - b4f83947-968d-4e2f-82ad-804be07697ae + - java:3.1.1-BETA.2 + - 1 + - '' + - '' + - Azure + - AppRequests + - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights + - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 + - '2021-06-02T16:33:25.585Z' + - ea7e09d4baa4e4ce + - '' + - ServiceBus.process + - '' + - true + - '200' + - 0 + - <250ms + - '{"x-opt-enqueued-time":"1622651483"}' + - null + - ServiceBus.process + - ba6162e3ccd803086944750b82600a3a + - null + - b60455183860caaf + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - srikanta + - PC + - '' + - '' + - 0.0.0.0 + - Edmonds + - Washington + - United States + - '' + - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be + - b4f83947-968d-4e2f-82ad-804be07697ae + - java:3.1.1-BETA.2 + - 1 + - '' + - '' + - Azure + - AppRequests + - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights + id: '2' + status: 200 + language: !Languages + default: + name: Batch + description: Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + summary: Execute a batch of Analytics queries + protocol: !Protocols {} + language: !Languages + default: + name: Query + description: '' + protocol: !Protocols {} + - !OperationGroup + $key: MetricDefinitions + operations: + - !Operation + apiVersions: + - !ApiVersion + version: '2018-01-01' + parameters: + - *ref_274 + - !Parameter &ref_278 + schema: *ref_275 + implementation: Method + required: true + extensions: + x-ms-skip-url-encoding: true + language: !Languages + default: + name: resourceUri + description: The identifier of the resource. + serializedName: resourceUri + protocol: !Protocols + http: !HttpParameter + in: path + - !Parameter + schema: *ref_276 + implementation: Method + origin: modelerfour:synthesized/api-version + required: true + language: !Languages + default: + name: apiVersion + description: Api Version + serializedName: api-version + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_279 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: metricnamespace + description: Metric namespace to query metric definitions for. + serializedName: metricnamespace + protocol: !Protocols + http: !HttpParameter + in: query + requests: + - !Request + parameters: + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: [] + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpRequest + path: /{resourceUri}/providers/Microsoft.Insights/metricDefinitions + method: get + uri: '{$host}' + signatureParameters: + - *ref_278 + - *ref_279 + responses: + - !SchemaResponse + schema: *ref_280 + language: !Languages + default: + name: '' + description: Successful request to get the list of metric definitions + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_281 + language: !Languages + default: + name: '' + description: Error response describing why the operation failed. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + Get Application Insights Metric Definitions without filter: + parameters: + api-version: '2018-01-01' + metricnamespace: microsoft.insights/components + resourceUri: subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions + responses: + '200': + body: + value: + - name: + localizedValue: Availability + value: availabilityResults/availabilityPercentage + category: Availability + dimensions: + - localizedValue: Test name + value: availabilityResult/name + - localizedValue: Run location + value: availabilityResult/location + displayDescription: Percentage of successfully completed availability tests + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/availabilityPercentage + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + unit: Percent + - name: + localizedValue: Availability tests + value: availabilityResults/count + category: Availability + dimensions: + - localizedValue: Test name + value: availabilityResult/name + - localizedValue: Run location + value: availabilityResult/location + - localizedValue: Test result + value: availabilityResult/success + displayDescription: Count of availability tests + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Availability test duration + value: availabilityResults/duration + category: Availability + dimensions: + - localizedValue: Test name + value: availabilityResult/name + - localizedValue: Run location + value: availabilityResult/location + - localizedValue: Test result + value: availabilityResult/success + displayDescription: Availability test duration + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/duration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Page load network connect time + value: browserTimings/networkDuration + category: Browser + displayDescription: Time between user request and network connection. Includes DNS lookup and transport connection. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/networkDuration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Client processing time + value: browserTimings/processingDuration + category: Browser + displayDescription: Time between receiving the last byte of a document until the DOM is loaded. Async requests may still be processing. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/processingDuration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Receiving response time + value: browserTimings/receiveDuration + category: Browser + displayDescription: Time between the first and last bytes, or until disconnection. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/receiveDuration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Send request time + value: browserTimings/sendDuration + category: Browser + displayDescription: Time between network connection and receiving the first byte. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/sendDuration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Browser page load time + value: browserTimings/totalDuration + category: Browser + displayDescription: Time from user request until DOM, stylesheets, scripts and images are loaded. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/totalDuration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Dependency calls + value: dependencies/count + category: Server + dimensions: + - localizedValue: Dependency type + value: dependency/type + - localizedValue: Dependency performance + value: dependency/performanceBucket + - localizedValue: Successful call + value: dependency/success + - localizedValue: Target of a dependency call + value: dependency/target + - localizedValue: Result code + value: dependency/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of calls made by the application to external resources. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Dependency duration + value: dependencies/duration + category: Server + dimensions: + - localizedValue: Dependency type + value: dependency/type + - localizedValue: Dependency performance + value: dependency/performanceBucket + - localizedValue: Successful call + value: dependency/success + - localizedValue: Target of a dependency call + value: dependency/target + - localizedValue: Result code + value: dependency/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Duration of calls made by the application to external resources. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/duration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Dependency call failures + value: dependencies/failed + category: Failures + dimensions: + - localizedValue: Dependency type + value: dependency/type + - localizedValue: Dependency performance + value: dependency/performanceBucket + - localizedValue: Target of a dependency call + value: dependency/target + - localizedValue: Result code + value: dependency/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of failed dependency calls made by the application to external resources. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/failed + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Page views + value: pageViews/count + category: Usage + dimensions: + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of page views. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/pageViews/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Page view load time + value: pageViews/duration + category: Usage + dimensions: + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Page view load time + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/pageViews/duration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: HTTP request execution time + value: performanceCounters/requestExecutionTime + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Execution time of the most recent request. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestExecutionTime + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: HTTP requests in application queue + value: performanceCounters/requestsInQueue + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Length of the application request queue. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestsInQueue + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: Count + - name: + localizedValue: HTTP request rate + value: performanceCounters/requestsPerSecond + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Rate of all requests to the application per second from ASP.NET. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestsPerSecond + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: CountPerSecond + - name: + localizedValue: Exception rate + value: performanceCounters/exceptionsPerSecond + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Count of handled and unhandled exceptions reported to windows, including .NET exceptions and unmanaged exceptions that are converted into .NET exceptions. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/exceptionsPerSecond + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: CountPerSecond + - name: + localizedValue: Process IO rate + value: performanceCounters/processIOBytesPerSecond + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Total bytes per second read and written to files, network and devices. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processIOBytesPerSecond + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: BytesPerSecond + - name: + localizedValue: Process CPU + value: performanceCounters/processCpuPercentage + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: The percentage of elapsed time that all process threads used the processor to execute instructions. This can vary between 0 to 100. This metric indicates the performance of w3wp process alone. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processCpuPercentage + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: Percent + - name: + localizedValue: Processor time + value: performanceCounters/processorCpuPercentage + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: The percentage of time that the processor spends in non-idle threads. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processorCpuPercentage + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: Percent + - name: + localizedValue: Available memory + value: performanceCounters/memoryAvailableBytes + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Physical memory immediately available for allocation to a process or for system use. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/memoryAvailableBytes + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: Bytes + - name: + localizedValue: Process private bytes + value: performanceCounters/processPrivateBytes + category: Performance counters + dimensions: + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Memory exclusively assigned to the monitored application's processes. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processPrivateBytes + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: Bytes + - name: + localizedValue: Server response time + value: requests/duration + category: Server + dimensions: + - localizedValue: Request performance + value: request/performanceBucket + - localizedValue: Result code + value: request/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Successful request + value: request/success + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Time between receiving an HTTP request and finishing sending the response. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/duration + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + - Maximum + - Minimum + unit: MilliSeconds + - name: + localizedValue: Server requests + value: requests/count + category: Server + dimensions: + - localizedValue: Request performance + value: request/performanceBucket + - localizedValue: Result code + value: request/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Successful request + value: request/success + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of HTTP requests completed. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Failed requests + value: requests/failed + category: Failures + dimensions: + - localizedValue: Request performance + value: request/performanceBucket + - localizedValue: Result code + value: request/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of HTTP requests marked as failed. In most cases these are requests with a response code >= 400 and not equal to 401. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/failed + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Server request rate + value: requests/rate + category: Server + dimensions: + - localizedValue: Request performance + value: request/performanceBucket + - localizedValue: Result code + value: request/resultCode + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Successful request + value: request/success + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Rate of server requests per second + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/rate + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Average + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Average + unit: CountPerSecond + - name: + localizedValue: Exceptions + value: exceptions/count + category: Failures + dimensions: + - localizedValue: Cloud role name + value: cloud/roleName + - localizedValue: Cloud role instance + value: cloud/roleInstance + - localizedValue: Device type + value: client/type + displayDescription: Combined count of all uncaught exceptions. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Browser exceptions + value: exceptions/browser + category: Failures + dimensions: + - localizedValue: Cloud role name + value: cloud/roleName + displayDescription: Count of uncaught exceptions thrown in the browser. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/browser + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Server exceptions + value: exceptions/server + category: Failures + dimensions: + - localizedValue: Cloud role name + value: cloud/roleName + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Count of uncaught exceptions thrown in the server application. + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/server + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + - name: + localizedValue: Traces + value: traces/count + category: Usage + dimensions: + - localizedValue: Severity level + value: trace/severityLevel + - localizedValue: Is traffic synthetic + value: operation/synthetic + - localizedValue: Cloud role name + value: cloud/roleName + - localizedValue: Cloud role instance + value: cloud/roleInstance + displayDescription: Trace document count + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/traces/count + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: microsoft.insights/components + primaryAggregationType: Count + resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + supportedAggregationTypes: + - Count + unit: Count + Get Metric Definitions without filter: + parameters: + api-version: '2018-01-01' + metricnamespace: Microsoft.Web/sites + resourceUri: subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions + responses: + default: + body: + code: BadRequest + message: 'ApiVersion: 2018-01-01 does not support query metricdefinitions at non Arm resource Id level' + '200': + body: + value: + - name: + localizedValue: CPU Time + value: CpuTime + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/CpuTime + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Seconds + - name: + localizedValue: Requests + value: Requests + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Requests + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Data In + value: BytesReceived + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesReceived + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Bytes + - name: + localizedValue: Data Out + value: BytesSent + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesSent + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Bytes + - name: + localizedValue: Http 101 + value: Http101 + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http101 + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 2xx + value: Http2xx + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http2xx + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 3xx + value: Http3xx + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http3xx + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 401 + value: Http401 + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http401 + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 403 + value: Http403 + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http403 + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 404 + value: Http404 + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http404 + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 406 + value: Http406 + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http406 + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http 4xx + value: Http4xx + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http4xx + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Http Server Errors + value: Http5xx + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http5xx + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Total + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Count + - name: + localizedValue: Memory working set + value: MemoryWorkingSet + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/MemoryWorkingSet + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Average + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Bytes + - name: + localizedValue: Average memory working set + value: AverageMemoryWorkingSet + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageMemoryWorkingSet + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Average + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Bytes + - name: + localizedValue: Average Response Time + value: AverageResponseTime + dimensions: + - localizedValue: Instance + value: Instance + id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageResponseTime + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + namespace: Microsoft.Web/sites + primaryAggregationType: Average + resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest + supportedAggregationTypes: + - None + - Average + - Minimum + - Maximum + - Total + - Count + unit: Seconds + Get StorageCache Metric Definitions with metric class: + parameters: + api-version: '2018-01-01' + metricnamespace: microsoft.storagecache/caches + resourceUri: subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + responses: + '200': + body: + value: + - name: + localizedValue: Total Client IOPS + value: ClientIOPS + displayDescription: The rate of client file operations processed by the Cache. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: Count + - name: + localizedValue: Average Client Latency + value: ClientLatency + displayDescription: Average latency of client file operations to the Cache. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLatency + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Latency + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: MilliSeconds + - name: + localizedValue: Client Read IOPS + value: ClientReadIOPS + displayDescription: Client read operations per second. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: Average Cache Read Throughput + value: ClientReadThroughput + displayDescription: Client read data transfer rate. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: Client Write IOPS + value: ClientWriteIOPS + displayDescription: Client write operations per second. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: Average Cache Write Throughput + value: ClientWriteThroughput + displayDescription: Client write data transfer rate. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: Client Metadata Read IOPS + value: ClientMetadataReadIOPS + displayDescription: The rate of client file operations sent to the Cache, excluding data reads, that do not modify persistent state. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataReadIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: Client Metadata Write IOPS + value: ClientMetadataWriteIOPS + displayDescription: The rate of client file operations sent to the Cache, excluding data writes, that modify persistent state. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataWriteIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: Client Lock IOPS + value: ClientLockIOPS + displayDescription: Client file locking operations per second. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLockIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: Storage Target Health + value: StorageTargetHealth + displayDescription: Boolean results of connectivity test between the Cache and Storage Targets. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetHealth + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Errors + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: Count + - name: + localizedValue: Uptime + value: Uptime + displayDescription: Boolean results of connectivity test between the Cache and monitoring system. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/Uptime + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Availability + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: Count + - name: + localizedValue: Total StorageTarget IOPS + value: StorageTargetIOPS + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate of all file operations the Cache sends to a particular StorageTarget. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: Count + - name: + localizedValue: StorageTarget Write IOPS + value: StorageTargetWriteIOPS + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate of the file write operations the Cache sends to a particular StorageTarget. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetWriteIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: Count + - name: + localizedValue: StorageTarget Asynchronous Write Throughput + value: StorageTargetAsyncWriteThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate the Cache asynchronously writes data to a particular StorageTarget. These are opportunistic writes that do not cause clients to block. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetAsyncWriteThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: StorageTarget Synchronous Write Throughput + value: StorageTargetSyncWriteThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate the Cache synchronously writes data to a particular StorageTarget. These are writes that do cause clients to block. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetSyncWriteThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: StorageTarget Total Write Throughput + value: StorageTargetTotalWriteThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The total rate that the Cache writes data to a particular StorageTarget. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalWriteThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: StorageTarget Latency + value: StorageTargetLatency + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The average round trip latency of all the file operations the Cache sends to a partricular StorageTarget. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetLatency + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: MilliSeconds + - name: + localizedValue: StorageTarget Metadata Read IOPS + value: StorageTargetMetadataReadIOPS + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate of file operations that do not modify persistent state, and excluding the read operation, that the Cache sends to a particular StorageTarget. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataReadIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: StorageTarget Metadata Write IOPS + value: StorageTargetMetadataWriteIOPS + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate of file operations that do modify persistent state and excluding the write operation, that the Cache sends to a particular StorageTarget. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataWriteIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: StorageTarget Read IOPS + value: StorageTargetReadIOPS + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate of file read operations the Cache sends to a particular StorageTarget. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadIOPS + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: CountPerSecond + - name: + localizedValue: StorageTarget Read Ahead Throughput + value: StorageTargetReadAheadThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate the Cache opportunisticly reads data from the StorageTarget. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadAheadThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: StorageTarget Fill Throughput + value: StorageTargetFillThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The rate the Cache reads data from the StorageTarget to handle a cache miss. + id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetFillThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + - name: + localizedValue: StorageTarget Total Read Throughput + value: StorageTargetTotalReadThroughput + dimensions: + - localizedValue: StorageTarget + value: StorageTarget + displayDescription: The total rate that the Cache reads data from a particular StorageTarget. + id: >- + /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalReadThroughput + isDimensionRequired: false + metricAvailabilities: + - retention: P93D + timeGrain: PT1M + - retention: P93D + timeGrain: PT5M + - retention: P93D + timeGrain: PT15M + - retention: P93D + timeGrain: PT30M + - retention: P93D + timeGrain: PT1H + - retention: P93D + timeGrain: PT6H + - retention: P93D + timeGrain: PT12H + - retention: P93D + timeGrain: P1D + metricClass: Transactions + namespace: microsoft.storagecache/caches + primaryAggregationType: Average + resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache + supportedAggregationTypes: + - Minimum + - Maximum + - Average + unit: BytesPerSecond + x-ms-pageable: + nextLinkName: null + language: !Languages + default: + name: List + description: Lists the metric definitions for the resource. + paging: + nextLinkName: null + protocol: !Protocols {} + language: !Languages + default: + name: MetricDefinitions + description: '' + protocol: !Protocols {} + - !OperationGroup + $key: Metrics + operations: + - !Operation + apiVersions: + - !ApiVersion + version: '2018-01-01' + parameters: + - *ref_274 + - !Parameter &ref_285 + schema: *ref_275 + implementation: Method + required: true + extensions: + x-ms-skip-url-encoding: true + language: !Languages + default: + name: resourceUri + description: The identifier of the resource. + serializedName: resourceUri + protocol: !Protocols + http: !HttpParameter + in: path + - !Parameter &ref_286 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: timespan + description: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. + serializedName: timespan + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_287 + schema: *ref_282 + implementation: Method + language: !Languages + default: + name: interval + description: The interval (i.e. timegrain) of the query. + serializedName: interval + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_288 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: metricnames + description: 'The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: ''Metric,Name1'' should be **''Metric%2Name1''**' + serializedName: metricnames + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_289 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: aggregation + description: The list of aggregation types (comma separated) to retrieve. + serializedName: aggregation + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_290 + schema: *ref_283 + implementation: Method + language: !Languages + default: + name: top + description: |- + The maximum number of records to retrieve. + Valid only if $filter is specified. + Defaults to 10. + serializedName: top + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_291 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: orderby + description: |- + The aggregation to use for sorting results and the direction of the sort. + Only one order can be specified. + Examples: sum asc. + serializedName: orderby + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_292 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: filter + description: >- + The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' + and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A + = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses + round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is + **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "** + serializedName: $filter + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_293 + schema: *ref_284 + implementation: Method + language: !Languages + default: + name: resultType + description: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. + serializedName: resultType + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter + schema: *ref_276 + implementation: Method + origin: modelerfour:synthesized/api-version + required: true + language: !Languages + default: + name: apiVersion + description: Api Version + serializedName: api-version + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_294 + schema: *ref_277 + implementation: Method + language: !Languages + default: + name: metricnamespace + description: Metric namespace to query metric definitions for. + serializedName: metricnamespace + protocol: !Protocols + http: !HttpParameter + in: query + requests: + - !Request + parameters: + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: [] + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpRequest + path: /{resourceUri}/providers/Microsoft.Insights/metrics + method: get + uri: '{$host}' + signatureParameters: + - *ref_285 + - *ref_286 + - *ref_287 + - *ref_288 + - *ref_289 + - *ref_290 + - *ref_291 + - *ref_292 + - *ref_293 + - *ref_294 + responses: + - !SchemaResponse + schema: *ref_295 + language: !Languages + default: + name: '' + description: Successful request to get the list of metric values. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_281 + language: !Languages + default: + name: '' + description: Error response describing why the operation failed. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + Get Metric for data: + parameters: + $filter: BlobType eq '*' + aggregation: Average,count + api-version: '2018-01-01' + interval: PT1M + metric: BlobCapacity + metricnamespace: Microsoft.Storage/storageAccounts/blobServices + orderby: Average asc + resourceUri: subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default + timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z + top: 3 + responses: + '200': + body: + cost: 0 + interval: PT1M + namespace: Microsoft.Storage/storageAccounts/blobServices + resourceregion: eastus2 + timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z + value: + - name: + localizedValue: Blob Capacity + value: BlobCapacity + type: Microsoft.Insights/metrics + displayDescription: The amount of storage used by the storage account’s Blob service in bytes. + id: /subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity + timeseries: + - data: + - count: 0 + timeStamp: '2017-04-14T02:20:00Z' + - count: 0 + timeStamp: '2017-04-14T02:21:00Z' + - count: 0 + timeStamp: '2017-04-14T02:22:00Z' + - average: 0 + count: 1 + timeStamp: '2017-04-14T02:23:00Z' + metadatavalues: + - name: + localizedValue: blobtype + value: blobtype + value: PageBlob + - data: + - count: 0 + timeStamp: '2017-04-14T02:20:00Z' + - count: 0 + timeStamp: '2017-04-14T02:21:00Z' + - count: 0 + timeStamp: '2017-04-14T02:22:00Z' + - average: 245 + count: 1 + timeStamp: '2017-04-14T02:23:00Z' + metadatavalues: + - name: + localizedValue: blobtype + value: blobtype + value: BlockBlob + unit: Bytes + Get Metric for metadata: + parameters: + $filter: BlobType eq '*' + aggregation: Average,count + api-version: '2018-01-01' + interval: PT1M + metric: BlobCapacity + metricnamespace: Microsoft.Storage/storageAccounts/blobServices + orderby: Average asc + resourceUri: subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default + resulttype: metadata + timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z + top: 3 + responses: + '200': + body: + namespace: Microsoft.Storage/storageAccounts/blobServices + resourceregion: eastus2 + timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z + value: + - name: + localizedValue: Blob Capacity + value: BlobCapacity + type: Microsoft.Insights/metrics + displayDescription: The amount of storage used by the storage account’s Blob service in bytes. + id: /subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity + timeseries: + - metadatavalues: + - name: + localizedValue: blobtype + value: blobtype + value: BlockBlob + - metadatavalues: + - name: + localizedValue: blobtype + value: blobtype + value: PageBlob + unit: Bytes + Get Metric with error: + parameters: + aggregation: average + api-version: '2018-01-01' + interval: FULL + metricnames: MongoRequestsCount,MongoRequests + metricnamespace: microsoft.documentdb/databaseaccounts + resourceUri: subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo + timespan: 2021-06-07T21:51:00Z/2021-06-08T01:51:00Z + responses: + '200': + body: + cost: 239 + interval: PT4H + namespace: microsoft.documentdb/databaseaccounts + resourceregion: westus2 + timespan: 2021-06-07T21:51:00Z/2021-06-08T01:51:00Z + value: + - name: + localizedValue: (deprecated) Mongo Request Rate + value: MongoRequestsCount + type: Microsoft.Insights/metrics + errorCode: InvalidSamplingType + errorMessage: Sampling type is not found. Metric:CosmosDBCustomer,AzureMonitor,MongoRequests, SamplingType:NullableAverage. + id: /subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequestsCount + timeseries: [] + unit: CountPerSecond + - name: + localizedValue: Mongo Requests + value: MongoRequests + type: Microsoft.Insights/metrics + displayDescription: Number of Mongo Requests Made + errorCode: Success + id: /subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequests + timeseries: + - data: + - average: 0 + timeStamp: '2021-06-07T21:51:00Z' + metadatavalues: [] + unit: Count + x-ms-odata: '#/components/schemas/MetadataValue' + language: !Languages + default: + name: List + description: '**Lists the metric values for a resource**.' + protocol: !Protocols {} + language: !Languages + default: + name: Metrics + description: '' + protocol: !Protocols {} + - !OperationGroup + $key: MetricNamespaces + operations: + - !Operation + apiVersions: + - !ApiVersion + version: 2017-12-01-preview + parameters: + - *ref_274 + - !Parameter &ref_298 + schema: *ref_275 + implementation: Method + required: true + extensions: + x-ms-skip-url-encoding: true + language: !Languages + default: + name: resourceUri + description: The identifier of the resource. + serializedName: resourceUri + protocol: !Protocols + http: !HttpParameter + in: path + - !Parameter + schema: *ref_296 + implementation: Method + origin: modelerfour:synthesized/api-version + required: true + language: !Languages + default: + name: apiVersion + description: Api Version + serializedName: api-version + protocol: !Protocols + http: !HttpParameter + in: query + - !Parameter &ref_299 + schema: *ref_297 + implementation: Method + language: !Languages + default: + name: startTime + description: The ISO 8601 conform Date start time from which to query for metric namespaces. + serializedName: startTime + protocol: !Protocols + http: !HttpParameter + in: query + requests: + - !Request + parameters: + - !Parameter + schema: *ref_261 + implementation: Method + origin: modelerfour:synthesized/accept + required: true + language: !Languages + default: + name: accept + description: Accept header + serializedName: Accept + protocol: !Protocols + http: !HttpParameter + in: header + signatureParameters: [] + language: !Languages + default: + name: '' + description: '' + protocol: !Protocols + http: !HttpRequest + path: /{resourceUri}/providers/microsoft.insights/metricNamespaces + method: get + uri: '{$host}' + signatureParameters: + - *ref_298 + - *ref_299 + responses: + - !SchemaResponse + schema: *ref_300 + language: !Languages + default: + name: '' + description: Successful request to get the list of metric namespaces + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - !SchemaResponse + schema: *ref_281 + language: !Languages + default: + name: '' + description: Error response describing why the operation failed. + protocol: !Protocols + http: !HttpResponse + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-examples: + Get Metric Namespaces without filter: + parameters: + api-version: 2017-12-01-preview + resourceUri: subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill + startTime: '2020-08-31T15:53:00Z' + responses: + '200': + body: + value: + - name: Azure.ApplicationInsights + type: Microsoft.Insights/metricNamespaces + classification: Custom + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/Azure.ApplicationInsights + properties: + metricNamespaceName: Azure.ApplicationInsights + - name: microsoft.insights-components + type: Microsoft.Insights/metricNamespaces + classification: Platform + id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/microsoft.insights-components + properties: + metricNamespaceName: microsoft.insights/components + x-ms-pageable: + nextLinkName: null + language: !Languages + default: + name: List + description: Lists the metric namespaces for the resource. + paging: + nextLinkName: null + protocol: !Protocols {} + language: !Languages + default: + name: MetricNamespaces + description: '' + protocol: !Protocols {} +security: !Security + authenticationRequired: false + schemes: [] +language: !Languages + default: + name: Query + description: '' +protocol: !Protocols + http: !HttpModel {} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json b/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json new file mode 100644 index 0000000000000..c18da4587c3ae --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json @@ -0,0 +1,9 @@ +{ + "OutputFolder": ".", + "Namespace": "Azure.Monitor.Query", + "LibraryName": null, + "SharedSourceFolders": [ + "..\\..\\..\\..\\core\\Azure.Core\\src\\Shared\\", + "..\\..\\..\\..\\..\\..\\..\\Users\\nibhati\\.nuget\\packages\\microsoft.azure.autorest.csharp\\3.0.0-beta.20210822.2\\content\\Generator.Shared\\" + ] +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs deleted file mode 100644 index cbdc1b1afde82..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Monitor.Query.Models; - -namespace Azure.Monitor.Query -{ - internal partial class MetricDefinitionsRestClient - { - private Uri endpoint; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of MetricDefinitionsRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// server parameter. - public MetricDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) - { - this.endpoint = endpoint ?? new Uri("https://management.azure.com"); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceUri, string metricnamespace) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.Insights/metricDefinitions", false); - uri.AppendQuery("api-version", "2018-01-01", true); - if (metricnamespace != null) - { - uri.AppendQuery("metricnamespace", metricnamespace, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists the metric definitions for the resource. - /// The identifier of the resource. - /// Metric namespace to query metric definitions for. - /// The cancellation token to use. - /// is null. - public async Task> ListAsync(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, metricnamespace); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MetricDefinitionCollection value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MetricDefinitionCollection.DeserializeMetricDefinitionCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists the metric definitions for the resource. - /// The identifier of the resource. - /// Metric namespace to query metric definitions for. - /// The cancellation token to use. - /// is null. - public Response List(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, metricnamespace); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MetricDefinitionCollection value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MetricDefinitionCollection.DeserializeMetricDefinitionCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs deleted file mode 100644 index f4a56530a16ed..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Monitor.Query.Models; - -namespace Azure.Monitor.Query -{ - internal partial class MetricNamespacesRestClient - { - private Uri endpoint; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of MetricNamespacesRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// server parameter. - public MetricNamespacesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) - { - this.endpoint = endpoint ?? new Uri("https://management.azure.com"); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceUri, string startTime) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/microsoft.insights/metricNamespaces", false); - uri.AppendQuery("api-version", "2017-12-01-preview", true); - if (startTime != null) - { - uri.AppendQuery("startTime", startTime, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Lists the metric namespaces for the resource. - /// The identifier of the resource. - /// The ISO 8601 conform Date start time from which to query for metric namespaces. - /// The cancellation token to use. - /// is null. - public async Task> ListAsync(string resourceUri, string startTime = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, startTime); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MetricNamespaceCollection value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MetricNamespaceCollection.DeserializeMetricNamespaceCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Lists the metric namespaces for the resource. - /// The identifier of the resource. - /// The ISO 8601 conform Date start time from which to query for metric namespaces. - /// The cancellation token to use. - /// is null. - public Response List(string resourceUri, string startTime = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, startTime); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MetricNamespaceCollection value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MetricNamespaceCollection.DeserializeMetricNamespaceCollection(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs deleted file mode 100644 index 83b4e94be0bb3..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Monitor.Query.Models; - -namespace Azure.Monitor.Query -{ - internal partial class MetricsRestClient - { - private Uri endpoint; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of MetricsRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// server parameter. - public MetricsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) - { - this.endpoint = endpoint ?? new Uri("https://management.azure.com"); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateListRequest(string resourceUri, string timespan, TimeSpan? interval, string metricnames, string aggregation, int? top, string orderby, string filter, ResultType? resultType, string metricnamespace) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/", false); - uri.AppendPath(resourceUri, false); - uri.AppendPath("/providers/Microsoft.Insights/metrics", false); - if (timespan != null) - { - uri.AppendQuery("timespan", timespan, true); - } - if (interval != null) - { - uri.AppendQuery("interval", interval.Value, "P", true); - } - if (metricnames != null) - { - uri.AppendQuery("metricnames", metricnames, true); - } - if (aggregation != null) - { - uri.AppendQuery("aggregation", aggregation, true); - } - if (top != null) - { - uri.AppendQuery("top", top.Value, true); - } - if (orderby != null) - { - uri.AppendQuery("orderby", orderby, true); - } - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (resultType != null) - { - uri.AppendQuery("resultType", resultType.Value.ToSerialString(), true); - } - uri.AppendQuery("api-version", "2018-01-01", true); - if (metricnamespace != null) - { - uri.AppendQuery("metricnamespace", metricnamespace, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// **Lists the metric values for a resource**. - /// The identifier of the resource. - /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. - /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. - /// The list of aggregation types (comma separated) to retrieve. - /// - /// The maximum number of records to retrieve. - /// Valid only if $filter is specified. - /// Defaults to 10. - /// - /// - /// The aggregation to use for sorting results and the direction of the sort. - /// Only one order can be specified. - /// Examples: sum asc. - /// - /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. - /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// Metric namespace to query metric definitions for. - /// The cancellation token to use. - /// is null. - public async Task> ListAsync(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, timespan, interval, metricnames, aggregation, top, orderby, filter, resultType, metricnamespace); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MetricsQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MetricsQueryResult.DeserializeMetricsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// **Lists the metric values for a resource**. - /// The identifier of the resource. - /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. - /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. - /// The list of aggregation types (comma separated) to retrieve. - /// - /// The maximum number of records to retrieve. - /// Valid only if $filter is specified. - /// Defaults to 10. - /// - /// - /// The aggregation to use for sorting results and the direction of the sort. - /// Only one order can be specified. - /// Examples: sum asc. - /// - /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. - /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// Metric namespace to query metric definitions for. - /// The cancellation token to use. - /// is null. - public Response List(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) - { - if (resourceUri == null) - { - throw new ArgumentNullException(nameof(resourceUri)); - } - - using var message = CreateListRequest(resourceUri, timespan, interval, metricnames, aggregation, top, orderby, filter, resultType, metricnamespace); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MetricsQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MetricsQueryResult.DeserializeMetricsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs deleted file mode 100644 index 4363e13230212..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class BatchQueryRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("id"); - writer.WriteStringValue(Id); - if (Optional.IsCollectionDefined(Headers)) - { - writer.WritePropertyName("headers"); - writer.WriteStartObject(); - foreach (var item in Headers) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("body"); - writer.WriteObjectValue(Body); - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"); - writer.WriteStringValue(Path); - } - if (Optional.IsDefined(Method)) - { - writer.WritePropertyName("method"); - writer.WriteStringValue(Method); - } - writer.WritePropertyName("workspace"); - writer.WriteStringValue(Workspace); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs deleted file mode 100644 index 45340f67a2905..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// An single request in a batch. - internal partial class BatchQueryRequest - { - /// Initializes a new instance of BatchQueryRequest. - /// The error details. - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - /// Workspace Id to be included in the query. - /// , , or is null. - public BatchQueryRequest(string id, QueryBody body, string workspace) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - if (workspace == null) - { - throw new ArgumentNullException(nameof(workspace)); - } - - Id = id; - Headers = new ChangeTrackingDictionary(); - Body = body; - Path = "/query"; - Method = "POST"; - Workspace = workspace; - } - - /// The error details. - public string Id { get; } - /// Dictionary of <string>. - public IDictionary Headers { get; } - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - public QueryBody Body { get; } - public string Path { get; set; } - public string Method { get; set; } - /// Workspace Id to be included in the query. - public string Workspace { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs deleted file mode 100644 index ef45e5e7ede4f..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class BatchQueryResponse - { - internal static BatchQueryResponse DeserializeBatchQueryResponse(JsonElement element) - { - Optional id = default; - Optional status = default; - Optional body = default; - Optional> headers = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("body")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - body = LogsBatchQueryResult.DeserializeLogsBatchQueryResult(property.Value); - continue; - } - if (property.NameEquals("headers")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - headers = dictionary; - continue; - } - } - return new BatchQueryResponse(id.Value, Optional.ToNullable(status), body.Value, Optional.ToDictionary(headers)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs deleted file mode 100644 index 9ff6eda662dee..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The BatchQueryResponse. - internal partial class BatchQueryResponse - { - /// Initializes a new instance of BatchQueryResponse. - internal BatchQueryResponse() - { - Headers = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of BatchQueryResponse. - /// - /// - /// Contains the tables, columns & rows resulting from a query. - /// Dictionary of <string>. - internal BatchQueryResponse(string id, int? status, LogsBatchQueryResult body, IReadOnlyDictionary headers) - { - Id = id; - Status = status; - _body = body; - Headers = headers; - } - - public string Id { get; } - public int? Status { get; } - /// Dictionary of <string>. - public IReadOnlyDictionary Headers { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs deleted file mode 100644 index e11fe601f8284..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class BatchRequest : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("requests"); - writer.WriteStartArray(); - foreach (var item in Requests) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs deleted file mode 100644 index 7447577d726a1..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Monitor.Query.Models -{ - /// An array of requests. - internal partial class BatchRequest - { - /// Initializes a new instance of BatchRequest. - /// An single request in a batch. - /// is null. - public BatchRequest(IEnumerable requests) - { - if (requests == null) - { - throw new ArgumentNullException(nameof(requests)); - } - - Requests = requests.ToList(); - } - - /// An single request in a batch. - public IList Requests { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs deleted file mode 100644 index 5b49881dce4e3..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class ErrorDetail - { - internal static ErrorDetail DeserializeErrorDetail(JsonElement element) - { - string code = default; - string message = default; - Optional target = default; - Optional value = default; - Optional> resources = default; - Optional additionalProperties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code")) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("resources")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - resources = array; - continue; - } - if (property.NameEquals("additionalProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - additionalProperties = property.Value.GetObject(); - continue; - } - } - return new ErrorDetail(code, message, target.Value, value.Value, Optional.ToList(resources), additionalProperties.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs deleted file mode 100644 index ab9f28a733fe7..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Error details. - internal partial class ErrorDetail - { - /// Initializes a new instance of ErrorDetail. - /// The error's code. - /// A human readable error message. - /// or is null. - internal ErrorDetail(string code, string message) - { - if (code == null) - { - throw new ArgumentNullException(nameof(code)); - } - if (message == null) - { - throw new ArgumentNullException(nameof(message)); - } - - Code = code; - Message = message; - Resources = new ChangeTrackingList(); - } - - /// Initializes a new instance of ErrorDetail. - /// The error's code. - /// A human readable error message. - /// Indicates which property in the request is responsible for the error. - /// Indicates which value in 'target' is responsible for the error. - /// Indicates resources which were responsible for the error. - /// Additional properties that can be provided on the error details object. - internal ErrorDetail(string code, string message, string target, string value, IReadOnlyList resources, object additionalProperties) - { - Code = code; - Message = message; - Target = target; - Value = value; - Resources = resources; - AdditionalProperties = additionalProperties; - } - - /// The error's code. - public string Code { get; } - /// A human readable error message. - public string Message { get; } - /// Indicates which property in the request is responsible for the error. - public string Target { get; } - /// Indicates which value in 'target' is responsible for the error. - public string Value { get; } - /// Indicates resources which were responsible for the error. - public IReadOnlyList Resources { get; } - /// Additional properties that can be provided on the error details object. - public object AdditionalProperties { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs deleted file mode 100644 index 070fac110bbde..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class ErrorInfo - { - internal static ErrorInfo DeserializeErrorInfo(JsonElement element) - { - string code = default; - string message = default; - Optional> details = default; - Optional innererror = default; - Optional additionalProperties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code")) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("details")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorDetail.DeserializeErrorDetail(item)); - } - details = array; - continue; - } - if (property.NameEquals("innererror")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - innererror = DeserializeErrorInfo(property.Value); - continue; - } - if (property.NameEquals("additionalProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - additionalProperties = property.Value.GetObject(); - continue; - } - } - return new ErrorInfo(code, message, Optional.ToList(details), innererror.Value, additionalProperties.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs deleted file mode 100644 index dc5e2ec4632b8..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The code and message for an error. - internal partial class ErrorInfo - { - /// Initializes a new instance of ErrorInfo. - /// A machine readable error code. - /// A human readable error message. - /// or is null. - internal ErrorInfo(string code, string message) - { - if (code == null) - { - throw new ArgumentNullException(nameof(code)); - } - if (message == null) - { - throw new ArgumentNullException(nameof(message)); - } - - Code = code; - Message = message; - Details = new ChangeTrackingList(); - } - - /// Initializes a new instance of ErrorInfo. - /// A machine readable error code. - /// A human readable error message. - /// error details. - /// Inner error details if they exist. - /// Additional properties that can be provided on the error info object. - internal ErrorInfo(string code, string message, IReadOnlyList details, ErrorInfo innererror, object additionalProperties) - { - Code = code; - Message = message; - Details = details; - Innererror = innererror; - AdditionalProperties = additionalProperties; - } - - /// A machine readable error code. - public string Code { get; } - /// A human readable error message. - public string Message { get; } - /// error details. - public IReadOnlyList Details { get; } - /// Inner error details if they exist. - public ErrorInfo Innererror { get; } - /// Additional properties that can be provided on the error info object. - public object AdditionalProperties { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs deleted file mode 100644 index 947fb6477edb7..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class ErrorResponse - { - internal static ErrorResponse DeserializeErrorResponse(JsonElement element) - { - ErrorInfo error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error")) - { - error = ErrorInfo.DeserializeErrorInfo(property.Value); - continue; - } - } - return new ErrorResponse(error); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs deleted file mode 100644 index c00d434bb6024..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Contains details when the response code indicates an error. - internal partial class ErrorResponse - { - /// Initializes a new instance of ErrorResponse. - /// The error details. - /// is null. - internal ErrorResponse(ErrorInfo error) - { - if (error == null) - { - throw new ArgumentNullException(nameof(error)); - } - - Error = error; - } - - /// The error details. - public ErrorInfo Error { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs deleted file mode 100644 index 97c4668e0d387..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class ErrorResponseAutoGenerated - { - internal static ErrorResponseAutoGenerated DeserializeErrorResponseAutoGenerated(JsonElement element) - { - Optional code = default; - Optional message = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code")) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - } - return new ErrorResponseAutoGenerated(code.Value, message.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs deleted file mode 100644 index 05a0e41019994..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Monitor.Query.Models -{ - /// Describes the format of Error response. - internal partial class ErrorResponseAutoGenerated - { - /// Initializes a new instance of ErrorResponseAutoGenerated. - internal ErrorResponseAutoGenerated() - { - } - - /// Initializes a new instance of ErrorResponseAutoGenerated. - /// Error code. - /// Error message indicating why the operation failed. - internal ErrorResponseAutoGenerated(string code, string message) - { - Code = code; - Message = message; - } - - /// Error code. - public string Code { get; } - /// Error message indicating why the operation failed. - public string Message { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs deleted file mode 100644 index ecaf526f2a57b..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class LocalizableString - { - internal static LocalizableString DeserializeLocalizableString(JsonElement element) - { - string value = default; - Optional localizedValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("localizedValue")) - { - localizedValue = property.Value.GetString(); - continue; - } - } - return new LocalizableString(value, localizedValue.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs deleted file mode 100644 index 53df968e429ec..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// The localizable string class. - internal partial class LocalizableString - { - /// Initializes a new instance of LocalizableString. - /// the invariant value. - /// is null. - internal LocalizableString(string value) - { - if (value == null) - { - throw new ArgumentNullException(nameof(value)); - } - - Value = value; - } - - /// Initializes a new instance of LocalizableString. - /// the invariant value. - /// the locale specific value. - internal LocalizableString(string value, string localizedValue) - { - Value = value; - LocalizedValue = localizedValue; - } - - /// the invariant value. - public string Value { get; } - /// the locale specific value. - public string LocalizedValue { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs deleted file mode 100644 index 74dbab41c0844..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class LogsBatchQueryResult - { - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs deleted file mode 100644 index 8a199528e1ff7..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Monitor.Query.Models -{ - /// Contains the tables, columns & rows resulting from a query. - public partial class LogsBatchQueryResult : LogsQueryResult - { - /// Initializes a new instance of LogsBatchQueryResult. - /// The list of tables, columns and rows. - /// is null. - internal LogsBatchQueryResult(IEnumerable allTables) : base(allTables) - { - if (allTables == null) - { - throw new ArgumentNullException(nameof(allTables)); - } - } - - /// Initializes a new instance of LogsBatchQueryResult. - /// The list of tables, columns and rows. - /// Any object. - /// Any object. - /// Any object. - internal LogsBatchQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) : base(allTables, statistics, visualization, error) - { - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs deleted file mode 100644 index 0e66479af77bb..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class LogsBatchQueryResults - { - internal static LogsBatchQueryResults DeserializeLogsBatchQueryResults(JsonElement element) - { - Optional> responses = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("responses")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BatchQueryResponse.DeserializeBatchQueryResponse(item)); - } - responses = array; - continue; - } - } - return new LogsBatchQueryResults(Optional.ToList(responses)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs deleted file mode 100644 index 8f4d7937aecfa..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Response to a batch query. - public partial class LogsBatchQueryResults - { - /// Initializes a new instance of LogsBatchQueryResults. - internal LogsBatchQueryResults() - { - Responses = new ChangeTrackingList(); - } - - /// Initializes a new instance of LogsBatchQueryResults. - /// An array of responses corresponding to each individual request in a batch. - internal LogsBatchQueryResults(IReadOnlyList responses) - { - Responses = responses; - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs deleted file mode 100644 index a52a62206486e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Monitor.Query.Models -{ - /// The data type of this column. - public readonly partial struct LogsColumnType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public LogsColumnType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BoolValue = "bool"; - private const string DatetimeValue = "datetime"; - private const string DynamicValue = "dynamic"; - private const string IntValue = "int"; - private const string LongValue = "long"; - private const string RealValue = "real"; - private const string StringValue = "string"; - private const string GuidValue = "guid"; - private const string DecimalValue = "decimal"; - private const string TimespanValue = "timespan"; - - /// bool. - public static LogsColumnType Bool { get; } = new LogsColumnType(BoolValue); - /// datetime. - public static LogsColumnType Datetime { get; } = new LogsColumnType(DatetimeValue); - /// dynamic. - public static LogsColumnType Dynamic { get; } = new LogsColumnType(DynamicValue); - /// int. - public static LogsColumnType Int { get; } = new LogsColumnType(IntValue); - /// long. - public static LogsColumnType Long { get; } = new LogsColumnType(LongValue); - /// real. - public static LogsColumnType Real { get; } = new LogsColumnType(RealValue); - /// string. - public static LogsColumnType String { get; } = new LogsColumnType(StringValue); - /// guid. - public static LogsColumnType Guid { get; } = new LogsColumnType(GuidValue); - /// decimal. - public static LogsColumnType Decimal { get; } = new LogsColumnType(DecimalValue); - /// timespan. - public static LogsColumnType Timespan { get; } = new LogsColumnType(TimespanValue); - /// Determines if two values are the same. - public static bool operator ==(LogsColumnType left, LogsColumnType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LogsColumnType left, LogsColumnType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LogsColumnType(string value) => new LogsColumnType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LogsColumnType other && Equals(other); - /// - public bool Equals(LogsColumnType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs deleted file mode 100644 index 7c04834c8cb8e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class LogsQueryResult - { - internal static LogsQueryResult DeserializeLogsQueryResult(JsonElement element) - { - IReadOnlyList tables = default; - Optional statistics = default; - Optional render = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tables")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); - } - tables = array; - continue; - } - if (property.NameEquals("statistics")) - { - statistics = property.Value.Clone(); - continue; - } - if (property.NameEquals("render")) - { - render = property.Value.Clone(); - continue; - } - if (property.NameEquals("error")) - { - error = property.Value.Clone(); - continue; - } - } - return new LogsQueryResult(tables, statistics, render, error); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs deleted file mode 100644 index 57c78433f1d8a..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; - -namespace Azure.Monitor.Query.Models -{ - /// Contains the tables, columns & rows resulting from a query. - public partial class LogsQueryResult - { - /// Initializes a new instance of LogsQueryResult. - /// The list of tables, columns and rows. - /// is null. - internal LogsQueryResult(IEnumerable allTables) - { - if (allTables == null) - { - throw new ArgumentNullException(nameof(allTables)); - } - - AllTables = allTables.ToList(); - } - - /// Initializes a new instance of LogsQueryResult. - /// The list of tables, columns and rows. - /// Any object. - /// Any object. - /// Any object. - internal LogsQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) - { - AllTables = allTables; - _statistics = statistics; - _visualization = visualization; - _error = error; - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs deleted file mode 100644 index 186f482383270..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class LogsQueryResultColumn - { - internal static LogsQueryResultColumn DeserializeLogsQueryResultColumn(JsonElement element) - { - string name = default; - LogsColumnType type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new LogsColumnType(property.Value.GetString()); - continue; - } - } - return new LogsQueryResultColumn(name, type); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs deleted file mode 100644 index 169c5fd092841..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// A column in a table. - public partial class LogsQueryResultColumn - { - /// Initializes a new instance of LogsQueryResultColumn. - /// The name of this column. - /// The data type of this column. - /// is null. - internal LogsQueryResultColumn(string name, LogsColumnType type) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - Name = name; - Type = type; - } - - /// The name of this column. - public string Name { get; } - /// The data type of this column. - public LogsColumnType Type { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs deleted file mode 100644 index f3b52004a9992..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class LogsTable - { - internal static LogsTable DeserializeLogsQueryResultTable(JsonElement element) - { - string name = default; - IReadOnlyList columns = default; - JsonElement rows = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("columns")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LogsQueryResultColumn.DeserializeLogsQueryResultColumn(item)); - } - columns = array; - continue; - } - if (property.NameEquals("rows")) - { - rows = property.Value.Clone(); - continue; - } - } - return new LogsTable(name, columns, rows); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs deleted file mode 100644 index e89fc974ce47a..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Contains the columns and rows for one table in a query response. - [CodeGenModel("LogsQueryResultTable")] - public partial class LogsTable - { - /// Initializes a new instance of LogsTable. - /// The name of the table. - /// The list of columns in this table. - /// The resulting rows from this query. - /// or is null. - internal LogsTable(string name, IEnumerable columns, JsonElement internalRows) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (columns == null) - { - throw new ArgumentNullException(nameof(columns)); - } - - Name = name; - Columns = columns.ToList(); - InternalRows = internalRows; - } - - /// Initializes a new instance of LogsTable. - /// The name of the table. - /// The list of columns in this table. - /// The resulting rows from this query. - internal LogsTable(string name, IReadOnlyList columns, JsonElement internalRows) - { - Name = name; - Columns = columns; - InternalRows = internalRows; - } - - /// The name of the table. - public string Name { get; } - /// The list of columns in this table. - public IReadOnlyList Columns { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs deleted file mode 100644 index 34e53d67d4dce..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Application Insights apps that were part of the metadata request and that the user has access to. - internal partial class MetadataApplication - { - /// Initializes a new instance of MetadataApplication. - /// The ID of the Application Insights app. - /// The ARM resource ID of the Application Insights app. - /// The name of the Application Insights app. - /// The Azure region of the Application Insights app. - /// , , , or is null. - internal MetadataApplication(string id, string resourceId, string name, string region) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceId == null) - { - throw new ArgumentNullException(nameof(resourceId)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (region == null) - { - throw new ArgumentNullException(nameof(region)); - } - - Id = id; - ResourceId = resourceId; - Name = name; - Region = region; - } - - /// The ID of the Application Insights app. - public string Id { get; } - /// The ARM resource ID of the Application Insights app. - public string ResourceId { get; } - /// The name of the Application Insights app. - public string Name { get; } - /// The Azure region of the Application Insights app. - public string Region { get; } - /// The related metadata items for the Application Insights app. - public MetadataApplicationRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs deleted file mode 100644 index 8adf27b7069cd..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the Application Insights app. - internal partial class MetadataApplicationRelated - { - /// Initializes a new instance of MetadataApplicationRelated. - internal MetadataApplicationRelated() - { - Tables = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - } - - /// The related tables for the Application Insights app. - public IReadOnlyList Tables { get; } - /// The related functions for the Application Insights app. - public IReadOnlyList Functions { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs deleted file mode 100644 index fa5525d7bc2f3..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Categories are used to group other metadata entities. - internal partial class MetadataCategory - { - /// Initializes a new instance of MetadataCategory. - /// The ID of the category. - /// The display name of the category. - /// or is null. - internal MetadataCategory(string id, string displayName) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (displayName == null) - { - throw new ArgumentNullException(nameof(displayName)); - } - - Id = id; - DisplayName = displayName; - } - - /// The ID of the category. - public string Id { get; } - /// The display name of the category. - public string DisplayName { get; } - /// The description of the category. - public string Description { get; } - /// The related metadata items for the category. - public MetadataCategoryRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs deleted file mode 100644 index 812faf089add9..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the category. - internal partial class MetadataCategoryRelated - { - /// Initializes a new instance of MetadataCategoryRelated. - internal MetadataCategoryRelated() - { - Tables = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Queries = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - } - - /// The tables related to the category. - public IReadOnlyList Tables { get; } - /// The functions related to the category. - public IReadOnlyList Functions { get; } - /// The resource types related to the category. - public IReadOnlyList ResourceTypes { get; } - /// The saved queries related to the category. - public IReadOnlyList Queries { get; } - /// The Log Analytics solutions related to the category. - public IReadOnlyList Solutions { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs deleted file mode 100644 index c094800f090a5..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Monitor.Query.Models -{ - /// The data type of the column. - internal readonly partial struct MetadataColumnDataType : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public MetadataColumnDataType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BoolValue = "bool"; - private const string DatetimeValue = "datetime"; - private const string DynamicValue = "dynamic"; - private const string IntValue = "int"; - private const string LongValue = "long"; - private const string RealValue = "real"; - private const string StringValue = "string"; - private const string GuidValue = "guid"; - private const string DecimalValue = "decimal"; - private const string TimespanValue = "timespan"; - - /// bool. - public static MetadataColumnDataType Bool { get; } = new MetadataColumnDataType(BoolValue); - /// datetime. - public static MetadataColumnDataType Datetime { get; } = new MetadataColumnDataType(DatetimeValue); - /// dynamic. - public static MetadataColumnDataType Dynamic { get; } = new MetadataColumnDataType(DynamicValue); - /// int. - public static MetadataColumnDataType Int { get; } = new MetadataColumnDataType(IntValue); - /// long. - public static MetadataColumnDataType Long { get; } = new MetadataColumnDataType(LongValue); - /// real. - public static MetadataColumnDataType Real { get; } = new MetadataColumnDataType(RealValue); - /// string. - public static MetadataColumnDataType String { get; } = new MetadataColumnDataType(StringValue); - /// guid. - public static MetadataColumnDataType Guid { get; } = new MetadataColumnDataType(GuidValue); - /// decimal. - public static MetadataColumnDataType Decimal { get; } = new MetadataColumnDataType(DecimalValue); - /// timespan. - public static MetadataColumnDataType Timespan { get; } = new MetadataColumnDataType(TimespanValue); - /// Determines if two values are the same. - public static bool operator ==(MetadataColumnDataType left, MetadataColumnDataType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MetadataColumnDataType left, MetadataColumnDataType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MetadataColumnDataType(string value) => new MetadataColumnDataType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MetadataColumnDataType other && Equals(other); - /// - public bool Equals(MetadataColumnDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs deleted file mode 100644 index e542f9b7ec92a..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Functions are stored Kusto queries that can be specified as part of queries by using their name. - internal partial class MetadataFunction - { - /// Initializes a new instance of MetadataFunction. - /// The ID of the function. - /// The name of the function, to be used in queries. - /// The KQL body of the function. - /// , , or is null. - internal MetadataFunction(string id, string name, string body) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - Id = id; - Name = name; - Body = body; - } - - /// The ID of the function. - public string Id { get; } - /// The name of the function, to be used in queries. - public string Name { get; } - /// The parameters/arguments of the function, if any. - public string Parameters { get; } - /// The display name of the function. - public string DisplayName { get; } - /// The description of the function. - public string Description { get; } - /// The KQL body of the function. - public string Body { get; } - /// The tags associated with the function. - public object Tags { get; } - /// The properties of the function. - public object Properties { get; } - /// The related metadata items for the function. - public MetadataFunctionRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs deleted file mode 100644 index 899d0af21598d..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the function. - internal partial class MetadataFunctionRelated - { - /// Initializes a new instance of MetadataFunctionRelated. - internal MetadataFunctionRelated() - { - Tables = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Categories = new ChangeTrackingList(); - Workspaces = new ChangeTrackingList(); - } - - /// The related tables for the function. - public IReadOnlyList Tables { get; } - /// The related Log Analytics solutions for the function. - public IReadOnlyList Solutions { get; } - /// The related resource types for the function. - public IReadOnlyList ResourceTypes { get; } - /// The related categories for the function. - public IReadOnlyList Categories { get; } - /// The related workspaces for the function. - public IReadOnlyList Workspaces { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs deleted file mode 100644 index 7b82f7dfcf049..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Permission information for the metadata call, includes apps/workspaces/resource the user didn't have access to. - internal partial class MetadataPermissions - { - /// Initializes a new instance of MetadataPermissions. - /// The permission indication for the workspaces on the metadata request. - /// is null. - internal MetadataPermissions(IEnumerable workspaces) - { - if (workspaces == null) - { - throw new ArgumentNullException(nameof(workspaces)); - } - - Workspaces = workspaces.ToList(); - Resources = new ChangeTrackingList(); - Applications = new ChangeTrackingList(); - } - - /// The permission indication for the workspaces on the metadata request. - public IReadOnlyList Workspaces { get; } - /// The permission indication for the Azure resources on the metadata request. - public IReadOnlyList Resources { get; } - /// The permission indication for the Application Insights apps on the metadata request. - public IReadOnlyList Applications { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs deleted file mode 100644 index e3e9a5d87c7eb..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// The MetadataPermissionsApplicationsItem. - internal partial class MetadataPermissionsApplicationsItem - { - /// Initializes a new instance of MetadataPermissionsApplicationsItem. - /// The resource ID on the permission indication. - /// is null. - internal MetadataPermissionsApplicationsItem(string resourceId) - { - if (resourceId == null) - { - throw new ArgumentNullException(nameof(resourceId)); - } - - ResourceId = resourceId; - } - - /// The resource ID on the permission indication. - public string ResourceId { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs deleted file mode 100644 index 362b234ed6a88..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The MetadataPermissionsResourcesItem. - internal partial class MetadataPermissionsResourcesItem - { - /// Initializes a new instance of MetadataPermissionsResourcesItem. - /// The resource ID on the permission indication. - /// is null. - internal MetadataPermissionsResourcesItem(string resourceId) - { - if (resourceId == null) - { - throw new ArgumentNullException(nameof(resourceId)); - } - - ResourceId = resourceId; - DenyTables = new ChangeTrackingList(); - } - - /// The resource ID on the permission indication. - public string ResourceId { get; } - /// The list of tables that were denied access for the resource ID. - public IReadOnlyList DenyTables { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs deleted file mode 100644 index c502f99455ded..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The MetadataPermissionsWorkspacesItem. - internal partial class MetadataPermissionsWorkspacesItem - { - /// Initializes a new instance of MetadataPermissionsWorkspacesItem. - /// The resource ID on the permission indication. - /// is null. - internal MetadataPermissionsWorkspacesItem(string resourceId) - { - if (resourceId == null) - { - throw new ArgumentNullException(nameof(resourceId)); - } - - ResourceId = resourceId; - DenyTables = new ChangeTrackingList(); - } - - /// The resource ID on the permission indication. - public string ResourceId { get; } - /// The list of tables that were denied access for the resource ID. - public IReadOnlyList DenyTables { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs deleted file mode 100644 index 69f5e2f4a5351..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Queries are stored pieces of KQL, along with a list of relevant metadata items. - internal partial class MetadataQuery - { - /// Initializes a new instance of MetadataQuery. - /// The ID of the query. - /// The KQL body of the query. - /// or is null. - internal MetadataQuery(string id, string body) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - Id = id; - Body = body; - Labels = new ChangeTrackingList(); - } - - /// The ID of the query. - public string Id { get; } - /// The display name of the query. - public string DisplayName { get; } - /// The description of the query. - public string Description { get; } - /// The KQL body of the query. - public string Body { get; } - /// The user defined labels associated with the query. - public IReadOnlyList Labels { get; } - /// The tags associated with the query. - public object Tags { get; } - /// The properties of the query. - public object Properties { get; } - /// The related metadata items for the query. - public MetadataQueryRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs deleted file mode 100644 index cb11ec74ad137..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the query. - internal partial class MetadataQueryRelated - { - /// Initializes a new instance of MetadataQueryRelated. - internal MetadataQueryRelated() - { - Categories = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Tables = new ChangeTrackingList(); - } - - /// The related categories for the query. - public IReadOnlyList Categories { get; } - /// The related Log Analytics solutions for the query. - public IReadOnlyList Solutions { get; } - /// The related resource types for the query. - public IReadOnlyList ResourceTypes { get; } - /// The related tables for the query. - public IReadOnlyList Tables { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs deleted file mode 100644 index d8f56f083a7f6..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Metadata about types of Azure resources, containing relevant tables, functions, etc. - internal partial class MetadataResourceType - { - /// Initializes a new instance of MetadataResourceType. - /// The ID of the resource-type. - /// The type of the resource-type. - /// or is null. - internal MetadataResourceType(string id, string type) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (type == null) - { - throw new ArgumentNullException(nameof(type)); - } - - Id = id; - Type = type; - Labels = new ChangeTrackingList(); - } - - /// The ID of the resource-type. - public string Id { get; } - /// The type of the resource-type. - public string Type { get; } - /// The display name of the resource-type. - public string DisplayName { get; } - /// The description of the resource-type. - public string Description { get; } - /// The user-defined labels of the resource-type. - public IReadOnlyList Labels { get; } - /// The tags associated with the resource-type. - public object Tags { get; } - /// The properties of the resource-type. - public object Properties { get; } - /// The related metadata items for the resource-type. - public MetadataResourceTypeRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs deleted file mode 100644 index d7ffac1ae4c3e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the resource-type. - internal partial class MetadataResourceTypeRelated - { - /// Initializes a new instance of MetadataResourceTypeRelated. - internal MetadataResourceTypeRelated() - { - Tables = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - Categories = new ChangeTrackingList(); - Queries = new ChangeTrackingList(); - Workspaces = new ChangeTrackingList(); - Resources = new ChangeTrackingList(); - } - - /// The tables related to the resource-type. - public IReadOnlyList Tables { get; } - /// The functions related to the resource-type. - public IReadOnlyList Functions { get; } - /// The categories related to the resource-type. - public IReadOnlyList Categories { get; } - /// The queries related to the resource-type. - public IReadOnlyList Queries { get; } - /// The Log Analytics workspaces related to the resource-type. - public IReadOnlyList Workspaces { get; } - /// The Azure resources related to the resource-type. - public IReadOnlyList Resources { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs deleted file mode 100644 index d4c899900f775..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The metadata response for the app, including available tables, etc. - internal partial class MetadataResults - { - /// Initializes a new instance of MetadataResults. - internal MetadataResults() - { - Categories = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - Tables = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - Queries = new ChangeTrackingList(); - Applications = new ChangeTrackingList(); - Workspaces = new ChangeTrackingList(); - Resources = new ChangeTrackingList(); - Permissions = new ChangeTrackingList(); - } - - /// The list of categories that are referenced in this metadata response. - public IReadOnlyList Categories { get; } - /// The list of resource types that are referenced in this metadata response. - public IReadOnlyList ResourceTypes { get; } - /// The list of Log Analytics solutions installed on the workspace. - public IReadOnlyList Solutions { get; } - /// The list of tables and columns that comprise the schema of the workspace. - public IReadOnlyList Tables { get; } - /// The list of functions stored on the workspace, or introduced by solutions etc. - public IReadOnlyList Functions { get; } - /// The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. - public IReadOnlyList Queries { get; } - /// The list of Application Insights apps that were referenced in the metadata request. - public IReadOnlyList Applications { get; } - /// The list of Log Analytics workspaces that were referenced in the metadata request. - public IReadOnlyList Workspaces { get; } - /// The list of Azure resources that were referenced in the metadata request. - public IReadOnlyList Resources { get; } - /// The list of permission rules that affected the metadata request. - public IReadOnlyList Permissions { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs deleted file mode 100644 index a43240b4919c6..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Solutions can group tables and functions that are associated with a certain Azure Log Analytics offering. - internal partial class MetadataSolution - { - /// Initializes a new instance of MetadataSolution. - /// The ID of the Log Analytics solution. - /// The name of the Log Analytics solution. - /// The related metadata items for the Log Analytics solution. - /// , , or is null. - internal MetadataSolution(string id, string name, MetadataSolutionRelated related) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (related == null) - { - throw new ArgumentNullException(nameof(related)); - } - - Id = id; - Name = name; - Related = related; - } - - /// The ID of the Log Analytics solution. - public string Id { get; } - /// The name of the Log Analytics solution. - public string Name { get; } - /// The display name of the Log Analytics solution. - public string DisplayName { get; } - /// The description of the Log Analytics solution. - public string Description { get; } - /// The tags that are associated with the Log Analytics solution. - public object Tags { get; } - /// The properties of the Log Analytics solution. - public object Properties { get; } - /// The related metadata items for the Log Analytics solution. - public MetadataSolutionRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs deleted file mode 100644 index 3febbb787df96..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the Log Analytics solution. - internal partial class MetadataSolutionRelated - { - /// Initializes a new instance of MetadataSolutionRelated. - /// The tables related to the Log Analytics solution. - /// is null. - internal MetadataSolutionRelated(IEnumerable tables) - { - if (tables == null) - { - throw new ArgumentNullException(nameof(tables)); - } - - Tables = tables.ToList(); - Functions = new ChangeTrackingList(); - Categories = new ChangeTrackingList(); - Queries = new ChangeTrackingList(); - Workspaces = new ChangeTrackingList(); - } - - /// The tables related to the Log Analytics solution. - public IReadOnlyList Tables { get; } - /// The functions related to the Log Analytics solution. - public IReadOnlyList Functions { get; } - /// The categories related to the Log Analytics solution. - public IReadOnlyList Categories { get; } - /// The saved queries related to the Log Analytics solution. - public IReadOnlyList Queries { get; } - /// The Workspaces referenced in the metadata request that are related to the Log Analytics solution. - public IReadOnlyList Workspaces { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs deleted file mode 100644 index 07247a046dec1..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Tables are part of the workspace schema, and contain a list of columns and a reference to other relevant metadata items. - internal partial class MetadataTable - { - /// Initializes a new instance of MetadataTable. - /// The ID of the table. - /// The name of the table. - /// or is null. - internal MetadataTable(string id, string name) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - Id = id; - Name = name; - Labels = new ChangeTrackingList(); - Columns = new ChangeTrackingList(); - } - - /// The ID of the table. - public string Id { get; } - /// The name of the table. - public string Name { get; } - /// The description of the table. - public string Description { get; } - /// The column associated with the timespan query parameter for the table. - public string TimespanColumn { get; } - /// The user defined labels of the table. - public IReadOnlyList Labels { get; } - /// The tags associated with the table. - public object Tags { get; } - /// The properties of the table. - public object Properties { get; } - /// The list of columns defined on the table. - public IReadOnlyList Columns { get; } - /// The related metadata items for the table. - public MetadataTableRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs deleted file mode 100644 index f294f9a2c6b0b..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// The MetadataTableColumnsItem. - internal partial class MetadataTableColumnsItem - { - /// Initializes a new instance of MetadataTableColumnsItem. - /// The name of the column. - /// The data type of the column. - /// is null. - internal MetadataTableColumnsItem(string name, MetadataColumnDataType type) - { - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - - Name = name; - Type = type; - } - - /// The name of the column. - public string Name { get; } - /// The description of the column. - public string Description { get; } - /// The data type of the column. - public MetadataColumnDataType Type { get; } - /// A flag indicating this column is a preferred facet. - public bool? IsPreferredFacet { get; } - /// an indication of the source of the column, used only when multiple workspaces have conflicting definition for the column. - public object Source { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs deleted file mode 100644 index d5f9b3579d429..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the table. - internal partial class MetadataTableRelated - { - /// Initializes a new instance of MetadataTableRelated. - internal MetadataTableRelated() - { - Categories = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Workspaces = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - Queries = new ChangeTrackingList(); - } - - /// The related categories for the table. - public IReadOnlyList Categories { get; } - /// The related Log Analytics solutions for the table. - public IReadOnlyList Solutions { get; } - /// The related resource types for the table. - public IReadOnlyList ResourceTypes { get; } - /// The related Log Analytics workspaces for the table. - public IReadOnlyList Workspaces { get; } - /// The related functions for the table. - public IReadOnlyList Functions { get; } - /// The related saved queries for the table. - public IReadOnlyList Queries { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs deleted file mode 100644 index b556c9e0cedf8..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class MetadataValue - { - internal static MetadataValue DeserializeMetadataValue(JsonElement element) - { - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - name = LocalizableString.DeserializeLocalizableString(property.Value); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - } - return new MetadataValue(name.Value, value.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs deleted file mode 100644 index 15f52d8d253bb..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Monitor.Query.Models -{ - /// Represents a metric metadata value. - internal partial class MetadataValue - { - /// Initializes a new instance of MetadataValue. - internal MetadataValue() - { - } - - /// Initializes a new instance of MetadataValue. - /// the name of the metadata. - /// the value of the metadata. - internal MetadataValue(LocalizableString name, string value) - { - Name = name; - Value = value; - } - - /// the name of the metadata. - public LocalizableString Name { get; } - /// the value of the metadata. - public string Value { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs deleted file mode 100644 index ccf406740e66c..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Log Analytics workspaces that were part of the metadata request and that the user has access to. - internal partial class MetadataWorkspace - { - /// Initializes a new instance of MetadataWorkspace. - /// The ID of the Log Analytics workspace. - /// The ARM resource ID of the Log Analytics workspace. - /// The name of the Log Analytics workspace. - /// The Azure region of the Log Analytics workspace. - /// , , , or is null. - internal MetadataWorkspace(string id, string resourceId, string name, string region) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (resourceId == null) - { - throw new ArgumentNullException(nameof(resourceId)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (region == null) - { - throw new ArgumentNullException(nameof(region)); - } - - Id = id; - ResourceId = resourceId; - Name = name; - Region = region; - } - - /// The ID of the Log Analytics workspace. - public string Id { get; } - /// The ARM resource ID of the Log Analytics workspace. - public string ResourceId { get; } - /// The name of the Log Analytics workspace. - public string Name { get; } - /// The Azure region of the Log Analytics workspace. - public string Region { get; } - /// The related metadata items for the Log Analytics workspace. - public MetadataWorkspaceRelated Related { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs deleted file mode 100644 index 0e2fa176f3eef..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The related metadata items for the Log Analytics workspace. - internal partial class MetadataWorkspaceRelated - { - /// Initializes a new instance of MetadataWorkspaceRelated. - internal MetadataWorkspaceRelated() - { - Tables = new ChangeTrackingList(); - Solutions = new ChangeTrackingList(); - ResourceTypes = new ChangeTrackingList(); - Functions = new ChangeTrackingList(); - Resources = new ChangeTrackingList(); - } - - /// The related tables for the Log Analytics workspace. - public IReadOnlyList Tables { get; } - /// The related Log Analytics solutions for the Log Analytics workspace. - public IReadOnlyList Solutions { get; } - /// The related resource types for the Log Analytics workspace. - public IReadOnlyList ResourceTypes { get; } - /// The related functions for the Log Analytics workspace. - public IReadOnlyList Functions { get; } - /// The related Azure resources for the Log Analytics workspace. - public IReadOnlyList Resources { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs deleted file mode 100644 index 359c4de83c7e5..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class Metric - { - internal static Metric DeserializeMetric(JsonElement element) - { - string id = default; - string type = default; - LocalizableString name = default; - Optional displayDescription = default; - Optional errorCode = default; - Optional errorMessage = default; - MetricUnit unit = default; - IReadOnlyList timeseries = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = LocalizableString.DeserializeLocalizableString(property.Value); - continue; - } - if (property.NameEquals("displayDescription")) - { - displayDescription = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorCode")) - { - errorCode = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorMessage")) - { - errorMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("unit")) - { - unit = new MetricUnit(property.Value.GetString()); - continue; - } - if (property.NameEquals("timeseries")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(TimeSeriesElement.DeserializeTimeSeriesElement(item)); - } - timeseries = array; - continue; - } - } - return new Metric(id, type, name, displayDescription.Value, errorCode.Value, errorMessage.Value, unit, timeseries); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs deleted file mode 100644 index c644fe047a108..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Monitor.Query.Models -{ - /// The result data of a query. - public partial class Metric - { - /// Initializes a new instance of Metric. - /// the metric Id. - /// the resource type of the metric resource. - /// the name and the display name of the metric, i.e. it is localizable string. - /// The unit of the metric. - /// the time series returned when a data query is performed. - /// , , , or is null. - internal Metric(string id, string type, LocalizableString localizedName, MetricUnit unit, IEnumerable timeSeries) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - if (type == null) - { - throw new ArgumentNullException(nameof(type)); - } - if (localizedName == null) - { - throw new ArgumentNullException(nameof(localizedName)); - } - if (timeSeries == null) - { - throw new ArgumentNullException(nameof(timeSeries)); - } - - Id = id; - Type = type; - LocalizedName = localizedName; - Unit = unit; - TimeSeries = timeSeries.ToList(); - } - - /// Initializes a new instance of Metric. - /// the metric Id. - /// the resource type of the metric resource. - /// the name and the display name of the metric, i.e. it is localizable string. - /// Detailed description of this metric. - /// 'Success' or the error details on query failures for this metric. - /// Error message encountered querying this specific metric. - /// The unit of the metric. - /// the time series returned when a data query is performed. - internal Metric(string id, string type, LocalizableString localizedName, string displayDescription, string errorCode, string errorMessage, MetricUnit unit, IReadOnlyList timeSeries) - { - Id = id; - Type = type; - LocalizedName = localizedName; - DisplayDescription = displayDescription; - ErrorCode = errorCode; - ErrorMessage = errorMessage; - Unit = unit; - TimeSeries = timeSeries; - } - - /// the metric Id. - public string Id { get; } - /// the resource type of the metric resource. - public string Type { get; } - /// Detailed description of this metric. - public string DisplayDescription { get; } - /// The unit of the metric. - public MetricUnit Unit { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs deleted file mode 100644 index 9b13b0e6e063a..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - internal static partial class MetricAggregationTypeExtensions - { - public static string ToSerialString(this MetricAggregationType value) => value switch - { - MetricAggregationType.None => "None", - MetricAggregationType.Average => "Average", - MetricAggregationType.Count => "Count", - MetricAggregationType.Minimum => "Minimum", - MetricAggregationType.Maximum => "Maximum", - MetricAggregationType.Total => "Total", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MetricAggregationType value.") - }; - - public static MetricAggregationType ToMetricAggregationType(this string value) - { - if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.None; - if (string.Equals(value, "Average", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Average; - if (string.Equals(value, "Count", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Count; - if (string.Equals(value, "Minimum", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Minimum; - if (string.Equals(value, "Maximum", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Maximum; - if (string.Equals(value, "Total", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Total; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MetricAggregationType value."); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs deleted file mode 100644 index 2a32475079891..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class MetricAvailability - { - internal static MetricAvailability DeserializeMetricAvailability(JsonElement element) - { - Optional timeGrain = default; - Optional retention = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timeGrain")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeGrain = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("retention")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - retention = property.Value.GetTimeSpan("P"); - continue; - } - } - return new MetricAvailability(Optional.ToNullable(timeGrain), Optional.ToNullable(retention)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs deleted file mode 100644 index 802c58effbd39..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. - public partial class MetricAvailability - { - /// Initializes a new instance of MetricAvailability. - internal MetricAvailability() - { - } - - /// Initializes a new instance of MetricAvailability. - /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - internal MetricAvailability(TimeSpan? timeGrain, TimeSpan? retention) - { - Granularity = timeGrain; - Retention = retention; - } - - /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - [CodeGenMember("TimeGrain")] - public TimeSpan? Granularity { get; } - /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - public TimeSpan? Retention { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs deleted file mode 100644 index f0bd71c17412c..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Monitor.Query.Models -{ - /// The class of the metric. - public readonly partial struct MetricClass : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public MetricClass(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AvailabilityValue = "Availability"; - private const string TransactionsValue = "Transactions"; - private const string ErrorsValue = "Errors"; - private const string LatencyValue = "Latency"; - private const string SaturationValue = "Saturation"; - - /// Availability. - public static MetricClass Availability { get; } = new MetricClass(AvailabilityValue); - /// Transactions. - public static MetricClass Transactions { get; } = new MetricClass(TransactionsValue); - /// Errors. - public static MetricClass Errors { get; } = new MetricClass(ErrorsValue); - /// Latency. - public static MetricClass Latency { get; } = new MetricClass(LatencyValue); - /// Saturation. - public static MetricClass Saturation { get; } = new MetricClass(SaturationValue); - /// Determines if two values are the same. - public static bool operator ==(MetricClass left, MetricClass right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MetricClass left, MetricClass right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MetricClass(string value) => new MetricClass(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MetricClass other && Equals(other); - /// - public bool Equals(MetricClass other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs deleted file mode 100644 index 780ab86eef11f..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class MetricDefinition - { - internal static MetricDefinition DeserializeMetricDefinition(JsonElement element) - { - Optional isDimensionRequired = default; - Optional resourceId = default; - Optional @namespace = default; - Optional name = default; - Optional displayDescription = default; - Optional category = default; - Optional metricClass = default; - Optional unit = default; - Optional primaryAggregationType = default; - Optional> supportedAggregationTypes = default; - Optional> metricAvailabilities = default; - Optional id = default; - Optional> dimensions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isDimensionRequired")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDimensionRequired = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("resourceId")) - { - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("namespace")) - { - @namespace = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - name = LocalizableString.DeserializeLocalizableString(property.Value); - continue; - } - if (property.NameEquals("displayDescription")) - { - displayDescription = property.Value.GetString(); - continue; - } - if (property.NameEquals("category")) - { - category = property.Value.GetString(); - continue; - } - if (property.NameEquals("metricClass")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - metricClass = new MetricClass(property.Value.GetString()); - continue; - } - if (property.NameEquals("unit")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unit = new MetricUnit(property.Value.GetString()); - continue; - } - if (property.NameEquals("primaryAggregationType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - primaryAggregationType = property.Value.GetString().ToMetricAggregationType(); - continue; - } - if (property.NameEquals("supportedAggregationTypes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString().ToMetricAggregationType()); - } - supportedAggregationTypes = array; - continue; - } - if (property.NameEquals("metricAvailabilities")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MetricAvailability.DeserializeMetricAvailability(item)); - } - metricAvailabilities = array; - continue; - } - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("dimensions")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LocalizableString.DeserializeLocalizableString(item)); - } - dimensions = array; - continue; - } - } - return new MetricDefinition(Optional.ToNullable(isDimensionRequired), resourceId.Value, @namespace.Value, name.Value, displayDescription.Value, category.Value, Optional.ToNullable(metricClass), Optional.ToNullable(unit), Optional.ToNullable(primaryAggregationType), Optional.ToList(supportedAggregationTypes), Optional.ToList(metricAvailabilities), id.Value, Optional.ToList(dimensions)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs deleted file mode 100644 index bd737f7834b2e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// Metric definition class specifies the metadata for a metric. - public partial class MetricDefinition - { - /// Initializes a new instance of MetricDefinition. - internal MetricDefinition() - { - SupportedAggregationTypes = new ChangeTrackingList(); - MetricAvailabilities = new ChangeTrackingList(); - LocalizedDimensions = new ChangeTrackingList(); - } - - /// Initializes a new instance of MetricDefinition. - /// Flag to indicate whether the dimension is required. - /// the resource identifier of the resource that emitted the metric. - /// the namespace the metric belongs to. - /// the name and the display name of the metric, i.e. it is a localizable string. - /// Detailed description of this metric. - /// Custom category name for this metric. - /// The class of the metric. - /// The unit of the metric. - /// the primary aggregation type value defining how to use the values for display. - /// the collection of what aggregation types are supported. - /// the collection of what aggregation intervals are available to be queried. - /// the resource identifier of the metric definition. - /// the name and the display name of the dimension, i.e. it is a localizable string. - internal MetricDefinition(bool? isDimensionRequired, string resourceId, string @namespace, LocalizableString localizedName, string displayDescription, string category, MetricClass? metricClass, MetricUnit? unit, MetricAggregationType? primaryAggregationType, IReadOnlyList supportedAggregationTypes, IReadOnlyList metricAvailabilities, string id, IReadOnlyList localizedDimensions) - { - IsDimensionRequired = isDimensionRequired; - ResourceId = resourceId; - Namespace = @namespace; - LocalizedName = localizedName; - DisplayDescription = displayDescription; - Category = category; - MetricClass = metricClass; - Unit = unit; - PrimaryAggregationType = primaryAggregationType; - SupportedAggregationTypes = supportedAggregationTypes; - MetricAvailabilities = metricAvailabilities; - Id = id; - LocalizedDimensions = localizedDimensions; - } - - /// Flag to indicate whether the dimension is required. - public bool? IsDimensionRequired { get; } - /// the resource identifier of the resource that emitted the metric. - public string ResourceId { get; } - /// the namespace the metric belongs to. - public string Namespace { get; } - /// Detailed description of this metric. - public string DisplayDescription { get; } - /// Custom category name for this metric. - public string Category { get; } - /// The class of the metric. - public MetricClass? MetricClass { get; } - /// The unit of the metric. - public MetricUnit? Unit { get; } - /// the primary aggregation type value defining how to use the values for display. - public MetricAggregationType? PrimaryAggregationType { get; } - /// the collection of what aggregation types are supported. - public IReadOnlyList SupportedAggregationTypes { get; } - /// the collection of what aggregation intervals are available to be queried. - public IReadOnlyList MetricAvailabilities { get; } - /// the resource identifier of the metric definition. - public string Id { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs deleted file mode 100644 index 9070af3186dea..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class MetricDefinitionCollection - { - internal static MetricDefinitionCollection DeserializeMetricDefinitionCollection(JsonElement element) - { - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MetricDefinition.DeserializeMetricDefinition(item)); - } - value = array; - continue; - } - } - return new MetricDefinitionCollection(value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs deleted file mode 100644 index c11cc2c6efb98..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Monitor.Query.Models -{ - /// Represents collection of metric definitions. - internal partial class MetricDefinitionCollection - { - /// Initializes a new instance of MetricDefinitionCollection. - /// the values for the metric definitions. - /// is null. - internal MetricDefinitionCollection(IEnumerable value) - { - if (value == null) - { - throw new ArgumentNullException(nameof(value)); - } - - Value = value.ToList(); - } - - /// Initializes a new instance of MetricDefinitionCollection. - /// the values for the metric definitions. - internal MetricDefinitionCollection(IReadOnlyList value) - { - Value = value; - } - - /// the values for the metric definitions. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs deleted file mode 100644 index 97f75c566a3da..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class MetricNamespace - { - internal static MetricNamespace DeserializeMetricNamespace(JsonElement element) - { - Optional id = default; - Optional type = default; - Optional name = default; - Optional classification = default; - Optional properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("classification")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - classification = new NamespaceClassification(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = MetricNamespaceName.DeserializeMetricNamespaceName(property.Value); - continue; - } - } - return new MetricNamespace(id.Value, type.Value, name.Value, Optional.ToNullable(classification), properties.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs deleted file mode 100644 index d8225ba7afedd..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Monitor.Query.Models -{ - /// Metric namespace class specifies the metadata for a metric namespace. - public partial class MetricNamespace - { - /// Initializes a new instance of MetricNamespace. - internal MetricNamespace() - { - } - - /// Initializes a new instance of MetricNamespace. - /// The ID of the metric namespace. - /// The type of the namespace. - /// The escaped name of the namespace. - /// Kind of namespace. - /// Properties which include the fully qualified namespace name. - internal MetricNamespace(string id, string type, string name, NamespaceClassification? classification, MetricNamespaceName properties) - { - Id = id; - Type = type; - Name = name; - Classification = classification; - Properties = properties; - } - - /// The ID of the metric namespace. - public string Id { get; } - /// The type of the namespace. - public string Type { get; } - /// The escaped name of the namespace. - public string Name { get; } - /// Kind of namespace. - public NamespaceClassification? Classification { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs deleted file mode 100644 index f8d2cb3dc4420..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class MetricNamespaceCollection - { - internal static MetricNamespaceCollection DeserializeMetricNamespaceCollection(JsonElement element) - { - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MetricNamespace.DeserializeMetricNamespace(item)); - } - value = array; - continue; - } - } - return new MetricNamespaceCollection(value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs deleted file mode 100644 index 6f171c4cf4927..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Monitor.Query.Models -{ - /// Represents collection of metric namespaces. - internal partial class MetricNamespaceCollection - { - /// Initializes a new instance of MetricNamespaceCollection. - /// The values for the metric namespaces. - /// is null. - internal MetricNamespaceCollection(IEnumerable value) - { - if (value == null) - { - throw new ArgumentNullException(nameof(value)); - } - - Value = value.ToList(); - } - - /// Initializes a new instance of MetricNamespaceCollection. - /// The values for the metric namespaces. - internal MetricNamespaceCollection(IReadOnlyList value) - { - Value = value; - } - - /// The values for the metric namespaces. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs deleted file mode 100644 index 558796bc5641e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class MetricNamespaceName - { - internal static MetricNamespaceName DeserializeMetricNamespaceName(JsonElement element) - { - Optional metricNamespaceName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("metricNamespaceName")) - { - metricNamespaceName = property.Value.GetString(); - continue; - } - } - return new MetricNamespaceName(metricNamespaceName.Value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs deleted file mode 100644 index af901b3eebc27..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Monitor.Query.Models -{ - /// The fully qualified metric namespace name. - internal partial class MetricNamespaceName - { - /// Initializes a new instance of MetricNamespaceName. - internal MetricNamespaceName() - { - } - - /// Initializes a new instance of MetricNamespaceName. - /// The metric namespace name. - internal MetricNamespaceName(string metricNamespaceNameValue) - { - MetricNamespaceNameValue = metricNamespaceNameValue; - } - - /// The metric namespace name. - public string MetricNamespaceNameValue { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs deleted file mode 100644 index 5f239a8e36bbd..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Monitor.Query.Models -{ - /// The unit of the metric. - public readonly partial struct MetricUnit : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public MetricUnit(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountValue = "Count"; - private const string BytesValue = "Bytes"; - private const string SecondsValue = "Seconds"; - private const string CountPerSecondValue = "CountPerSecond"; - private const string BytesPerSecondValue = "BytesPerSecond"; - private const string PercentValue = "Percent"; - private const string MilliSecondsValue = "MilliSeconds"; - private const string ByteSecondsValue = "ByteSeconds"; - private const string UnspecifiedValue = "Unspecified"; - private const string CoresValue = "Cores"; - private const string MilliCoresValue = "MilliCores"; - private const string NanoCoresValue = "NanoCores"; - private const string BitsPerSecondValue = "BitsPerSecond"; - - /// Count. - public static MetricUnit Count { get; } = new MetricUnit(CountValue); - /// Bytes. - public static MetricUnit Bytes { get; } = new MetricUnit(BytesValue); - /// Seconds. - public static MetricUnit Seconds { get; } = new MetricUnit(SecondsValue); - /// CountPerSecond. - public static MetricUnit CountPerSecond { get; } = new MetricUnit(CountPerSecondValue); - /// BytesPerSecond. - public static MetricUnit BytesPerSecond { get; } = new MetricUnit(BytesPerSecondValue); - /// Percent. - public static MetricUnit Percent { get; } = new MetricUnit(PercentValue); - /// MilliSeconds. - public static MetricUnit MilliSeconds { get; } = new MetricUnit(MilliSecondsValue); - /// ByteSeconds. - public static MetricUnit ByteSeconds { get; } = new MetricUnit(ByteSecondsValue); - /// Unspecified. - public static MetricUnit Unspecified { get; } = new MetricUnit(UnspecifiedValue); - /// Cores. - public static MetricUnit Cores { get; } = new MetricUnit(CoresValue); - /// MilliCores. - public static MetricUnit MilliCores { get; } = new MetricUnit(MilliCoresValue); - /// NanoCores. - public static MetricUnit NanoCores { get; } = new MetricUnit(NanoCoresValue); - /// BitsPerSecond. - public static MetricUnit BitsPerSecond { get; } = new MetricUnit(BitsPerSecondValue); - /// Determines if two values are the same. - public static bool operator ==(MetricUnit left, MetricUnit right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MetricUnit left, MetricUnit right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MetricUnit(string value) => new MetricUnit(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MetricUnit other && Equals(other); - /// - public bool Equals(MetricUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs deleted file mode 100644 index 1595dd63bd5ce..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class MetricValue - { - internal static MetricValue DeserializeMetricValue(JsonElement element) - { - DateTimeOffset timeStamp = default; - Optional average = default; - Optional minimum = default; - Optional maximum = default; - Optional total = default; - Optional count = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("timeStamp")) - { - timeStamp = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("average")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - average = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("minimum")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minimum = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("maximum")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maximum = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("total")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - total = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("count")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - count = property.Value.GetDouble(); - continue; - } - } - return new MetricValue(timeStamp, Optional.ToNullable(average), Optional.ToNullable(minimum), Optional.ToNullable(maximum), Optional.ToNullable(total), Optional.ToNullable(count)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs deleted file mode 100644 index 908e7cde31e18..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Represents a metric value. - public partial class MetricValue - { - /// Initializes a new instance of MetricValue. - /// the timestamp for the metric value in ISO 8601 format. - internal MetricValue(DateTimeOffset timeStamp) - { - TimeStamp = timeStamp; - } - - /// Initializes a new instance of MetricValue. - /// the timestamp for the metric value in ISO 8601 format. - /// the average value in the time range. - /// the least value in the time range. - /// the greatest value in the time range. - /// the sum of all of the values in the time range. - /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - internal MetricValue(DateTimeOffset timeStamp, double? average, double? minimum, double? maximum, double? total, double? count) - { - TimeStamp = timeStamp; - Average = average; - Minimum = minimum; - Maximum = maximum; - Total = total; - Count = count; - } - - /// the timestamp for the metric value in ISO 8601 format. - public DateTimeOffset TimeStamp { get; } - /// the average value in the time range. - public double? Average { get; } - /// the least value in the time range. - public double? Minimum { get; } - /// the greatest value in the time range. - public double? Maximum { get; } - /// the sum of all of the values in the time range. - public double? Total { get; } - /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - public double? Count { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs deleted file mode 100644 index 63a16b06cde51..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class MetricsQueryResult - { - internal static MetricsQueryResult DeserializeMetricsQueryResult(JsonElement element) - { - Optional cost = default; - string timespan = default; - Optional interval = default; - Optional @namespace = default; - Optional resourceregion = default; - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("cost")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - cost = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timespan")) - { - timespan = property.Value.GetString(); - continue; - } - if (property.NameEquals("interval")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - interval = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("namespace")) - { - @namespace = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceregion")) - { - resourceregion = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Metric.DeserializeMetric(item)); - } - value = array; - continue; - } - } - return new MetricsQueryResult(Optional.ToNullable(cost), timespan, Optional.ToNullable(interval), @namespace.Value, resourceregion.Value, value); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs deleted file mode 100644 index 2b2c965e32505..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Monitor.Query.Models -{ - /// The response to a metrics query. - public partial class MetricsQueryResult - { - /// Initializes a new instance of MetricsQueryResult. - /// The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. - /// the value of the collection. - /// or is null. - internal MetricsQueryResult(string timespan, IEnumerable metrics) - { - if (timespan == null) - { - throw new ArgumentNullException(nameof(timespan)); - } - if (metrics == null) - { - throw new ArgumentNullException(nameof(metrics)); - } - - _timespan = timespan; - Metrics = metrics.ToList(); - } - - /// Initializes a new instance of MetricsQueryResult. - /// The integer value representing the relative cost of the query. - /// The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. - /// The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. - /// The namespace of the metrics being queried. - /// The region of the resource being queried for metrics. - /// the value of the collection. - internal MetricsQueryResult(int? cost, string timespan, TimeSpan? interval, string @namespace, string resourceRegion, IReadOnlyList metrics) - { - Cost = cost; - _timespan = timespan; - Interval = interval; - Namespace = @namespace; - ResourceRegion = resourceRegion; - Metrics = metrics; - } - - /// The integer value representing the relative cost of the query. - public int? Cost { get; } - /// The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. - public TimeSpan? Interval { get; } - /// The namespace of the metrics being queried. - public string Namespace { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs deleted file mode 100644 index ca890b69e7290..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Monitor.Query.Models -{ - /// Kind of namespace. - public readonly partial struct NamespaceClassification : IEquatable - { - private readonly string _value; - - /// Determines if two values are the same. - /// is null. - public NamespaceClassification(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PlatformValue = "Platform"; - private const string CustomValue = "Custom"; - private const string QosValue = "Qos"; - - /// Platform. - public static NamespaceClassification Platform { get; } = new NamespaceClassification(PlatformValue); - /// Custom. - public static NamespaceClassification Custom { get; } = new NamespaceClassification(CustomValue); - /// Qos. - public static NamespaceClassification Qos { get; } = new NamespaceClassification(QosValue); - /// Determines if two values are the same. - public static bool operator ==(NamespaceClassification left, NamespaceClassification right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NamespaceClassification left, NamespaceClassification right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NamespaceClassification(string value) => new NamespaceClassification(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NamespaceClassification other && Equals(other); - /// - public bool Equals(NamespaceClassification other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs deleted file mode 100644 index 4a2b17a59beef..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - internal partial class QueryBody : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("query"); - writer.WriteStringValue(Query); - if (Optional.IsDefined(Timespan)) - { - writer.WritePropertyName("timespan"); - writer.WriteStringValue(Timespan); - } - if (Optional.IsCollectionDefined(Workspaces)) - { - writer.WritePropertyName("workspaces"); - writer.WriteStartArray(); - foreach (var item in Workspaces) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs deleted file mode 100644 index 2e1f827a39a51..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - internal partial class QueryBody - { - /// Initializes a new instance of QueryBody. - /// The query to execute. - /// is null. - public QueryBody(string query) - { - if (query == null) - { - throw new ArgumentNullException(nameof(query)); - } - - Query = query; - Workspaces = new ChangeTrackingList(); - } - - /// The query to execute. - public string Query { get; } - /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - public string Timespan { get; set; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs deleted file mode 100644 index da62ed092731d..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - internal static partial class ResultTypeExtensions - { - public static string ToSerialString(this ResultType value) => value switch - { - ResultType.Data => "Data", - ResultType.Metadata => "Metadata", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResultType value.") - }; - - public static ResultType ToResultType(this string value) - { - if (string.Equals(value, "Data", StringComparison.InvariantCultureIgnoreCase)) return ResultType.Data; - if (string.Equals(value, "Metadata", StringComparison.InvariantCultureIgnoreCase)) return ResultType.Metadata; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResultType value."); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs deleted file mode 100644 index 04f6356b8d1d0..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - public partial class TimeSeriesElement - { - internal static TimeSeriesElement DeserializeTimeSeriesElement(JsonElement element) - { - Optional> metadatavalues = default; - Optional> data = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("metadatavalues")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MetadataValue.DeserializeMetadataValue(item)); - } - metadatavalues = array; - continue; - } - if (property.NameEquals("data")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MetricValue.DeserializeMetricValue(item)); - } - data = array; - continue; - } - } - return new TimeSeriesElement(Optional.ToList(metadatavalues), Optional.ToList(data)); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs deleted file mode 100644 index 4de57ab3e0b89..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Monitor.Query.Models -{ - /// A time series result type. The discriminator value is always TimeSeries in this case. - public partial class TimeSeriesElement - { - /// Initializes a new instance of TimeSeriesElement. - internal TimeSeriesElement() - { - Metadatavalues = new ChangeTrackingList(); - Data = new ChangeTrackingList(); - } - - /// Initializes a new instance of TimeSeriesElement. - /// the metadata values returned if $filter was specified in the call. - /// An array of data points representing the metric values. This is only returned if a result type of data is specified. - internal TimeSeriesElement(IReadOnlyList metadatavalues, IReadOnlyList data) - { - Metadatavalues = metadatavalues; - Data = data; - } - /// An array of data points representing the metric values. This is only returned if a result type of data is specified. - public IReadOnlyList Data { get; } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs deleted file mode 100644 index b8b3133515251..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Monitor.Query.Models -{ - /// Model factory for read-only models. - public static partial class QueryModelFactory - { - /// Initializes a new instance of LogsQueryResultColumn. - /// The name of this column. - /// The data type of this column. - /// A new instance for mocking. - public static LogsQueryResultColumn LogsQueryResultColumn(string name = null, LogsColumnType type = default) - { - return new LogsQueryResultColumn(name, type); - } - - /// Initializes a new instance of MetricAvailability. - /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - /// A new instance for mocking. - public static MetricAvailability MetricAvailability(TimeSpan? timeGrain = null, TimeSpan? retention = null) - { - return new MetricAvailability(timeGrain, retention); - } - - /// Initializes a new instance of MetricValue. - /// the timestamp for the metric value in ISO 8601 format. - /// the average value in the time range. - /// the least value in the time range. - /// the greatest value in the time range. - /// the sum of all of the values in the time range. - /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - /// A new instance for mocking. - public static MetricValue MetricValue(DateTimeOffset timeStamp = default, double? average = null, double? minimum = null, double? maximum = null, double? total = null, double? count = null) - { - return new MetricValue(timeStamp, average, minimum, maximum, total, count); - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs deleted file mode 100644 index 0718ed2f1492f..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Monitor.Query.Models; - -namespace Azure.Monitor.Query -{ - internal partial class QueryRestClient - { - private Uri endpoint; - private ClientDiagnostics _clientDiagnostics; - private HttpPipeline _pipeline; - - /// Initializes a new instance of QueryRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// server parameter. - public QueryRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) - { - this.endpoint = endpoint ?? new Uri("https://api.loganalytics.io/v1"); - _clientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - } - - internal HttpMessage CreateGetRequest(string workspaceId, string query, TimeSpan? timespan) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/query", false); - uri.AppendQuery("query", query, true); - if (timespan != null) - { - uri.AppendQuery("timespan", timespan.Value, "P", true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Executes an Analytics query for data. - /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - /// The cancellation token to use. - /// or is null. - public async Task> GetAsync(string workspaceId, string query, TimeSpan? timespan = null, CancellationToken cancellationToken = default) - { - if (workspaceId == null) - { - throw new ArgumentNullException(nameof(workspaceId)); - } - if (query == null) - { - throw new ArgumentNullException(nameof(query)); - } - - using var message = CreateGetRequest(workspaceId, query, timespan); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LogsQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Executes an Analytics query for data. - /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - /// The cancellation token to use. - /// or is null. - public Response Get(string workspaceId, string query, TimeSpan? timespan = null, CancellationToken cancellationToken = default) - { - if (workspaceId == null) - { - throw new ArgumentNullException(nameof(workspaceId)); - } - if (query == null) - { - throw new ArgumentNullException(nameof(query)); - } - - using var message = CreateGetRequest(workspaceId, query, timespan); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LogsQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateExecuteRequest(string workspaceId, QueryBody body, string prefer) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/workspaces/", false); - uri.AppendPath(workspaceId, true); - uri.AppendPath("/query", false); - request.Uri = uri; - if (prefer != null) - { - request.Headers.Add("Prefer", prefer); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - /// Optional. The prefer header to set server timeout, query statistics and visualization information. - /// The cancellation token to use. - /// or is null. - public async Task> ExecuteAsync(string workspaceId, QueryBody body, string prefer = null, CancellationToken cancellationToken = default) - { - if (workspaceId == null) - { - throw new ArgumentNullException(nameof(workspaceId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateExecuteRequest(workspaceId, body, prefer); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LogsQueryResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - /// Optional. The prefer header to set server timeout, query statistics and visualization information. - /// The cancellation token to use. - /// or is null. - public Response Execute(string workspaceId, QueryBody body, string prefer = null, CancellationToken cancellationToken = default) - { - if (workspaceId == null) - { - throw new ArgumentNullException(nameof(workspaceId)); - } - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateExecuteRequest(workspaceId, body, prefer); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LogsQueryResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - - internal HttpMessage CreateBatchRequest(BatchRequest body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(endpoint); - uri.AppendPath("/$batch", false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - return message; - } - - /// Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - /// The batch request body. - /// The cancellation token to use. - /// is null. - public async Task> BatchAsync(BatchRequest body, CancellationToken cancellationToken = default) - { - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateBatchRequest(body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - LogsBatchQueryResults value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = LogsBatchQueryResults.DeserializeLogsBatchQueryResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); - } - } - - /// Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - /// The batch request body. - /// The cancellation token to use. - /// is null. - public Response Batch(BatchRequest body, CancellationToken cancellationToken = default) - { - if (body == null) - { - throw new ArgumentNullException(nameof(body)); - } - - using var message = CreateBatchRequest(body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - LogsBatchQueryResults value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = LogsBatchQueryResults.DeserializeLogsBatchQueryResults(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw _clientDiagnostics.CreateRequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs index 04446142e4cfc..540aa2070f02b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs @@ -38,7 +38,7 @@ public class MetricsQueryOptions /// /// Gets or sets the filter that is used to refine the set of metric data returned. /// - /// Metric contains metadata A, B and C.
+ /// MetricResult contains metadata A, B and C.
///
/// - Return all time series of C where A = a1 and B = b1 or b2:
/// A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'
diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs index 2f85bec243765..3e6171fff2858 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs @@ -59,7 +59,7 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); + array.Add(LogsTable.DeserializeLogsTable(item)); } tables = array; continue; @@ -78,4 +78,4 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement return new LogsBatchQueryResult(tables, statistics, render, error); } } -} \ No newline at end of file +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResult.cs similarity index 100% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResult.cs diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs similarity index 78% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs index 3b3c9194c764d..a563dd0d36bd3 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs @@ -11,7 +11,7 @@ namespace Azure.Monitor.Query.Models [CodeGenModel("Table")] public partial class LogsTable { - private IReadOnlyList _rows; + private IReadOnlyList _rows; [CodeGenMember("Rows")] private JsonElement InternalRows { get; } @@ -19,9 +19,9 @@ public partial class LogsTable /// /// Gets the rows of the result table. /// - public IReadOnlyList Rows => _rows ??= CreateRows(); + public IReadOnlyList Rows => _rows ??= CreateRows(); - private IReadOnlyList CreateRows() + private IReadOnlyList CreateRows() { Dictionary columnDictionary = new(); @@ -30,11 +30,11 @@ private IReadOnlyList CreateRows() columnDictionary[Columns[index].Name] = index; } - List rows = new List(); + List rows = new List(); foreach (var row in InternalRows.EnumerateArray()) { - rows.Add(new LogsQueryResultRow(columnDictionary, Columns, row)); + rows.Add(new LogsTableRow(columnDictionary, Columns, row)); } return rows; @@ -55,4 +55,4 @@ public override string ToString() return $"{Name}: {Rows.Count} rows, {Columns.Count} columns"; } } -} \ No newline at end of file +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs similarity index 97% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs index 97b0aaad6546b..b21f51f2bdf50 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs @@ -12,13 +12,14 @@ namespace Azure.Monitor.Query.Models /// /// Represents a row in the table of results returned from the logs query. /// - public class LogsQueryResultRow + [CodeGenModel("LogsQueryResultRow")] + public class LogsTableRow { private readonly Dictionary _columnMap; - private readonly IReadOnlyList _columns; + private readonly IReadOnlyList _columns; private readonly JsonElement _row; - internal LogsQueryResultRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) + internal LogsTableRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) { _columnMap = columnMap; _columns = columns; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs index 5037746176c6a..7878b4e84dfdc 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs @@ -6,7 +6,7 @@ namespace Azure.Monitor.Query.Models { - public partial class Metric + public partial class MetricResult { private const string SuccessErrorCode = "Success"; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs index da44b85ef36d1..bb182b2c96ec5 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs @@ -14,7 +14,7 @@ public partial class MetricsQueryResult /// Metrics returned as the result of the query. [CodeGenMember("Value")] - public IReadOnlyList Metrics { get; } + public IReadOnlyList Metrics { get; } /// /// The timespan for which the data was retrieved. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs index 0e1796323e3df..84d315912949a 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs @@ -6,7 +6,7 @@ namespace Azure.Monitor.Query.Models { [CodeGenModel("Column")] - public partial class LogsQueryResultColumn + public partial class LogsTableColumn { /// public override string ToString() diff --git a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs index 390e37022ebbd..40c34c4bb91d8 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs @@ -8,5 +8,5 @@ [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Insights")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.Metric")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.MetricResult")] [assembly: SuppressMessage("Usage", "AZC0014:Types from System.Text.Json, Newtonsoft.Json, System.Collections.Immutable assemblies should not be exposed as part of public API surface.", Justification = "")] diff --git a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs index 4181f3e457c8d..570d9667b9644 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs @@ -7,7 +7,7 @@ namespace Azure.Monitor.Query { - internal class RowBinder: TypeBinder + internal class RowBinder: TypeBinder { internal static RowBinder Shared = new(); internal IReadOnlyList BindResults(IReadOnlyList tables) @@ -45,12 +45,12 @@ internal IReadOnlyList BindResults(IReadOnlyList tables) return results; } - protected override void Set(LogsQueryResultRow destination, T value, BoundMemberInfo memberInfo) + protected override void Set(LogsTableRow destination, T value, BoundMemberInfo memberInfo) { throw new NotSupportedException(); } - protected override bool TryGet(BoundMemberInfo memberInfo, LogsQueryResultRow source, out T value) + protected override bool TryGet(BoundMemberInfo memberInfo, LogsTableRow source, out T value) { int column; diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs index 117d2f6807669..390469173877e 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs @@ -240,7 +240,7 @@ public async Task CanQueryAllSupportedTypes() "dynamic({\"a\":123, \"b\":\"hello\", \"c\":[1,2,3], \"d\":{}})" + "]", _logsTestData.DataTimeRange); - LogsQueryResultRow row = results.Value.Table.Rows[0]; + LogsTableRow row = results.Value.Table.Rows[0]; var expectedDate = DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"); Assert.AreEqual(expectedDate, row.GetDateTimeOffset("DateTime")); From 18b1d299f1aecd7a60e368a1e2aa5337551d4eac Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Tue, 24 Aug 2021 00:32:05 -0700 Subject: [PATCH 3/6] Revert "wip" This reverts commit 81ff204d352b1446fe88903f50394e250515bcd8. --- .../src/Generated/CodeModel.yaml | 9461 ----------------- .../src/Generated/Configuration.json | 9 - .../Generated/MetricDefinitionsRestClient.cs | 112 + .../Generated/MetricNamespacesRestClient.cs | 112 + .../src/Generated/MetricsRestClient.cs | 176 + .../Models/BatchQueryRequest.Serialization.cs | 48 + .../src/Generated/Models/BatchQueryRequest.cs | 56 + .../BatchQueryResponse.Serialization.cs | 68 + .../Generated/Models/BatchQueryResponse.cs | 40 + .../Models/BatchRequest.Serialization.cs | 28 + .../src/Generated/Models/BatchRequest.cs | 33 + .../Models/ErrorDetail.Serialization.cs | 75 + .../src/Generated/Models/ErrorDetail.cs | 67 + .../Models/ErrorInfo.Serialization.cs | 74 + .../src/Generated/Models/ErrorInfo.cs | 63 + .../Models/ErrorResponse.Serialization.cs | 29 + .../src/Generated/Models/ErrorResponse.cs | 31 + ...rrorResponseAutoGenerated.Serialization.cs | 35 + .../Models/ErrorResponseAutoGenerated.cs | 32 + .../Models/LocalizableString.Serialization.cs | 35 + .../src/Generated/Models/LocalizableString.cs | 42 + .../LogsBatchQueryResult.Serialization.cs | 17 + .../Generated/Models/LogsBatchQueryResult.cs | 37 + .../LogsBatchQueryResults.Serialization.cs | 40 + .../Generated/Models/LogsBatchQueryResults.cs | 29 + .../src/Generated/Models/LogsColumnType.cs | 75 + .../Models/LogsQueryResult.Serialization.cs | 53 + .../src/Generated/Models/LogsQueryResult.cs | 44 + .../LogsQueryResultColumn.Serialization.cs | 35 + .../Generated/Models/LogsQueryResultColumn.cs | 35 + .../LogsQueryResultTable.Serialization.cs | 47 + .../Generated/Models/LogsQueryResultTable.cs | 57 + .../Generated/Models/MetadataApplication.cs | 57 + .../Models/MetadataApplicationRelated.cs | 28 + .../src/Generated/Models/MetadataCategory.cs | 43 + .../Models/MetadataCategoryRelated.cs | 37 + .../Models/MetadataColumnDataType.cs | 75 + .../src/Generated/Models/MetadataFunction.cs | 59 + .../Models/MetadataFunctionRelated.cs | 37 + .../Generated/Models/MetadataPermissions.cs | 40 + .../MetadataPermissionsApplicationsItem.cs | 31 + .../MetadataPermissionsResourcesItem.cs | 36 + .../MetadataPermissionsWorkspacesItem.cs | 36 + .../src/Generated/Models/MetadataQuery.cs | 54 + .../Generated/Models/MetadataQueryRelated.cs | 34 + .../Generated/Models/MetadataResourceType.cs | 54 + .../Models/MetadataResourceTypeRelated.cs | 40 + .../src/Generated/Models/MetadataResults.cs | 52 + .../src/Generated/Models/MetadataSolution.cs | 55 + .../Models/MetadataSolutionRelated.cs | 46 + .../src/Generated/Models/MetadataTable.cs | 57 + .../Models/MetadataTableColumnsItem.cs | 41 + .../Generated/Models/MetadataTableRelated.cs | 40 + .../Models/MetadataValue.Serialization.cs | 40 + .../src/Generated/Models/MetadataValue.cs | 32 + .../src/Generated/Models/MetadataWorkspace.cs | 57 + .../Models/MetadataWorkspaceRelated.cs | 37 + .../Generated/Models/Metric.Serialization.cs | 77 + .../src/Generated/Models/Metric.cs | 80 + .../MetricAggregationType.Serialization.cs | 36 + .../MetricAvailability.Serialization.cs | 46 + .../Generated/Models/MetricAvailability.cs | 36 + .../src/Generated/Models/MetricClass.cs | 60 + .../Models/MetricDefinition.Serialization.cs | 157 + .../src/Generated/Models/MetricDefinition.cs | 78 + ...etricDefinitionCollection.Serialization.cs | 35 + .../Models/MetricDefinitionCollection.cs | 40 + .../Models/MetricNamespace.Serialization.cs | 63 + .../src/Generated/Models/MetricNamespace.cs | 42 + ...MetricNamespaceCollection.Serialization.cs | 35 + .../Models/MetricNamespaceCollection.cs | 40 + .../MetricNamespaceName.Serialization.cs | 29 + .../Generated/Models/MetricNamespaceName.cs | 28 + .../src/Generated/Models/MetricUnit.cs | 84 + .../Models/MetricValue.Serialization.cs | 85 + .../src/Generated/Models/MetricValue.cs | 52 + .../MetricsQueryResult.Serialization.cs | 76 + .../Generated/Models/MetricsQueryResult.cs | 60 + .../Models/NamespaceClassification.cs | 54 + .../Models/QueryBody.Serialization.cs | 38 + .../src/Generated/Models/QueryBody.cs | 36 + .../Models/ResultType.Serialization.cs | 28 + .../Models/TimeSeriesElement.Serialization.cs | 56 + .../src/Generated/Models/TimeSeriesElement.cs | 34 + .../src/Generated/QueryModelFactory.cs | 46 + .../src/Generated/QueryRestClient.cs | 282 + .../src/MetricsQueryOptions.cs | 2 +- .../src/Models/LogsBatchQueryResult.cs | 4 +- ...{LogsTableRow.cs => LogsQueryResultRow.cs} | 7 +- .../{LogsTable.cs => LogsQueryResultTable.cs} | 12 +- ...LogsQueryResult.cs => LogsQueryResults.cs} | 0 .../Azure.Monitor.Query/src/Models/Metric.cs | 2 +- .../src/Models/MetricsQueryResult.cs | 2 +- .../src/Models/QueryResultColumn.cs | 2 +- .../src/Properties/AssemblyInfo.cs | 2 +- .../Azure.Monitor.Query/src/RowBinder.cs | 6 +- .../tests/LogsQueryClientClientLiveTests.cs | 2 +- 97 files changed, 4576 insertions(+), 9491 deletions(-) delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml delete mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs create mode 100644 sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsTableRow.cs => LogsQueryResultRow.cs} (97%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsTable.cs => LogsQueryResultTable.cs} (78%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResult.cs => LogsQueryResults.cs} (100%) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml b/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml deleted file mode 100644 index ca1320e32337e..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/CodeModel.yaml +++ /dev/null @@ -1,9461 +0,0 @@ -!CodeModel -info: !Info - description: This API exposes Azure Log Analytics query capabilities - contact: - name: AIAPI Team - email: aiapi@microsoft.com - url: https://dev.loganalytics.io/support - license: - name: Microsoft - url: https://dev.loganalytics.io/license - termsOfService: https://dev.loganalytics.io/tos - title: Query -schemas: !Schemas - booleans: - - !BooleanSchema &ref_32 - type: boolean - language: !Languages - default: - name: Boolean - description: Flag to indicate whether the dimension is required. - protocol: !Protocols {} - - !BooleanSchema &ref_114 - type: boolean - language: !Languages - default: - name: Boolean - description: A flag indicating this column is a preferred facet - protocol: !Protocols {} - numbers: - - !NumberSchema &ref_28 - type: integer - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - precision: 32 - language: !Languages - default: - name: BatchQueryResponseStatus - description: '' - protocol: !Protocols {} - - !NumberSchema &ref_283 - type: integer - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 32 - language: !Languages - default: - name: Integer - description: '' - protocol: !Protocols {} - - !NumberSchema &ref_50 - type: integer - apiVersions: - - !ApiVersion - version: '2018-01-01' - minimum: 0 - precision: 32 - language: !Languages - default: - name: ResponseCost - description: The integer value representing the relative cost of the query. - protocol: !Protocols {} - - !NumberSchema &ref_62 - type: number - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 64 - language: !Languages - default: - name: MetricValueAverage - description: the average value in the time range. - protocol: !Protocols {} - - !NumberSchema &ref_63 - type: number - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 64 - language: !Languages - default: - name: MetricValueMinimum - description: the least value in the time range. - protocol: !Protocols {} - - !NumberSchema &ref_64 - type: number - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 64 - language: !Languages - default: - name: MetricValueMaximum - description: the greatest value in the time range. - protocol: !Protocols {} - - !NumberSchema &ref_65 - type: number - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 64 - language: !Languages - default: - name: MetricValueTotal - description: the sum of all of the values in the time range. - protocol: !Protocols {} - - !NumberSchema &ref_66 - type: number - apiVersions: - - !ApiVersion - version: '2018-01-01' - precision: 64 - language: !Languages - default: - name: MetricValueCount - description: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - protocol: !Protocols {} - strings: - - !StringSchema &ref_0 - type: string - language: !Languages - default: - name: String - description: simple string - protocol: !Protocols {} - - !StringSchema &ref_1 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - - !StringSchema &ref_2 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: TableName - description: The name of the table. - protocol: !Protocols {} - - !StringSchema &ref_3 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ColumnName - description: The name of this column. - protocol: !Protocols {} - - !StringSchema &ref_8 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorInfoCode - description: A machine readable error code. - protocol: !Protocols {} - - !StringSchema &ref_9 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorInfoMessage - description: A human readable error message. - protocol: !Protocols {} - - !StringSchema &ref_10 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorDetailCode - description: The error's code. - protocol: !Protocols {} - - !StringSchema &ref_11 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorDetailMessage - description: A human readable error message. - protocol: !Protocols {} - - !StringSchema &ref_12 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorDetailTarget - description: Indicates which property in the request is responsible for the error. - protocol: !Protocols {} - - !StringSchema &ref_13 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorDetailValue - description: Indicates which value in 'target' is responsible for the error. - protocol: !Protocols {} - - !StringSchema &ref_14 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: ErrorDetailResourcesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_17 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: QueryParam - description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - protocol: !Protocols {} - - !StringSchema &ref_18 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: TimespanParam - description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - protocol: !Protocols {} - - !StringSchema &ref_19 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: WorkspacesParamItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_20 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: BatchQueryRequestId - description: The error details. - protocol: !Protocols {} - - !StringSchema &ref_25 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: BatchQueryRequestWorkspace - description: Workspace Id to be included in the query - protocol: !Protocols {} - - !StringSchema &ref_27 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: BatchQueryResponseId - description: '' - protocol: !Protocols {} - - !StringSchema &ref_275 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - - !StringSchema &ref_277 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - - !StringSchema &ref_33 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDefinitionResourceId - description: the resource identifier of the resource that emitted the metric. - protocol: !Protocols {} - - !StringSchema &ref_34 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDefinitionNamespace - description: the namespace the metric belongs to. - protocol: !Protocols {} - - !StringSchema &ref_35 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: LocalizableStringValue - description: the invariant value. - protocol: !Protocols {} - - !StringSchema &ref_36 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: LocalizableStringLocalizedValue - description: the locale specific value. - protocol: !Protocols {} - - !StringSchema &ref_37 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDefinitionDisplayDescription - description: Detailed description of this metric. - protocol: !Protocols {} - - !StringSchema &ref_38 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDefinitionCategory - description: Custom category name for this metric. - protocol: !Protocols {} - - !StringSchema &ref_44 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDefinitionId - description: the resource identifier of the metric definition. - protocol: !Protocols {} - - !StringSchema &ref_48 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: ErrorResponseCode - description: Error code - protocol: !Protocols {} - - !StringSchema &ref_49 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: ErrorResponseMessage - description: Error message indicating why the operation failed. - protocol: !Protocols {} - - !StringSchema &ref_51 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: ResponseTimespan - description: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. - protocol: !Protocols {} - - !StringSchema &ref_53 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: ResponseNamespace - description: The namespace of the metrics being queried - protocol: !Protocols {} - - !StringSchema &ref_54 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: ResponseResourceregion - description: The region of the resource being queried for metrics. - protocol: !Protocols {} - - !StringSchema &ref_55 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricId - description: the metric Id. - protocol: !Protocols {} - - !StringSchema &ref_56 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricType - description: the resource type of the metric resource. - protocol: !Protocols {} - - !StringSchema &ref_57 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricDisplayDescription - description: Detailed description of this metric. - protocol: !Protocols {} - - !StringSchema &ref_58 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricErrorCode - description: '''Success'' or the error details on query failures for this metric.' - protocol: !Protocols {} - - !StringSchema &ref_59 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricErrorMessage - description: Error message encountered querying this specific metric. - protocol: !Protocols {} - - !StringSchema &ref_60 - type: string - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetadataValue - description: the value of the metadata. - protocol: !Protocols {} - - !StringSchema &ref_297 - type: string - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - - !StringSchema &ref_71 - type: string - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: MetricNamespaceId - description: The ID of the metric namespace. - protocol: !Protocols {} - - !StringSchema &ref_72 - type: string - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: MetricNamespaceType - description: The type of the namespace. - protocol: !Protocols {} - - !StringSchema &ref_73 - type: string - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: MetricNamespaceName - description: The escaped name of the namespace. - protocol: !Protocols {} - - !StringSchema &ref_75 - type: string - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - language: !Languages - default: - name: MetricNamespaceNameMetricNamespaceName - description: The metric namespace name. - protocol: !Protocols {} - - !StringSchema - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - defaultValue: '' - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - - !StringSchema &ref_78 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryId - description: The ID of the category - protocol: !Protocols {} - - !StringSchema &ref_79 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryDisplayName - description: The display name of the category - protocol: !Protocols {} - - !StringSchema &ref_80 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryDescription - description: The description of the category - protocol: !Protocols {} - - !StringSchema &ref_81 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_82 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_83 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryRelatedResourceTypesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_84 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryRelatedQueriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_85 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataCategoryRelatedSolutionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_86 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeId - description: The ID of the resource-type - protocol: !Protocols {} - - !StringSchema &ref_87 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceType - description: The type of the resource-type - protocol: !Protocols {} - - !StringSchema &ref_88 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeDisplayName - description: The display name of the resource-type - protocol: !Protocols {} - - !StringSchema &ref_89 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeDescription - description: The description of the resource-type - protocol: !Protocols {} - - !StringSchema &ref_90 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeLabelsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_91 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_92 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_93 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedCategoriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_94 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedQueriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_95 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedWorkspacesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_96 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataResourceTypeRelatedResourcesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_97 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionId - description: The ID of the Log Analytics solution - protocol: !Protocols {} - - !StringSchema &ref_98 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionName - description: The name of the Log Analytics solution - protocol: !Protocols {} - - !StringSchema &ref_99 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionDisplayName - description: The display name of the Log Analytics solution - protocol: !Protocols {} - - !StringSchema &ref_100 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionDescription - description: The description of the Log Analytics solution - protocol: !Protocols {} - - !StringSchema &ref_101 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_102 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_103 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionRelatedCategoriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_104 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionRelatedQueriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_105 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataSolutionRelatedWorkspacesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_106 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableId - description: The ID of the table - protocol: !Protocols {} - - !StringSchema &ref_107 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableName - description: The name of the table - protocol: !Protocols {} - - !StringSchema &ref_108 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableDescription - description: The description of the table - protocol: !Protocols {} - - !StringSchema &ref_109 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableTimespanColumn - description: The column associated with the timespan query parameter for the table - protocol: !Protocols {} - - !StringSchema &ref_110 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableLabelsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_111 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableColumnsItemName - description: The name of the column - protocol: !Protocols {} - - !StringSchema &ref_112 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableColumnsItemDescription - description: The description of the column - protocol: !Protocols {} - - !StringSchema &ref_115 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedCategoriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_116 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedSolutionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_117 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedResourceTypesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_118 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedWorkspacesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_119 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_120 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataTableRelatedQueriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_121 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionId - description: The ID of the function. - protocol: !Protocols {} - - !StringSchema &ref_122 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionName - description: The name of the function, to be used in queries. - protocol: !Protocols {} - - !StringSchema &ref_123 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionParameters - description: The parameters/arguments of the function, if any. - protocol: !Protocols {} - - !StringSchema &ref_124 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionDisplayName - description: The display name of the function. - protocol: !Protocols {} - - !StringSchema &ref_125 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionDescription - description: The description of the function. - protocol: !Protocols {} - - !StringSchema &ref_126 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionBody - description: The KQL body of the function. - protocol: !Protocols {} - - !StringSchema &ref_127 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_128 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionRelatedSolutionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_129 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionRelatedResourceTypesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_130 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionRelatedCategoriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_131 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataFunctionRelatedWorkspacesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_132 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryId - description: The ID of the query. - protocol: !Protocols {} - - !StringSchema &ref_133 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryDisplayName - description: The display name of the query. - protocol: !Protocols {} - - !StringSchema &ref_134 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryDescription - description: The description of the query. - protocol: !Protocols {} - - !StringSchema &ref_135 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryBody - description: The KQL body of the query. - protocol: !Protocols {} - - !StringSchema &ref_136 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryLabelsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_137 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryRelatedCategoriesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_138 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryRelatedSolutionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_139 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryRelatedResourceTypesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_140 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataQueryRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_141 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationId - description: The ID of the Application Insights app. - protocol: !Protocols {} - - !StringSchema &ref_142 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationResourceId - description: The ARM resource ID of the Application Insights app. - protocol: !Protocols {} - - !StringSchema &ref_143 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationName - description: The name of the Application Insights app. - protocol: !Protocols {} - - !StringSchema &ref_144 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationRegion - description: The Azure region of the Application Insights app. - protocol: !Protocols {} - - !StringSchema &ref_145 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_146 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataApplicationRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_147 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceId - description: The ID of the Log Analytics workspace. - protocol: !Protocols {} - - !StringSchema &ref_148 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceResourceId - description: The ARM resource ID of the Log Analytics workspace. - protocol: !Protocols {} - - !StringSchema &ref_149 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceName - description: The name of the Log Analytics workspace. - protocol: !Protocols {} - - !StringSchema &ref_150 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRegion - description: The Azure region of the Log Analytics workspace. - protocol: !Protocols {} - - !StringSchema &ref_151 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRelatedTablesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_152 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRelatedSolutionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_153 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRelatedResourceTypesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_154 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRelatedFunctionsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_155 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataWorkspaceRelatedResourcesItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_157 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataPermissionsWorkspacesItemResourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - - !StringSchema &ref_158 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataPermissionsWorkspacesPropertiesItemsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_159 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataPermissionsResourcesItemResourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - - !StringSchema &ref_160 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataPermissionsResourcesPropertiesItemsItem - description: '' - protocol: !Protocols {} - - !StringSchema &ref_161 - type: string - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: MetadataPermissionsApplicationsItemResourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - - !StringSchema - type: string - apiVersions: - - !ApiVersion - version: '2.0' - minLength: 1 - language: !Languages - default: - name: String - description: '' - protocol: !Protocols {} - choices: - - !ChoiceSchema &ref_4 - choices: - - !ChoiceValue - value: bool - language: - default: - name: Bool - description: '' - - !ChoiceValue - value: datetime - language: - default: - name: Datetime - description: '' - - !ChoiceValue - value: dynamic - language: - default: - name: Dynamic - description: '' - - !ChoiceValue - value: int - language: - default: - name: Int - description: '' - - !ChoiceValue - value: long - language: - default: - name: Long - description: '' - - !ChoiceValue - value: real - language: - default: - name: Real - description: '' - - !ChoiceValue - value: string - language: - default: - name: String - description: '' - - !ChoiceValue - value: guid - language: - default: - name: Guid - description: '' - - !ChoiceValue - value: decimal - language: - default: - name: Decimal - description: '' - - !ChoiceValue - value: timespan - language: - default: - name: Timespan - description: '' - type: choice - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - choiceType: *ref_0 - language: !Languages - default: - name: LogsColumnType - description: The data type of this column. - protocol: !Protocols {} - - !ChoiceSchema &ref_39 - choices: - - !ChoiceValue - value: Availability - language: - default: - name: Availability - description: '' - - !ChoiceValue - value: Transactions - language: - default: - name: Transactions - description: '' - - !ChoiceValue - value: Errors - language: - default: - name: Errors - description: '' - - !ChoiceValue - value: Latency - language: - default: - name: Latency - description: '' - - !ChoiceValue - value: Saturation - language: - default: - name: Saturation - description: '' - type: choice - apiVersions: - - !ApiVersion - version: '2018-01-01' - choiceType: *ref_0 - language: !Languages - default: - name: MetricClass - description: The class of the metric. - protocol: !Protocols {} - - !ChoiceSchema &ref_40 - choices: - - !ChoiceValue - value: Count - language: - default: - name: Count - description: '' - - !ChoiceValue - value: Bytes - language: - default: - name: Bytes - description: '' - - !ChoiceValue - value: Seconds - language: - default: - name: Seconds - description: '' - - !ChoiceValue - value: CountPerSecond - language: - default: - name: CountPerSecond - description: '' - - !ChoiceValue - value: BytesPerSecond - language: - default: - name: BytesPerSecond - description: '' - - !ChoiceValue - value: Percent - language: - default: - name: Percent - description: '' - - !ChoiceValue - value: MilliSeconds - language: - default: - name: MilliSeconds - description: '' - - !ChoiceValue - value: ByteSeconds - language: - default: - name: ByteSeconds - description: '' - - !ChoiceValue - value: Unspecified - language: - default: - name: Unspecified - description: '' - - !ChoiceValue - value: Cores - language: - default: - name: Cores - description: '' - - !ChoiceValue - value: MilliCores - language: - default: - name: MilliCores - description: '' - - !ChoiceValue - value: NanoCores - language: - default: - name: NanoCores - description: '' - - !ChoiceValue - value: BitsPerSecond - language: - default: - name: BitsPerSecond - description: '' - type: choice - apiVersions: - - !ApiVersion - version: '2018-01-01' - choiceType: *ref_0 - language: !Languages - default: - name: MetricUnit - description: The unit of the metric. - protocol: !Protocols {} - - !ChoiceSchema &ref_74 - choices: - - !ChoiceValue - value: Platform - language: - default: - name: Platform - description: '' - - !ChoiceValue - value: Custom - language: - default: - name: Custom - description: '' - - !ChoiceValue - value: Qos - language: - default: - name: Qos - description: '' - type: choice - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - choiceType: *ref_0 - language: !Languages - default: - name: NamespaceClassification - description: Kind of namespace - protocol: !Protocols {} - - !ChoiceSchema &ref_113 - choices: - - !ChoiceValue - value: bool - language: - default: - name: Bool - description: '' - - !ChoiceValue - value: datetime - language: - default: - name: Datetime - description: '' - - !ChoiceValue - value: dynamic - language: - default: - name: Dynamic - description: '' - - !ChoiceValue - value: int - language: - default: - name: Int - description: '' - - !ChoiceValue - value: long - language: - default: - name: Long - description: '' - - !ChoiceValue - value: real - language: - default: - name: Real - description: '' - - !ChoiceValue - value: string - language: - default: - name: String - description: '' - - !ChoiceValue - value: guid - language: - default: - name: Guid - description: '' - - !ChoiceValue - value: decimal - language: - default: - name: Decimal - description: '' - - !ChoiceValue - value: timespan - language: - default: - name: Timespan - description: '' - type: choice - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - choiceType: *ref_0 - language: !Languages - default: - name: MetadataColumnDataType - description: The data type of the column - protocol: !Protocols {} - sealedChoices: - - !SealedChoiceSchema &ref_41 - choices: - - !ChoiceValue - value: None - language: - default: - name: None - description: '' - - !ChoiceValue - value: Average - language: - default: - name: Average - description: '' - - !ChoiceValue - value: Count - language: - default: - name: Count - description: '' - - !ChoiceValue - value: Minimum - language: - default: - name: Minimum - description: '' - - !ChoiceValue - value: Maximum - language: - default: - name: Maximum - description: '' - - !ChoiceValue - value: Total - language: - default: - name: Total - description: '' - type: sealed-choice - apiVersions: - - !ApiVersion - version: '2018-01-01' - choiceType: *ref_0 - language: !Languages - default: - name: AggregationType - description: the aggregation type of the metric. - protocol: !Protocols {} - - !SealedChoiceSchema &ref_284 - choices: - - !ChoiceValue - value: Data - language: - default: - name: Data - description: '' - - !ChoiceValue - value: Metadata - language: - default: - name: Metadata - description: '' - type: sealed-choice - apiVersions: - - !ApiVersion - version: '2018-01-01' - choiceType: *ref_0 - language: !Languages - default: - name: ResultType - description: '' - protocol: !Protocols {} - constants: - - !ConstantSchema &ref_261 - type: constant - value: !ConstantValue - value: application/json - valueType: *ref_0 - language: !Languages - default: - name: Accept - description: 'Accept: application/json' - protocol: !Protocols {} - - !ConstantSchema &ref_267 - type: constant - value: !ConstantValue - value: application/json - valueType: *ref_0 - language: !Languages - default: - name: ApplicationJson - description: Content Type 'application/json' - protocol: !Protocols {} - - !ConstantSchema &ref_23 - type: constant - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - value: !ConstantValue - value: /query - valueType: *ref_0 - language: !Languages - default: - name: BatchQueryRequestPath - description: '' - protocol: !Protocols {} - - !ConstantSchema &ref_24 - type: constant - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - value: !ConstantValue - value: POST - valueType: *ref_0 - language: !Languages - default: - name: BatchQueryRequestMethod - description: '' - protocol: !Protocols {} - - !ConstantSchema &ref_276 - type: constant - value: !ConstantValue - value: '2018-01-01' - valueType: *ref_0 - language: !Languages - default: - name: ApiVersion201801 - description: Api Version (2018-01-01) - protocol: !Protocols {} - - !ConstantSchema &ref_296 - type: constant - value: !ConstantValue - value: 2017-12-01-preview - valueType: *ref_0 - language: !Languages - default: - name: ApiVersion20171201Preview - description: Api Version (2017-12-01-preview) - protocol: !Protocols {} - dictionaries: - - !DictionarySchema &ref_21 - type: dictionary - elementType: *ref_1 - language: !Languages - default: - name: BatchQueryRequestHeaders - description: Dictionary of - protocol: !Protocols {} - - !DictionarySchema &ref_29 - type: dictionary - elementType: *ref_1 - language: !Languages - default: - name: BatchQueryResponseHeaders - description: Dictionary of - protocol: !Protocols {} - any: - - !AnySchema &ref_156 - type: any - language: !Languages - default: - name: any - description: Anything - protocol: !Protocols {} - anyObjects: - - !AnyObjectSchema &ref_5 - type: any-object - language: !Languages - default: - name: AnyObject - description: Any object - protocol: !Protocols {} - dateTimes: - - !DateTimeSchema &ref_61 - type: date-time - format: date-time - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricValueTimeStamp - description: the timestamp for the metric value in ISO 8601 format. - protocol: !Protocols {} - durations: - - !DurationSchema &ref_260 - type: duration - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - language: !Languages - default: - name: Duration - description: '' - protocol: !Protocols {} - - !DurationSchema &ref_42 - type: duration - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricAvailabilityTimeGrain - description: the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - protocol: !Protocols {} - - !DurationSchema &ref_43 - type: duration - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: MetricAvailabilityRetention - description: the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - protocol: !Protocols {} - - !DurationSchema &ref_282 - type: duration - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: Duration - description: '' - protocol: !Protocols {} - - !DurationSchema &ref_52 - type: duration - apiVersions: - - !ApiVersion - version: '2018-01-01' - language: !Languages - default: - name: ResponseInterval - description: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. - protocol: !Protocols {} - objects: - - !ObjectSchema &ref_265 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_186 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_6 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_2 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the table. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_183 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_7 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_3 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of this column. - protocol: !Protocols {} - - !Property - schema: *ref_4 - required: true - serializedName: type - language: !Languages - default: - name: type - description: The data type of this column. - protocol: !Protocols {} - serializationFormats: - - json - summary: A table column. - usage: - - output - language: !Languages - default: - name: Column - description: A column in a table. - namespace: '' - summary: A table column. - protocol: !Protocols {} - language: !Languages - default: - name: TableColumns - description: The list of columns in this table. - protocol: !Protocols {} - required: true - serializedName: columns - language: !Languages - default: - name: columns - description: The list of columns in this table. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_185 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ArraySchema &ref_184 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_5 - language: !Languages - default: - name: TableRowsItem - description: Array of AnyObject - protocol: !Protocols {} - language: !Languages - default: - name: TableRows - description: The resulting rows from this query. - protocol: !Protocols {} - required: true - serializedName: rows - language: !Languages - default: - name: rows - description: The resulting rows from this query. - protocol: !Protocols {} - serializationFormats: - - json - summary: A query response table. - usage: - - output - language: !Languages - default: - name: Table - description: Contains the columns and rows for one table in a query response. - namespace: '' - summary: A query response table. - protocol: !Protocols {} - language: !Languages - default: - name: QueryResultsTables - description: The list of tables, columns and rows. - protocol: !Protocols {} - required: true - serializedName: tables - language: !Languages - default: - name: tables - description: The list of tables, columns and rows. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: statistics - language: !Languages - default: - name: statistics - description: Any object - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: render - language: !Languages - default: - name: render - description: Any object - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: error - language: !Languages - default: - name: error - description: Any object - protocol: !Protocols {} - serializationFormats: - - json - summary: A query response. - usage: - - output - language: !Languages - default: - name: QueryResults - description: Contains the tables, columns & rows resulting from a query. - namespace: '' - summary: A query response. - protocol: !Protocols {} - - *ref_6 - - *ref_7 - - !ObjectSchema &ref_266 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ObjectSchema &ref_15 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_8 - required: true - serializedName: code - language: !Languages - default: - name: code - description: A machine readable error code. - protocol: !Protocols {} - - !Property - schema: *ref_9 - required: true - serializedName: message - language: !Languages - default: - name: message - description: A human readable error message. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_188 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_16 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_10 - required: true - serializedName: code - language: !Languages - default: - name: code - description: The error's code. - protocol: !Protocols {} - - !Property - schema: *ref_11 - required: true - serializedName: message - language: !Languages - default: - name: message - description: A human readable error message. - protocol: !Protocols {} - - !Property - schema: *ref_12 - required: false - serializedName: target - language: !Languages - default: - name: target - description: Indicates which property in the request is responsible for the error. - protocol: !Protocols {} - - !Property - schema: *ref_13 - required: false - serializedName: value - language: !Languages - default: - name: value - description: Indicates which value in 'target' is responsible for the error. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_187 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_14 - language: !Languages - default: - name: ErrorDetailResources - description: Indicates resources which were responsible for the error. - protocol: !Protocols {} - required: false - serializedName: resources - language: !Languages - default: - name: resources - description: Indicates resources which were responsible for the error. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: additionalProperties - language: !Languages - default: - name: additionalProperties - description: Additional properties that can be provided on the error details object - protocol: !Protocols {} - serializationFormats: - - json - summary: Error details. - usage: - - exception - - output - language: !Languages - default: - name: ErrorDetail - description: Error details. - namespace: '' - summary: Error details. - protocol: !Protocols {} - language: !Languages - default: - name: ErrorInfoDetails - description: error details. - protocol: !Protocols {} - required: false - serializedName: details - language: !Languages - default: - name: details - description: error details. - protocol: !Protocols {} - - !Property - schema: *ref_15 - required: false - serializedName: innererror - language: !Languages - default: - name: innererror - description: Inner error details if they exist. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: additionalProperties - language: !Languages - default: - name: additionalProperties - description: Additional properties that can be provided on the error info object - protocol: !Protocols {} - serializationFormats: - - json - summary: The code and message for an error. - usage: - - exception - - output - language: !Languages - default: - name: ErrorInfo - description: The code and message for an error. - namespace: '' - summary: The code and message for an error. - protocol: !Protocols {} - required: true - serializedName: error - language: !Languages - default: - name: error - description: The error details. - protocol: !Protocols {} - serializationFormats: - - json - summary: Error details. - usage: - - exception - language: !Languages - default: - name: ErrorResponse - description: Contains details when the response code indicates an error. - namespace: '' - summary: Error details. - protocol: !Protocols {} - - *ref_15 - - *ref_16 - - !ObjectSchema &ref_22 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_17 - required: true - serializedName: query - language: !Languages - default: - name: query - description: The query to execute. - protocol: !Protocols {} - - !Property - schema: *ref_18 - required: false - serializedName: timespan - language: !Languages - default: - name: timespan - description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_189 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_19 - language: !Languages - default: - name: WorkspacesParam - description: Workspace names to include in cross-workspace queries. - protocol: !Protocols {} - required: false - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: A list of workspaces that are included in the query. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - input - language: !Languages - default: - name: QueryBody - description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - namespace: '' - protocol: !Protocols {} - - !ObjectSchema &ref_271 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_190 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_26 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_20 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The error details. - protocol: !Protocols {} - - !Property - schema: *ref_21 - required: false - serializedName: headers - language: !Languages - default: - name: headers - description: Dictionary of - protocol: !Protocols {} - - !Property - schema: *ref_22 - required: true - serializedName: body - language: !Languages - default: - name: body - description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - protocol: !Protocols {} - - !Property - schema: *ref_23 - required: false - serializedName: path - language: !Languages - default: - name: path - description: '' - protocol: !Protocols {} - - !Property - schema: *ref_24 - required: false - serializedName: method - language: !Languages - default: - name: method - description: '' - protocol: !Protocols {} - - !Property - schema: *ref_25 - required: true - serializedName: workspace - language: !Languages - default: - name: workspace - description: Workspace Id to be included in the query - protocol: !Protocols {} - serializationFormats: - - json - usage: - - input - language: !Languages - default: - name: BatchQueryRequest - description: An single request in a batch. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: BatchRequestRequests - description: An single request in a batch. - protocol: !Protocols {} - required: true - serializedName: requests - language: !Languages - default: - name: requests - description: An single request in a batch. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - input - language: !Languages - default: - name: BatchRequest - description: An array of requests. - namespace: '' - protocol: !Protocols {} - - *ref_26 - - !ObjectSchema &ref_273 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_192 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_30 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_27 - serializedName: id - language: !Languages - default: - name: id - description: '' - protocol: !Protocols {} - - !Property - schema: *ref_28 - serializedName: status - language: !Languages - default: - name: status - description: '' - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_31 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_191 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_6 - language: !Languages - default: - name: BatchQueryResultsTables - description: The list of tables, columns and rows. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The list of tables, columns and rows. - protocol: !Protocols {} - - !Property - schema: *ref_5 - serializedName: statistics - language: !Languages - default: - name: statistics - description: Statistics represented in JSON format. - protocol: !Protocols {} - - !Property - schema: *ref_5 - serializedName: render - language: !Languages - default: - name: render - description: Visualization data in JSON format. - protocol: !Protocols {} - - !Property - schema: *ref_15 - serializedName: error - language: !Languages - default: - name: error - description: The code and message for an error. - protocol: !Protocols {} - serializationFormats: - - json - summary: A query response for a single query in a batch. - usage: - - output - language: !Languages - default: - name: BatchQueryResults - description: Contains the tables, columns & rows resulting from a query. - namespace: '' - summary: A query response for a single query in a batch. - protocol: !Protocols {} - serializedName: body - language: !Languages - default: - name: body - description: Contains the tables, columns & rows resulting from a query. - protocol: !Protocols {} - - !Property - schema: *ref_29 - serializedName: headers - language: !Languages - default: - name: headers - description: Dictionary of - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: BatchQueryResponse - description: '' - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: BatchResponseResponses - description: An array of responses corresponding to each individual request in a batch. - protocol: !Protocols {} - serializedName: responses - language: !Languages - default: - name: responses - description: An array of responses corresponding to each individual request in a batch. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: BatchResponse - description: Response to a batch query. - namespace: '' - protocol: !Protocols {} - - *ref_30 - - *ref_31 - - !ObjectSchema &ref_280 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: !ArraySchema &ref_196 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_46 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_32 - serializedName: isDimensionRequired - language: !Languages - default: - name: isDimensionRequired - description: Flag to indicate whether the dimension is required. - protocol: !Protocols {} - - !Property - schema: *ref_33 - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: the resource identifier of the resource that emitted the metric. - protocol: !Protocols {} - - !Property - schema: *ref_34 - serializedName: namespace - language: !Languages - default: - name: namespace - description: the namespace the metric belongs to. - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_45 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_35 - required: true - serializedName: value - language: !Languages - default: - name: value - description: the invariant value. - protocol: !Protocols {} - - !Property - schema: *ref_36 - required: false - serializedName: localizedValue - language: !Languages - default: - name: localizedValue - description: the locale specific value. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: LocalizableString - description: The localizable string class. - namespace: '' - protocol: !Protocols {} - serializedName: name - language: !Languages - default: - name: name - description: the name and the display name of the metric, i.e. it is a localizable string. - protocol: !Protocols {} - - !Property - schema: *ref_37 - serializedName: displayDescription - language: !Languages - default: - name: displayDescription - description: Detailed description of this metric. - protocol: !Protocols {} - - !Property - schema: *ref_38 - serializedName: category - language: !Languages - default: - name: category - description: Custom category name for this metric. - protocol: !Protocols {} - - !Property - schema: *ref_39 - serializedName: metricClass - language: !Languages - default: - name: metricClass - description: The class of the metric. - protocol: !Protocols {} - - !Property - schema: *ref_40 - serializedName: unit - language: !Languages - default: - name: unit - description: The unit of the metric. - protocol: !Protocols {} - - !Property - schema: *ref_41 - serializedName: primaryAggregationType - language: !Languages - default: - name: primaryAggregationType - description: the primary aggregation type value defining how to use the values for display. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_193 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: *ref_41 - language: !Languages - default: - name: MetricDefinitionSupportedAggregationTypes - description: the collection of what aggregation types are supported. - protocol: !Protocols {} - serializedName: supportedAggregationTypes - language: !Languages - default: - name: supportedAggregationTypes - description: the collection of what aggregation types are supported. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_194 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_47 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_42 - serializedName: timeGrain - language: !Languages - default: - name: timeGrain - description: the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - protocol: !Protocols {} - - !Property - schema: *ref_43 - serializedName: retention - language: !Languages - default: - name: retention - description: the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricAvailability - description: Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetricDefinitionMetricAvailabilities - description: the collection of what aggregation intervals are available to be queried. - protocol: !Protocols {} - serializedName: metricAvailabilities - language: !Languages - default: - name: metricAvailabilities - description: the collection of what aggregation intervals are available to be queried. - protocol: !Protocols {} - - !Property - schema: *ref_44 - serializedName: id - language: !Languages - default: - name: id - description: the resource identifier of the metric definition. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_195 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: *ref_45 - language: !Languages - default: - name: MetricDefinitionDimensions - description: the name and the display name of the dimension, i.e. it is a localizable string. - protocol: !Protocols {} - serializedName: dimensions - language: !Languages - default: - name: dimensions - description: the name and the display name of the dimension, i.e. it is a localizable string. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricDefinition - description: Metric definition class specifies the metadata for a metric. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetricDefinitionCollectionValue - description: the values for the metric definitions. - protocol: !Protocols {} - required: true - serializedName: value - language: !Languages - default: - name: value - description: the values for the metric definitions. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricDefinitionCollection - description: Represents collection of metric definitions. - namespace: '' - protocol: !Protocols {} - - *ref_46 - - *ref_45 - - *ref_47 - - !ObjectSchema &ref_281 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - - !ApiVersion - version: 2017-12-01-preview - properties: - - !Property - schema: *ref_48 - serializedName: code - language: !Languages - default: - name: code - description: Error code - protocol: !Protocols {} - - !Property - schema: *ref_49 - serializedName: message - language: !Languages - default: - name: message - description: Error message indicating why the operation failed. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - exception - language: !Languages - default: - name: ErrorResponseAutoGenerated - description: Describes the format of Error response. - namespace: '' - protocol: !Protocols {} - - !ObjectSchema &ref_295 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_50 - required: false - serializedName: cost - language: !Languages - default: - name: cost - description: The integer value representing the relative cost of the query. - protocol: !Protocols {} - - !Property - schema: *ref_51 - required: true - serializedName: timespan - language: !Languages - default: - name: timespan - description: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. - protocol: !Protocols {} - - !Property - schema: *ref_52 - required: false - serializedName: interval - language: !Languages - default: - name: interval - description: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. - protocol: !Protocols {} - - !Property - schema: *ref_53 - required: false - serializedName: namespace - language: !Languages - default: - name: namespace - description: The namespace of the metrics being queried - protocol: !Protocols {} - - !Property - schema: *ref_54 - required: false - serializedName: resourceregion - language: !Languages - default: - name: resourceregion - description: The region of the resource being queried for metrics. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_200 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_67 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_55 - required: true - serializedName: id - language: !Languages - default: - name: id - description: the metric Id. - protocol: !Protocols {} - - !Property - schema: *ref_56 - required: true - serializedName: type - language: !Languages - default: - name: type - description: the resource type of the metric resource. - protocol: !Protocols {} - - !Property - schema: *ref_45 - required: true - serializedName: name - language: !Languages - default: - name: name - description: the name and the display name of the metric, i.e. it is localizable string. - protocol: !Protocols {} - - !Property - schema: *ref_57 - required: false - serializedName: displayDescription - language: !Languages - default: - name: displayDescription - description: Detailed description of this metric. - protocol: !Protocols {} - - !Property - schema: *ref_58 - required: false - serializedName: errorCode - language: !Languages - default: - name: errorCode - description: '''Success'' or the error details on query failures for this metric.' - protocol: !Protocols {} - - !Property - schema: *ref_59 - required: false - serializedName: errorMessage - language: !Languages - default: - name: errorMessage - description: Error message encountered querying this specific metric. - protocol: !Protocols {} - - !Property - schema: *ref_40 - required: true - serializedName: unit - language: !Languages - default: - name: unit - description: The unit of the metric. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_199 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_68 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: !ArraySchema &ref_197 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_69 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_45 - serializedName: name - language: !Languages - default: - name: name - description: the name of the metadata. - protocol: !Protocols {} - - !Property - schema: *ref_60 - serializedName: value - language: !Languages - default: - name: value - description: the value of the metadata. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetadataValue - description: Represents a metric metadata value. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: TimeSeriesElementMetadatavalues - description: the metadata values returned if $filter was specified in the call. - protocol: !Protocols {} - serializedName: metadatavalues - language: !Languages - default: - name: metadatavalues - description: the metadata values returned if $filter was specified in the call. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_198 - type: array - apiVersions: - - !ApiVersion - version: '2018-01-01' - elementType: !ObjectSchema &ref_70 - type: object - apiVersions: - - !ApiVersion - version: '2018-01-01' - properties: - - !Property - schema: *ref_61 - required: true - serializedName: timeStamp - language: !Languages - default: - name: timeStamp - description: the timestamp for the metric value in ISO 8601 format. - protocol: !Protocols {} - - !Property - schema: *ref_62 - required: false - serializedName: average - language: !Languages - default: - name: average - description: the average value in the time range. - protocol: !Protocols {} - - !Property - schema: *ref_63 - required: false - serializedName: minimum - language: !Languages - default: - name: minimum - description: the least value in the time range. - protocol: !Protocols {} - - !Property - schema: *ref_64 - required: false - serializedName: maximum - language: !Languages - default: - name: maximum - description: the greatest value in the time range. - protocol: !Protocols {} - - !Property - schema: *ref_65 - required: false - serializedName: total - language: !Languages - default: - name: total - description: the sum of all of the values in the time range. - protocol: !Protocols {} - - !Property - schema: *ref_66 - required: false - serializedName: count - language: !Languages - default: - name: count - description: the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricValue - description: Represents a metric value. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: TimeSeriesElementData - description: An array of data points representing the metric values. This is only returned if a result type of data is specified. - protocol: !Protocols {} - serializedName: data - language: !Languages - default: - name: data - description: An array of data points representing the metric values. This is only returned if a result type of data is specified. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: TimeSeriesElement - description: A time series result type. The discriminator value is always TimeSeries in this case. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetricTimeseries - description: the time series returned when a data query is performed. - protocol: !Protocols {} - required: true - serializedName: timeseries - language: !Languages - default: - name: timeseries - description: the time series returned when a data query is performed. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: Metric - description: The result data of a query. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: ResponseValue - description: the value of the collection. - protocol: !Protocols {} - required: true - serializedName: value - language: !Languages - default: - name: value - description: the value of the collection. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: Response - description: The response to a metrics query. - namespace: '' - protocol: !Protocols {} - - *ref_67 - - *ref_68 - - *ref_69 - - *ref_70 - - !ObjectSchema &ref_300 - type: object - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - properties: - - !Property - schema: !ArraySchema &ref_201 - type: array - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - elementType: !ObjectSchema &ref_76 - type: object - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - properties: - - !Property - schema: *ref_71 - serializedName: id - language: !Languages - default: - name: id - description: The ID of the metric namespace. - protocol: !Protocols {} - - !Property - schema: *ref_72 - serializedName: type - language: !Languages - default: - name: type - description: The type of the namespace. - protocol: !Protocols {} - - !Property - schema: *ref_73 - serializedName: name - language: !Languages - default: - name: name - description: The escaped name of the namespace. - protocol: !Protocols {} - - !Property - schema: *ref_74 - serializedName: classification - language: !Languages - default: - name: classification - description: Kind of namespace - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_77 - type: object - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - properties: - - !Property - schema: *ref_75 - serializedName: metricNamespaceName - language: !Languages - default: - name: metricNamespaceName - description: The metric namespace name. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricNamespaceName - description: The fully qualified metric namespace name. - namespace: '' - protocol: !Protocols {} - serializedName: properties - language: !Languages - default: - name: properties - description: Properties which include the fully qualified namespace name. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricNamespace - description: Metric namespace class specifies the metadata for a metric namespace. - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetricNamespaceCollectionValue - description: The values for the metric namespaces. - protocol: !Protocols {} - required: true - serializedName: value - language: !Languages - default: - name: value - description: The values for the metric namespaces. - protocol: !Protocols {} - serializationFormats: - - json - usage: - - output - language: !Languages - default: - name: MetricNamespaceCollection - description: Represents collection of metric namespaces. - namespace: '' - protocol: !Protocols {} - - *ref_76 - - *ref_77 - - !ObjectSchema - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_207 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_162 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_78 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the category - protocol: !Protocols {} - - !Property - schema: *ref_79 - required: true - serializedName: displayName - language: !Languages - default: - name: displayName - description: The display name of the category - protocol: !Protocols {} - - !Property - schema: *ref_80 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the category - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_163 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_202 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_81 - language: !Languages - default: - name: MetadataCategoryRelatedTables - description: The tables related to the category - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The tables related to the category - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_203 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_82 - language: !Languages - default: - name: MetadataCategoryRelatedFunctions - description: The functions related to the category - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The functions related to the category - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_204 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_83 - language: !Languages - default: - name: MetadataCategoryRelatedResourceTypes - description: The resource types related to the category - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The resource types related to the category - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_205 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_84 - language: !Languages - default: - name: MetadataCategoryRelatedQueries - description: The saved queries related to the category - protocol: !Protocols {} - serializedName: queries - language: !Languages - default: - name: queries - description: The saved queries related to the category - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_206 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_85 - language: !Languages - default: - name: MetadataCategoryRelatedSolutions - description: The Log Analytics solutions related to the category - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The Log Analytics solutions related to the category - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataCategoryRelated - description: The related metadata items for the category - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the category - protocol: !Protocols {} - summary: A metadata category. - language: !Languages - default: - name: MetadataCategory - description: Categories are used to group other metadata entities. - namespace: '' - summary: A metadata category. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsCategories - description: The list of categories that are referenced in this metadata response. - protocol: !Protocols {} - serializedName: categories - language: !Languages - default: - name: categories - description: The list of categories that are referenced in this metadata response. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_215 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_164 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_86 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the resource-type - protocol: !Protocols {} - - !Property - schema: *ref_87 - required: true - serializedName: type - language: !Languages - default: - name: type - description: The type of the resource-type - protocol: !Protocols {} - - !Property - schema: *ref_88 - required: false - serializedName: displayName - language: !Languages - default: - name: displayName - description: The display name of the resource-type - protocol: !Protocols {} - - !Property - schema: *ref_89 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_208 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_90 - language: !Languages - default: - name: MetadataResourceTypeLabels - description: The user-defined labels of the resource-type - protocol: !Protocols {} - required: false - serializedName: labels - language: !Languages - default: - name: labels - description: The user-defined labels of the resource-type - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: tags - language: !Languages - default: - name: tags - description: The tags associated with the resource-type - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: properties - language: !Languages - default: - name: properties - description: The properties of the resource-type - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_165 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_209 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_91 - language: !Languages - default: - name: MetadataResourceTypeRelatedTables - description: The tables related to the resource-type - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The tables related to the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_210 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_92 - language: !Languages - default: - name: MetadataResourceTypeRelatedFunctions - description: The functions related to the resource-type - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The functions related to the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_211 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_93 - language: !Languages - default: - name: MetadataResourceTypeRelatedCategories - description: The categories related to the resource-type - protocol: !Protocols {} - serializedName: categories - language: !Languages - default: - name: categories - description: The categories related to the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_212 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_94 - language: !Languages - default: - name: MetadataResourceTypeRelatedQueries - description: The queries related to the resource-type - protocol: !Protocols {} - serializedName: queries - language: !Languages - default: - name: queries - description: The queries related to the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_213 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_95 - language: !Languages - default: - name: MetadataResourceTypeRelatedWorkspaces - description: The Log Analytics workspaces related to the resource-type - protocol: !Protocols {} - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The Log Analytics workspaces related to the resource-type - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_214 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_96 - language: !Languages - default: - name: MetadataResourceTypeRelatedResources - description: The Azure resources related to the resource-type - protocol: !Protocols {} - serializedName: resources - language: !Languages - default: - name: resources - description: The Azure resources related to the resource-type - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataResourceTypeRelated - description: The related metadata items for the resource-type - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the resource-type - protocol: !Protocols {} - summary: A type of resource in Azure. - language: !Languages - default: - name: MetadataResourceType - description: Metadata about types of Azure resources, containing relevant tables, functions, etc. - namespace: '' - summary: A type of resource in Azure. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsResourceTypes - description: The list of resource types that are referenced in this metadata response. - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The list of resource types that are referenced in this metadata response. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_221 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_166 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_97 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: *ref_98 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: *ref_99 - required: false - serializedName: displayName - language: !Languages - default: - name: displayName - description: The display name of the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: *ref_100 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: tags - language: !Languages - default: - name: tags - description: The tags that are associated with the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: properties - language: !Languages - default: - name: properties - description: The properties of the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_167 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_216 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_101 - language: !Languages - default: - name: MetadataSolutionRelatedTables - description: The tables related to the Log Analytics solution - protocol: !Protocols {} - required: true - serializedName: tables - language: !Languages - default: - name: tables - description: The tables related to the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_217 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_102 - language: !Languages - default: - name: MetadataSolutionRelatedFunctions - description: The functions related to the Log Analytics solution - protocol: !Protocols {} - required: false - serializedName: functions - language: !Languages - default: - name: functions - description: The functions related to the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_218 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_103 - language: !Languages - default: - name: MetadataSolutionRelatedCategories - description: The categories related to the Log Analytics solution - protocol: !Protocols {} - required: false - serializedName: categories - language: !Languages - default: - name: categories - description: The categories related to the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_219 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_104 - language: !Languages - default: - name: MetadataSolutionRelatedQueries - description: The saved queries related to the Log Analytics solution - protocol: !Protocols {} - required: false - serializedName: queries - language: !Languages - default: - name: queries - description: The saved queries related to the Log Analytics solution - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_220 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_105 - language: !Languages - default: - name: MetadataSolutionRelatedWorkspaces - description: The Workspaces referenced in the metadata request that are related to the Log Analytics solution - protocol: !Protocols {} - required: false - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The Workspaces referenced in the metadata request that are related to the Log Analytics solution - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataSolutionRelated - description: The related metadata items for the Log Analytics solution - namespace: '' - protocol: !Protocols {} - required: true - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the Log Analytics solution - protocol: !Protocols {} - summary: A Log Analytics solution. - language: !Languages - default: - name: MetadataSolution - description: Solutions can group tables and functions that are associated with a certain Azure Log Analytics offering. - namespace: '' - summary: A Log Analytics solution. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsSolutions - description: The list of Log Analytics solutions installed on the workspace. - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The list of Log Analytics solutions installed on the workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_230 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_168 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_106 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the table - protocol: !Protocols {} - - !Property - schema: *ref_107 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the table - protocol: !Protocols {} - - !Property - schema: *ref_108 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the table - protocol: !Protocols {} - - !Property - schema: *ref_109 - required: false - serializedName: timespanColumn - language: !Languages - default: - name: timespanColumn - description: The column associated with the timespan query parameter for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_222 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_110 - language: !Languages - default: - name: MetadataTableLabels - description: The user defined labels of the table - protocol: !Protocols {} - required: false - serializedName: labels - language: !Languages - default: - name: labels - description: The user defined labels of the table - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: tags - language: !Languages - default: - name: tags - description: The tags associated with the table - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: properties - language: !Languages - default: - name: properties - description: The properties of the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_223 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_169 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_111 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the column - protocol: !Protocols {} - - !Property - schema: *ref_112 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the column - protocol: !Protocols {} - - !Property - schema: *ref_113 - required: true - serializedName: type - language: !Languages - default: - name: type - description: The data type of the column - protocol: !Protocols {} - - !Property - schema: *ref_114 - required: false - serializedName: isPreferredFacet - language: !Languages - default: - name: isPreferredFacet - description: A flag indicating this column is a preferred facet - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: source - language: !Languages - default: - name: source - description: an indication of the source of the column, used only when multiple workspaces have conflicting definition for the column - protocol: !Protocols {} - language: !Languages - default: - name: MetadataTableColumnsItem - description: '' - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetadataTableColumns - description: The list of columns defined on the table - protocol: !Protocols {} - required: false - serializedName: columns - language: !Languages - default: - name: columns - description: The list of columns defined on the table - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_170 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_224 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_115 - language: !Languages - default: - name: MetadataTableRelatedCategories - description: The related categories for the table - protocol: !Protocols {} - serializedName: categories - language: !Languages - default: - name: categories - description: The related categories for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_225 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_116 - language: !Languages - default: - name: MetadataTableRelatedSolutions - description: The related Log Analytics solutions for the table - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The related Log Analytics solutions for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_226 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_117 - language: !Languages - default: - name: MetadataTableRelatedResourceTypes - description: The related resource types for the table - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The related resource types for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_227 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_118 - language: !Languages - default: - name: MetadataTableRelatedWorkspaces - description: The related Log Analytics workspaces for the table - protocol: !Protocols {} - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The related Log Analytics workspaces for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_228 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_119 - language: !Languages - default: - name: MetadataTableRelatedFunctions - description: The related functions for the table - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The related functions for the table - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_229 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_120 - language: !Languages - default: - name: MetadataTableRelatedQueries - description: The related saved queries for the table - protocol: !Protocols {} - serializedName: queries - language: !Languages - default: - name: queries - description: The related saved queries for the table - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataTableRelated - description: The related metadata items for the table - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the table - protocol: !Protocols {} - summary: A data table that takes part in a workspace schema. - language: !Languages - default: - name: MetadataTable - description: Tables are part of the workspace schema, and contain a list of columns and a reference to other relevant metadata items. - namespace: '' - summary: A data table that takes part in a workspace schema. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsTables - description: The list of tables and columns that comprise the schema of the workspace. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The list of tables and columns that comprise the schema of the workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_236 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_171 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_121 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the function. - protocol: !Protocols {} - - !Property - schema: *ref_122 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the function, to be used in queries. - protocol: !Protocols {} - - !Property - schema: *ref_123 - required: false - serializedName: parameters - language: !Languages - default: - name: parameters - description: The parameters/arguments of the function, if any. - protocol: !Protocols {} - - !Property - schema: *ref_124 - required: false - serializedName: displayName - language: !Languages - default: - name: displayName - description: The display name of the function. - protocol: !Protocols {} - - !Property - schema: *ref_125 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the function. - protocol: !Protocols {} - - !Property - schema: *ref_126 - required: true - serializedName: body - language: !Languages - default: - name: body - description: The KQL body of the function. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: tags - language: !Languages - default: - name: tags - description: The tags associated with the function. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: properties - language: !Languages - default: - name: properties - description: The properties of the function. - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_172 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_231 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_127 - language: !Languages - default: - name: MetadataFunctionRelatedTables - description: The related tables for the function. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The related tables for the function. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_232 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_128 - language: !Languages - default: - name: MetadataFunctionRelatedSolutions - description: The related Log Analytics solutions for the function. - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The related Log Analytics solutions for the function. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_233 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_129 - language: !Languages - default: - name: MetadataFunctionRelatedResourceTypes - description: The related resource types for the function. - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The related resource types for the function. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_234 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_130 - language: !Languages - default: - name: MetadataFunctionRelatedCategories - description: The related categories for the function. - protocol: !Protocols {} - serializedName: categories - language: !Languages - default: - name: categories - description: The related categories for the function. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_235 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_131 - language: !Languages - default: - name: MetadataFunctionRelatedWorkspaces - description: The related workspaces for the function. - protocol: !Protocols {} - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The related workspaces for the function. - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataFunctionRelated - description: The related metadata items for the function. - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the function. - protocol: !Protocols {} - summary: A stored function. - language: !Languages - default: - name: MetadataFunction - description: Functions are stored Kusto queries that can be specified as part of queries by using their name. - namespace: '' - summary: A stored function. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsFunctions - description: The list of functions stored on the workspace, or introduced by solutions etc. - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The list of functions stored on the workspace, or introduced by solutions etc. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_242 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_173 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_132 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the query. - protocol: !Protocols {} - - !Property - schema: *ref_133 - required: false - serializedName: displayName - language: !Languages - default: - name: displayName - description: The display name of the query. - protocol: !Protocols {} - - !Property - schema: *ref_134 - required: false - serializedName: description - language: !Languages - default: - name: description - description: The description of the query. - protocol: !Protocols {} - - !Property - schema: *ref_135 - required: true - serializedName: body - language: !Languages - default: - name: body - description: The KQL body of the query. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_237 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_136 - language: !Languages - default: - name: MetadataQueryLabels - description: The user defined labels associated with the query. - protocol: !Protocols {} - required: false - serializedName: labels - language: !Languages - default: - name: labels - description: The user defined labels associated with the query. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: tags - language: !Languages - default: - name: tags - description: The tags associated with the query. - protocol: !Protocols {} - - !Property - schema: *ref_5 - required: false - serializedName: properties - language: !Languages - default: - name: properties - description: The properties of the query. - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_174 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_238 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_137 - language: !Languages - default: - name: MetadataQueryRelatedCategories - description: The related categories for the query. - protocol: !Protocols {} - serializedName: categories - language: !Languages - default: - name: categories - description: The related categories for the query. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_239 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_138 - language: !Languages - default: - name: MetadataQueryRelatedSolutions - description: The related Log Analytics solutions for the query. - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The related Log Analytics solutions for the query. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_240 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_139 - language: !Languages - default: - name: MetadataQueryRelatedResourceTypes - description: The related resource types for the query. - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The related resource types for the query. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_241 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_140 - language: !Languages - default: - name: MetadataQueryRelatedTables - description: The related tables for the query. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The related tables for the query. - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataQueryRelated - description: The related metadata items for the query. - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the query. - protocol: !Protocols {} - summary: A stored query. - language: !Languages - default: - name: MetadataQuery - description: Queries are stored pieces of KQL, along with a list of relevant metadata items. - namespace: '' - summary: A stored query. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsQueries - description: The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. - protocol: !Protocols {} - serializedName: queries - language: !Languages - default: - name: queries - description: The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_245 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_175 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_141 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the Application Insights app. - protocol: !Protocols {} - - !Property - schema: *ref_142 - required: true - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: The ARM resource ID of the Application Insights app. - protocol: !Protocols {} - - !Property - schema: *ref_143 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the Application Insights app. - protocol: !Protocols {} - - !Property - schema: *ref_144 - required: true - serializedName: region - language: !Languages - default: - name: region - description: The Azure region of the Application Insights app. - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_176 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_243 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_145 - language: !Languages - default: - name: MetadataApplicationRelatedTables - description: The related tables for the Application Insights app. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The related tables for the Application Insights app. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_244 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_146 - language: !Languages - default: - name: MetadataApplicationRelatedFunctions - description: The related functions for the Application Insights app. - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The related functions for the Application Insights app. - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataApplicationRelated - description: The related metadata items for the Application Insights app. - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the Application Insights app. - protocol: !Protocols {} - summary: An Application Insights application. - language: !Languages - default: - name: MetadataApplication - description: Application Insights apps that were part of the metadata request and that the user has access to. - namespace: '' - summary: An Application Insights application. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsApplications - description: The list of Application Insights apps that were referenced in the metadata request. - protocol: !Protocols {} - serializedName: applications - language: !Languages - default: - name: applications - description: The list of Application Insights apps that were referenced in the metadata request. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_251 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_177 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_147 - required: true - serializedName: id - language: !Languages - default: - name: id - description: The ID of the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: *ref_148 - required: true - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: The ARM resource ID of the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: *ref_149 - required: true - serializedName: name - language: !Languages - default: - name: name - description: The name of the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: *ref_150 - required: true - serializedName: region - language: !Languages - default: - name: region - description: The Azure region of the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: !ObjectSchema &ref_178 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_246 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_151 - language: !Languages - default: - name: MetadataWorkspaceRelatedTables - description: The related tables for the Log Analytics workspace. - protocol: !Protocols {} - serializedName: tables - language: !Languages - default: - name: tables - description: The related tables for the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_247 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_152 - language: !Languages - default: - name: MetadataWorkspaceRelatedSolutions - description: The related Log Analytics solutions for the Log Analytics workspace. - protocol: !Protocols {} - serializedName: solutions - language: !Languages - default: - name: solutions - description: The related Log Analytics solutions for the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_248 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_153 - language: !Languages - default: - name: MetadataWorkspaceRelatedResourceTypes - description: The related resource types for the Log Analytics workspace. - protocol: !Protocols {} - serializedName: resourceTypes - language: !Languages - default: - name: resourceTypes - description: The related resource types for the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_249 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_154 - language: !Languages - default: - name: MetadataWorkspaceRelatedFunctions - description: The related functions for the Log Analytics workspace. - protocol: !Protocols {} - serializedName: functions - language: !Languages - default: - name: functions - description: The related functions for the Log Analytics workspace. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_250 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_155 - language: !Languages - default: - name: MetadataWorkspaceRelatedResources - description: The related Azure resources for the Log Analytics workspace. - protocol: !Protocols {} - serializedName: resources - language: !Languages - default: - name: resources - description: The related Azure resources for the Log Analytics workspace. - protocol: !Protocols {} - extensions: - x-internal-autorest-anonymous-schema: - anonymous: true - language: !Languages - default: - name: MetadataWorkspaceRelated - description: The related metadata items for the Log Analytics workspace. - namespace: '' - protocol: !Protocols {} - required: false - serializedName: related - language: !Languages - default: - name: related - description: The related metadata items for the Log Analytics workspace. - protocol: !Protocols {} - summary: A Log Analytics workspace. - language: !Languages - default: - name: MetadataWorkspace - description: Log Analytics workspaces that were part of the metadata request and that the user has access to. - namespace: '' - summary: A Log Analytics workspace. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsWorkspaces - description: The list of Log Analytics workspaces that were referenced in the metadata request. - protocol: !Protocols {} - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The list of Log Analytics workspaces that were referenced in the metadata request. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_252 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_156 - uniqueItems: true - language: !Languages - default: - name: MetadataResultsResources - description: The list of Azure resources that were referenced in the metadata request. - protocol: !Protocols {} - serializedName: resources - language: !Languages - default: - name: resources - description: The list of Azure resources that were referenced in the metadata request. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_258 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_179 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: !ArraySchema &ref_254 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_180 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_157 - required: true - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_253 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_158 - language: !Languages - default: - name: MetadataPermissionsWorkspacesItemDenyTables - description: The list of tables that were denied access for the resource ID. - protocol: !Protocols {} - required: false - serializedName: denyTables - language: !Languages - default: - name: denyTables - description: The list of tables that were denied access for the resource ID. - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsWorkspacesItem - description: '' - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsWorkspaces - description: The permission indication for the workspaces on the metadata request. - protocol: !Protocols {} - required: true - serializedName: workspaces - language: !Languages - default: - name: workspaces - description: The permission indication for the workspaces on the metadata request. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_256 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_181 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_159 - required: true - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_255 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: *ref_160 - language: !Languages - default: - name: MetadataPermissionsResourcesItemDenyTables - description: The list of tables that were denied access for the resource ID. - protocol: !Protocols {} - required: false - serializedName: denyTables - language: !Languages - default: - name: denyTables - description: The list of tables that were denied access for the resource ID. - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsResourcesItem - description: '' - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsResources - description: The permission indication for the Azure resources on the metadata request. - protocol: !Protocols {} - required: false - serializedName: resources - language: !Languages - default: - name: resources - description: The permission indication for the Azure resources on the metadata request. - protocol: !Protocols {} - - !Property - schema: !ArraySchema &ref_257 - type: array - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - elementType: !ObjectSchema &ref_182 - type: object - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - properties: - - !Property - schema: *ref_161 - required: true - serializedName: resourceId - language: !Languages - default: - name: resourceId - description: The resource ID on the permission indication. - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsApplicationsItem - description: '' - namespace: '' - protocol: !Protocols {} - language: !Languages - default: - name: MetadataPermissionsApplications - description: The permission indication for the Application Insights apps on the metadata request. - protocol: !Protocols {} - required: false - serializedName: applications - language: !Languages - default: - name: applications - description: The permission indication for the Application Insights apps on the metadata request. - protocol: !Protocols {} - summary: Permission information. - language: !Languages - default: - name: MetadataPermissions - description: Permission information for the metadata call, includes apps/workspaces/resource the user didn't have access to. - namespace: '' - summary: Permission information. - protocol: !Protocols {} - uniqueItems: true - language: !Languages - default: - name: MetadataResultsPermissions - description: The list of permission rules that affected the metadata request. - protocol: !Protocols {} - serializedName: permissions - language: !Languages - default: - name: permissions - description: The list of permission rules that affected the metadata request. - protocol: !Protocols {} - summary: A metadata response. - language: !Languages - default: - name: MetadataResults - description: The metadata response for the app, including available tables, etc. - namespace: '' - summary: A metadata response. - protocol: !Protocols {} - - *ref_162 - - *ref_163 - - *ref_164 - - *ref_165 - - *ref_166 - - *ref_167 - - *ref_168 - - *ref_169 - - *ref_170 - - *ref_171 - - *ref_172 - - *ref_173 - - *ref_174 - - *ref_175 - - *ref_176 - - *ref_177 - - *ref_178 - - *ref_179 - - *ref_180 - - *ref_181 - - *ref_182 - arrays: - - *ref_183 - - *ref_184 - - *ref_185 - - *ref_186 - - *ref_187 - - *ref_188 - - *ref_189 - - *ref_190 - - *ref_191 - - *ref_192 - - *ref_193 - - *ref_194 - - *ref_195 - - *ref_196 - - *ref_197 - - *ref_198 - - *ref_199 - - *ref_200 - - *ref_201 - - *ref_202 - - *ref_203 - - *ref_204 - - *ref_205 - - *ref_206 - - *ref_207 - - *ref_208 - - *ref_209 - - *ref_210 - - *ref_211 - - *ref_212 - - *ref_213 - - *ref_214 - - *ref_215 - - *ref_216 - - *ref_217 - - *ref_218 - - *ref_219 - - *ref_220 - - *ref_221 - - *ref_222 - - *ref_223 - - *ref_224 - - *ref_225 - - *ref_226 - - *ref_227 - - *ref_228 - - *ref_229 - - *ref_230 - - *ref_231 - - *ref_232 - - *ref_233 - - *ref_234 - - *ref_235 - - *ref_236 - - *ref_237 - - *ref_238 - - *ref_239 - - *ref_240 - - *ref_241 - - *ref_242 - - *ref_243 - - *ref_244 - - *ref_245 - - *ref_246 - - *ref_247 - - *ref_248 - - *ref_249 - - *ref_250 - - *ref_251 - - *ref_252 - - *ref_253 - - *ref_254 - - *ref_255 - - *ref_256 - - *ref_257 - - *ref_258 -globalParameters: - - !Parameter &ref_259 - schema: *ref_0 - clientDefaultValue: https://api.loganalytics.io/v1 - implementation: Client - origin: modelerfour:synthesized/host - required: true - extensions: - x-ms-skip-url-encoding: true - language: !Languages - default: - name: $host - description: server parameter - serializedName: $host - protocol: !Protocols - http: !HttpParameter - in: uri - - !Parameter &ref_274 - schema: *ref_0 - clientDefaultValue: https://management.azure.com - implementation: Client - origin: modelerfour:synthesized/host - required: true - extensions: - x-ms-skip-url-encoding: true - language: !Languages - default: - name: $host - description: server parameter - serializedName: $host - protocol: !Protocols - http: !HttpParameter - in: uri -operationGroups: - - !OperationGroup - $key: Query - operations: - - !Operation - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - parameters: - - *ref_259 - - !Parameter &ref_262 - schema: *ref_1 - implementation: Method - required: true - language: !Languages - default: - name: workspaceId - description: ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - serializedName: workspaceId - protocol: !Protocols - http: !HttpParameter - in: path - - !Parameter &ref_263 - schema: *ref_1 - implementation: Method - required: true - language: !Languages - default: - name: query - description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - serializedName: query - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_264 - schema: *ref_260 - implementation: Method - language: !Languages - default: - name: timespan - description: Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. - serializedName: timespan - protocol: !Protocols - http: !HttpParameter - in: query - requests: - - !Request - parameters: - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: [] - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpRequest - path: /workspaces/{workspaceId}/query - method: get - uri: '{$host}' - signatureParameters: - - *ref_262 - - *ref_263 - - *ref_264 - responses: - - !SchemaResponse - schema: *ref_265 - language: !Languages - default: - name: '' - description: OK. The API call succeeded and the Analytics query result is in the response payload - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_266 - language: !Languages - default: - name: '' - description: An error response object. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - cross-workspace: - description: A cross workspace query that the type and count of each row per workspace. - parameters: - query: union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId - workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 - workspaces: draft-test,draft-test-2 - title: Cross Workspace Query - responses: - '200': - body: - tables: - - name: PrimaryResult - columns: - - name: Type - type: string - - name: TenantId - type: string - - name: count_ - type: long - rows: - - - Usage - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '1' - - - Usage - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '1' - - - BillingFact - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '1' - - - BillingFact - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '1' - - - Operation - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '7' - - - Operation - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '5' - simple-query: - description: A simple query that returns query results. - parameters: - query: Usage | take 10 - timespan: PT12H - workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 - title: Simple Query - responses: - '200': - body: - tables: - - name: PrimaryResult - columns: - - name: TenantId - type: string - - name: Computer - type: string - - name: TimeGenerated - type: datetime - - name: SourceSystem - type: string - - name: StartTime - type: datetime - - name: EndTime - type: datetime - - name: ResourceUri - type: string - - name: LinkedResourceUri - type: string - - name: DataType - type: string - - name: Solution - type: string - - name: BatchesWithinSla - type: long - - name: BatchesOutsideSla - type: long - - name: BatchesCapped - type: long - - name: TotalBatches - type: long - - name: AvgLatencyInSeconds - type: real - - name: Quantity - type: real - - name: QuantityUnit - type: string - - name: IsBillable - type: bool - - name: MeterId - type: string - - name: LinkedMeterId - type: string - - name: Type - type: string - rows: - - - b438b4f6-912a-46d5-9cb1-b44069212abc - - ContosoSQLSrv1 - - '2017-08-24T06:59:59Z' - - OMS - - '2017-08-24T06:00:00Z' - - '2017-08-24T06:59:59Z' - - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it - - null - - Perf - - LogManagement - - '1' - - '0' - - '0' - - '1' - - '1.286' - - '0.076408' - - MBytes - - 'true' - - a4e29a95-5b4c-408b-80e3-113f9410566e - - 00000000-0000-0000-0000-000000000000 - - Usage - - - b438b4f6-912a-46d5-9cb1-b44069212abc - - Store010Web3 - - '2017-08-24T06:59:59Z' - - OMS - - '2017-08-24T06:00:00Z' - - '2017-08-24T06:59:59Z' - - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it - - null - - Perf - - LogManagement - - '1' - - '0' - - '0' - - '1' - - '1.7' - - '0.106767' - - MBytes - - 'true' - - a4e29a95-5b4c-408b-80e3-113f9410566e - - 00000000-0000-0000-0000-000000000000 - - Usage - headers: - x-ms-correlation-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5 - x-ms-request-id: 58a37988-2c05-427a-891f-5e0e1266fcc5 - language: !Languages - default: - name: Get - description: Executes an Analytics query for data - summary: Execute an Analytics query - protocol: !Protocols {} - - !Operation - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - parameters: - - *ref_259 - - !Parameter &ref_269 - schema: *ref_1 - implementation: Method - required: true - language: !Languages - default: - name: workspaceId - description: ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. - serializedName: workspaceId - protocol: !Protocols - http: !HttpParameter - in: path - - !Parameter &ref_270 - schema: *ref_1 - implementation: Method - language: !Languages - default: - name: prefer - description: Optional. The prefer header to set server timeout, query statistics and visualization information. - serializedName: Prefer - protocol: !Protocols - http: !HttpParameter - in: header - requests: - - !Request - parameters: - - !Parameter - schema: *ref_267 - implementation: Method - origin: modelerfour:synthesized/content-type - required: true - language: !Languages - default: - name: contentType - description: Body Parameter content-type - serializedName: Content-Type - protocol: !Protocols - http: !HttpParameter - in: header - - !Parameter &ref_268 - schema: *ref_22 - implementation: Method - required: true - language: !Languages - default: - name: body - description: The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - protocol: !Protocols - http: !HttpParameter - in: body - style: json - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: - - *ref_268 - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpWithBodyRequest - path: /workspaces/{workspaceId}/query - method: post - knownMediaType: json - mediaTypes: - - application/json - uri: '{$host}' - signatureParameters: - - *ref_269 - - *ref_270 - responses: - - !SchemaResponse - schema: *ref_265 - language: !Languages - default: - name: '' - description: OK. The API call succeeded and the Analytics query result is in the response payload - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_266 - language: !Languages - default: - name: '' - description: An error response object. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - cross-workspace: - description: A cross workspace query that the type and count of each row per workspace. - parameters: - body: - query: union * | where TimeGenerated > ago(1h) | summarize count() by Type, TenantId - workspaces: - - draft-test - - draft-test-2 - workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 - title: Cross Workspace Query - responses: - '200': - body: - tables: - - name: PrimaryResult - columns: - - name: Type - type: string - - name: TenantId - type: string - - name: count_ - type: long - rows: - - - Usage - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '1' - - - Usage - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '1' - - - BillingFact - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '1' - - - BillingFact - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '1' - - - Operation - - 63613592-b6f7-4c3d-a390-22ba13102111 - - '7' - - - Operation - - d436f322-a9f4-4aad-9a7d-271fbf66001c - - '5' - simple-query: - description: A simple query that returns query results. - parameters: - body: - query: Usage | take 10 - timespan: PT12H - workspaceId: 63613592-b6f7-4c3d-a390-22ba13102111 - title: Simple Query - responses: - '200': - body: - tables: - - name: PrimaryResult - columns: - - name: TenantId - type: string - - name: Computer - type: string - - name: TimeGenerated - type: datetime - - name: SourceSystem - type: string - - name: StartTime - type: datetime - - name: EndTime - type: datetime - - name: ResourceUri - type: string - - name: LinkedResourceUri - type: string - - name: DataType - type: string - - name: Solution - type: string - - name: BatchesWithinSla - type: long - - name: BatchesOutsideSla - type: long - - name: BatchesCapped - type: long - - name: TotalBatches - type: long - - name: AvgLatencyInSeconds - type: real - - name: Quantity - type: real - - name: QuantityUnit - type: string - - name: IsBillable - type: bool - - name: MeterId - type: string - - name: LinkedMeterId - type: string - - name: Type - type: string - rows: - - - b438b4f6-912a-46d5-9cb1-b44069212abc - - ContosoSQLSrv1 - - '2017-08-24T06:59:59Z' - - OMS - - '2017-08-24T06:00:00Z' - - '2017-08-24T06:59:59Z' - - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it - - null - - Perf - - LogManagement - - '1' - - '0' - - '0' - - '1' - - '1.286' - - '0.076408' - - MBytes - - 'true' - - a4e29a95-5b4c-408b-80e3-113f9410566e - - 00000000-0000-0000-0000-000000000000 - - Usage - - - b438b4f6-912a-46d5-9cb1-b44069212abc - - Store010Web3 - - '2017-08-24T06:59:59Z' - - OMS - - '2017-08-24T06:00:00Z' - - '2017-08-24T06:59:59Z' - - /subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourcegroups/contosoazurehq/providers/microsoft.operationalinsights/workspaces/contosoretail-it - - null - - Perf - - LogManagement - - '1' - - '0' - - '0' - - '1' - - '1.7' - - '0.106767' - - MBytes - - 'true' - - a4e29a95-5b4c-408b-80e3-113f9410566e - - 00000000-0000-0000-0000-000000000000 - - Usage - language: !Languages - default: - name: Execute - description: Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - summary: Execute an Analytics query - protocol: !Protocols {} - - !Operation - apiVersions: - - !ApiVersion - version: 2021-05-19_Preview - parameters: - - *ref_259 - requests: - - !Request - parameters: - - !Parameter - schema: *ref_267 - implementation: Method - origin: modelerfour:synthesized/content-type - required: true - language: !Languages - default: - name: contentType - description: Body Parameter content-type - serializedName: Content-Type - protocol: !Protocols - http: !HttpParameter - in: header - - !Parameter &ref_272 - schema: *ref_271 - implementation: Method - required: true - language: !Languages - default: - name: body - description: The batch request body - protocol: !Protocols - http: !HttpParameter - in: body - style: json - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: - - *ref_272 - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpWithBodyRequest - path: /$batch - method: post - knownMediaType: json - mediaTypes: - - application/json - uri: '{$host}' - signatureParameters: [] - responses: - - !SchemaResponse - schema: *ref_273 - language: !Languages - default: - name: '' - description: OK. The API call succeeded and the Analytics query result is in the response payload - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_266 - language: !Languages - default: - name: '' - description: An error response object. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - metadataPost: - description: A batch query that returns query results. - parameters: - body: - requests: - - path: /query - method: POST - body: - query: AppRequests | take 2 - id: '1' - workspace: d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - path: /query - method: POST - body: - query: AppRequests | take 3 - id: '2' - workspace: d2d0e126-fa1e-4b0a-b647-250cdd471e68 - title: Batch Query - responses: - '200': - body: - responses: - - body: - tables: - - name: PrimaryResult - columns: - - name: TenantId - type: string - - name: TimeGenerated - type: datetime - - name: Id - type: string - - name: Source - type: string - - name: Name - type: string - - name: Url - type: string - - name: Success - type: bool - - name: ResultCode - type: string - - name: DurationMs - type: real - - name: PerformanceBucket - type: string - - name: Properties - type: dynamic - - name: Measurements - type: dynamic - - name: OperationName - type: string - - name: OperationId - type: string - - name: OperationLinks - type: dynamic - - name: ParentId - type: string - - name: SyntheticSource - type: string - - name: SessionId - type: string - - name: UserId - type: string - - name: UserAuthenticatedId - type: string - - name: UserAccountId - type: string - - name: AppVersion - type: string - - name: AppRoleName - type: string - - name: AppRoleInstance - type: string - - name: ClientType - type: string - - name: ClientModel - type: string - - name: ClientOS - type: string - - name: ClientIP - type: string - - name: ClientCity - type: string - - name: ClientStateOrProvince - type: string - - name: ClientCountryOrRegion - type: string - - name: ClientBrowser - type: string - - name: ResourceGUID - type: string - - name: IKey - type: string - - name: SDKVersion - type: string - - name: ItemCount - type: int - - name: ReferencedItemId - type: string - - name: ReferencedType - type: string - - name: SourceSystem - type: string - - name: Type - type: string - - name: _ResourceId - type: string - rows: - - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - '2021-06-02T00:18:13.317Z' - - a3273b160f86b5c4 - - '' - - ServiceBus.process - - '' - - true - - '200' - - 0 - - <250ms - - '{"x-opt-enqueued-time":"1622593091"}' - - null - - ServiceBus.process - - e5d21caf619d4ef564a4b5920cadce47 - - null - - c6864f9d3649f302 - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - srikanta - - PC - - '' - - '' - - 0.0.0.0 - - Edmonds - - Washington - - United States - - '' - - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be - - b4f83947-968d-4e2f-82ad-804be07697ae - - java:3.1.1-BETA.2 - - 1 - - '' - - '' - - Azure - - AppRequests - - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights - - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - '2021-06-02T00:19:13.44Z' - - bebb49e7a1344c07 - - '' - - ServiceBus.process - - '' - - true - - '200' - - 0 - - <250ms - - '{"x-opt-enqueued-time":"1622593091"}' - - null - - ServiceBus.process - - d76c6dec50d2c12267d7d3a246a0c237 - - null - - b68fff4775c77214 - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - srikanta - - PC - - '' - - '' - - 0.0.0.0 - - Edmonds - - Washington - - United States - - '' - - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be - - b4f83947-968d-4e2f-82ad-804be07697ae - - java:3.1.1-BETA.2 - - 1 - - '' - - '' - - Azure - - AppRequests - - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights - id: '1' - status: 200 - - body: - tables: - - name: PrimaryResult - columns: - - name: TenantId - type: string - - name: TimeGenerated - type: datetime - - name: Id - type: string - - name: Source - type: string - - name: Name - type: string - - name: Url - type: string - - name: Success - type: bool - - name: ResultCode - type: string - - name: DurationMs - type: real - - name: PerformanceBucket - type: string - - name: Properties - type: dynamic - - name: Measurements - type: dynamic - - name: OperationName - type: string - - name: OperationId - type: string - - name: OperationLinks - type: dynamic - - name: ParentId - type: string - - name: SyntheticSource - type: string - - name: SessionId - type: string - - name: UserId - type: string - - name: UserAuthenticatedId - type: string - - name: UserAccountId - type: string - - name: AppVersion - type: string - - name: AppRoleName - type: string - - name: AppRoleInstance - type: string - - name: ClientType - type: string - - name: ClientModel - type: string - - name: ClientOS - type: string - - name: ClientIP - type: string - - name: ClientCity - type: string - - name: ClientStateOrProvince - type: string - - name: ClientCountryOrRegion - type: string - - name: ClientBrowser - type: string - - name: ResourceGUID - type: string - - name: IKey - type: string - - name: SDKVersion - type: string - - name: ItemCount - type: int - - name: ReferencedItemId - type: string - - name: ReferencedType - type: string - - name: SourceSystem - type: string - - name: Type - type: string - - name: _ResourceId - type: string - rows: - - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - '2021-06-02T16:31:25.383Z' - - 08bf242cdc68504c - - '' - - ServiceBus.process - - '' - - true - - '200' - - 0 - - <250ms - - '{"x-opt-enqueued-time":"1622651483"}' - - null - - ServiceBus.process - - 65d9eb1ccf85b1b7ed1e2ea6bb72f563 - - null - - 146140ce8493a6ed - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - srikanta - - PC - - '' - - '' - - 0.0.0.0 - - Edmonds - - Washington - - United States - - '' - - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be - - b4f83947-968d-4e2f-82ad-804be07697ae - - java:3.1.1-BETA.2 - - 1 - - '' - - '' - - Azure - - AppRequests - - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights - - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - '2021-06-02T16:32:25.492Z' - - 9f4cd78c10d57b4f - - '' - - ServiceBus.process - - '' - - true - - '200' - - 0 - - <250ms - - '{"x-opt-enqueued-time":"1622651483"}' - - null - - ServiceBus.process - - ae054fe7b7ac3adf8b841ebbe1ecb912 - - null - - 14eab103a1969665 - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - srikanta - - PC - - '' - - '' - - 0.0.0.0 - - Edmonds - - Washington - - United States - - '' - - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be - - b4f83947-968d-4e2f-82ad-804be07697ae - - java:3.1.1-BETA.2 - - 1 - - '' - - '' - - Azure - - AppRequests - - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights - - - d2d0e126-fa1e-4b0a-b647-250cdd471e68 - - '2021-06-02T16:33:25.585Z' - - ea7e09d4baa4e4ce - - '' - - ServiceBus.process - - '' - - true - - '200' - - 0 - - <250ms - - '{"x-opt-enqueued-time":"1622651483"}' - - null - - ServiceBus.process - - ba6162e3ccd803086944750b82600a3a - - null - - b60455183860caaf - - '' - - '' - - '' - - '' - - '' - - '' - - '' - - srikanta - - PC - - '' - - '' - - 0.0.0.0 - - Edmonds - - Washington - - United States - - '' - - fc5f5a5d-d6d1-47f9-be1b-aa57185ec6be - - b4f83947-968d-4e2f-82ad-804be07697ae - - java:3.1.1-BETA.2 - - 1 - - '' - - '' - - Azure - - AppRequests - - /subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourcegroups/srnagar-azuresdkgroup/providers/microsoft.insights/components/srnagarappinsights - id: '2' - status: 200 - language: !Languages - default: - name: Batch - description: Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. - summary: Execute a batch of Analytics queries - protocol: !Protocols {} - language: !Languages - default: - name: Query - description: '' - protocol: !Protocols {} - - !OperationGroup - $key: MetricDefinitions - operations: - - !Operation - apiVersions: - - !ApiVersion - version: '2018-01-01' - parameters: - - *ref_274 - - !Parameter &ref_278 - schema: *ref_275 - implementation: Method - required: true - extensions: - x-ms-skip-url-encoding: true - language: !Languages - default: - name: resourceUri - description: The identifier of the resource. - serializedName: resourceUri - protocol: !Protocols - http: !HttpParameter - in: path - - !Parameter - schema: *ref_276 - implementation: Method - origin: modelerfour:synthesized/api-version - required: true - language: !Languages - default: - name: apiVersion - description: Api Version - serializedName: api-version - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_279 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: metricnamespace - description: Metric namespace to query metric definitions for. - serializedName: metricnamespace - protocol: !Protocols - http: !HttpParameter - in: query - requests: - - !Request - parameters: - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: [] - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpRequest - path: /{resourceUri}/providers/Microsoft.Insights/metricDefinitions - method: get - uri: '{$host}' - signatureParameters: - - *ref_278 - - *ref_279 - responses: - - !SchemaResponse - schema: *ref_280 - language: !Languages - default: - name: '' - description: Successful request to get the list of metric definitions - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_281 - language: !Languages - default: - name: '' - description: Error response describing why the operation failed. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - Get Application Insights Metric Definitions without filter: - parameters: - api-version: '2018-01-01' - metricnamespace: microsoft.insights/components - resourceUri: subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions - responses: - '200': - body: - value: - - name: - localizedValue: Availability - value: availabilityResults/availabilityPercentage - category: Availability - dimensions: - - localizedValue: Test name - value: availabilityResult/name - - localizedValue: Run location - value: availabilityResult/location - displayDescription: Percentage of successfully completed availability tests - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/availabilityPercentage - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - unit: Percent - - name: - localizedValue: Availability tests - value: availabilityResults/count - category: Availability - dimensions: - - localizedValue: Test name - value: availabilityResult/name - - localizedValue: Run location - value: availabilityResult/location - - localizedValue: Test result - value: availabilityResult/success - displayDescription: Count of availability tests - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Availability test duration - value: availabilityResults/duration - category: Availability - dimensions: - - localizedValue: Test name - value: availabilityResult/name - - localizedValue: Run location - value: availabilityResult/location - - localizedValue: Test result - value: availabilityResult/success - displayDescription: Availability test duration - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/availabilityResults/duration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Page load network connect time - value: browserTimings/networkDuration - category: Browser - displayDescription: Time between user request and network connection. Includes DNS lookup and transport connection. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/networkDuration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Client processing time - value: browserTimings/processingDuration - category: Browser - displayDescription: Time between receiving the last byte of a document until the DOM is loaded. Async requests may still be processing. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/processingDuration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Receiving response time - value: browserTimings/receiveDuration - category: Browser - displayDescription: Time between the first and last bytes, or until disconnection. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/receiveDuration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Send request time - value: browserTimings/sendDuration - category: Browser - displayDescription: Time between network connection and receiving the first byte. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/sendDuration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Browser page load time - value: browserTimings/totalDuration - category: Browser - displayDescription: Time from user request until DOM, stylesheets, scripts and images are loaded. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/browserTimings/totalDuration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Dependency calls - value: dependencies/count - category: Server - dimensions: - - localizedValue: Dependency type - value: dependency/type - - localizedValue: Dependency performance - value: dependency/performanceBucket - - localizedValue: Successful call - value: dependency/success - - localizedValue: Target of a dependency call - value: dependency/target - - localizedValue: Result code - value: dependency/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of calls made by the application to external resources. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Dependency duration - value: dependencies/duration - category: Server - dimensions: - - localizedValue: Dependency type - value: dependency/type - - localizedValue: Dependency performance - value: dependency/performanceBucket - - localizedValue: Successful call - value: dependency/success - - localizedValue: Target of a dependency call - value: dependency/target - - localizedValue: Result code - value: dependency/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Duration of calls made by the application to external resources. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/duration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Dependency call failures - value: dependencies/failed - category: Failures - dimensions: - - localizedValue: Dependency type - value: dependency/type - - localizedValue: Dependency performance - value: dependency/performanceBucket - - localizedValue: Target of a dependency call - value: dependency/target - - localizedValue: Result code - value: dependency/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of failed dependency calls made by the application to external resources. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/dependencies/failed - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Page views - value: pageViews/count - category: Usage - dimensions: - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of page views. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/pageViews/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Page view load time - value: pageViews/duration - category: Usage - dimensions: - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Page view load time - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/pageViews/duration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: HTTP request execution time - value: performanceCounters/requestExecutionTime - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Execution time of the most recent request. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestExecutionTime - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: HTTP requests in application queue - value: performanceCounters/requestsInQueue - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Length of the application request queue. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestsInQueue - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: Count - - name: - localizedValue: HTTP request rate - value: performanceCounters/requestsPerSecond - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Rate of all requests to the application per second from ASP.NET. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/requestsPerSecond - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: CountPerSecond - - name: - localizedValue: Exception rate - value: performanceCounters/exceptionsPerSecond - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Count of handled and unhandled exceptions reported to windows, including .NET exceptions and unmanaged exceptions that are converted into .NET exceptions. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/exceptionsPerSecond - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: CountPerSecond - - name: - localizedValue: Process IO rate - value: performanceCounters/processIOBytesPerSecond - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Total bytes per second read and written to files, network and devices. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processIOBytesPerSecond - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: BytesPerSecond - - name: - localizedValue: Process CPU - value: performanceCounters/processCpuPercentage - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: The percentage of elapsed time that all process threads used the processor to execute instructions. This can vary between 0 to 100. This metric indicates the performance of w3wp process alone. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processCpuPercentage - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: Percent - - name: - localizedValue: Processor time - value: performanceCounters/processorCpuPercentage - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: The percentage of time that the processor spends in non-idle threads. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processorCpuPercentage - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: Percent - - name: - localizedValue: Available memory - value: performanceCounters/memoryAvailableBytes - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Physical memory immediately available for allocation to a process or for system use. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/memoryAvailableBytes - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: Bytes - - name: - localizedValue: Process private bytes - value: performanceCounters/processPrivateBytes - category: Performance counters - dimensions: - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Memory exclusively assigned to the monitored application's processes. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/performanceCounters/processPrivateBytes - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: Bytes - - name: - localizedValue: Server response time - value: requests/duration - category: Server - dimensions: - - localizedValue: Request performance - value: request/performanceBucket - - localizedValue: Result code - value: request/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Successful request - value: request/success - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Time between receiving an HTTP request and finishing sending the response. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/duration - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - - Maximum - - Minimum - unit: MilliSeconds - - name: - localizedValue: Server requests - value: requests/count - category: Server - dimensions: - - localizedValue: Request performance - value: request/performanceBucket - - localizedValue: Result code - value: request/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Successful request - value: request/success - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of HTTP requests completed. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Failed requests - value: requests/failed - category: Failures - dimensions: - - localizedValue: Request performance - value: request/performanceBucket - - localizedValue: Result code - value: request/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of HTTP requests marked as failed. In most cases these are requests with a response code >= 400 and not equal to 401. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/failed - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Server request rate - value: requests/rate - category: Server - dimensions: - - localizedValue: Request performance - value: request/performanceBucket - - localizedValue: Result code - value: request/resultCode - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Successful request - value: request/success - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Rate of server requests per second - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/requests/rate - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Average - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Average - unit: CountPerSecond - - name: - localizedValue: Exceptions - value: exceptions/count - category: Failures - dimensions: - - localizedValue: Cloud role name - value: cloud/roleName - - localizedValue: Cloud role instance - value: cloud/roleInstance - - localizedValue: Device type - value: client/type - displayDescription: Combined count of all uncaught exceptions. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Browser exceptions - value: exceptions/browser - category: Failures - dimensions: - - localizedValue: Cloud role name - value: cloud/roleName - displayDescription: Count of uncaught exceptions thrown in the browser. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/browser - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Server exceptions - value: exceptions/server - category: Failures - dimensions: - - localizedValue: Cloud role name - value: cloud/roleName - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Count of uncaught exceptions thrown in the server application. - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/exceptions/server - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - - name: - localizedValue: Traces - value: traces/count - category: Usage - dimensions: - - localizedValue: Severity level - value: trace/severityLevel - - localizedValue: Is traffic synthetic - value: operation/synthetic - - localizedValue: Cloud role name - value: cloud/roleName - - localizedValue: Cloud role instance - value: cloud/roleInstance - displayDescription: Trace document count - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricdefinitions/traces/count - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: microsoft.insights/components - primaryAggregationType: Count - resourceId: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - supportedAggregationTypes: - - Count - unit: Count - Get Metric Definitions without filter: - parameters: - api-version: '2018-01-01' - metricnamespace: Microsoft.Web/sites - resourceUri: subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions - responses: - default: - body: - code: BadRequest - message: 'ApiVersion: 2018-01-01 does not support query metricdefinitions at non Arm resource Id level' - '200': - body: - value: - - name: - localizedValue: CPU Time - value: CpuTime - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/CpuTime - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Seconds - - name: - localizedValue: Requests - value: Requests - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Requests - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Data In - value: BytesReceived - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesReceived - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Bytes - - name: - localizedValue: Data Out - value: BytesSent - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/BytesSent - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Bytes - - name: - localizedValue: Http 101 - value: Http101 - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http101 - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 2xx - value: Http2xx - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http2xx - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 3xx - value: Http3xx - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http3xx - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 401 - value: Http401 - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http401 - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 403 - value: Http403 - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http403 - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 404 - value: Http404 - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http404 - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 406 - value: Http406 - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http406 - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http 4xx - value: Http4xx - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http4xx - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Http Server Errors - value: Http5xx - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Http5xx - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Total - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Count - - name: - localizedValue: Memory working set - value: MemoryWorkingSet - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/MemoryWorkingSet - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Average - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Bytes - - name: - localizedValue: Average memory working set - value: AverageMemoryWorkingSet - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageMemoryWorkingSet - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Average - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Bytes - - name: - localizedValue: Average Response Time - value: AverageResponseTime - dimensions: - - localizedValue: Instance - value: Instance - id: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/AverageResponseTime - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - namespace: Microsoft.Web/sites - primaryAggregationType: Average - resourceId: /subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest - supportedAggregationTypes: - - None - - Average - - Minimum - - Maximum - - Total - - Count - unit: Seconds - Get StorageCache Metric Definitions with metric class: - parameters: - api-version: '2018-01-01' - metricnamespace: microsoft.storagecache/caches - resourceUri: subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - responses: - '200': - body: - value: - - name: - localizedValue: Total Client IOPS - value: ClientIOPS - displayDescription: The rate of client file operations processed by the Cache. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: Count - - name: - localizedValue: Average Client Latency - value: ClientLatency - displayDescription: Average latency of client file operations to the Cache. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLatency - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Latency - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: MilliSeconds - - name: - localizedValue: Client Read IOPS - value: ClientReadIOPS - displayDescription: Client read operations per second. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: Average Cache Read Throughput - value: ClientReadThroughput - displayDescription: Client read data transfer rate. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: Client Write IOPS - value: ClientWriteIOPS - displayDescription: Client write operations per second. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: Average Cache Write Throughput - value: ClientWriteThroughput - displayDescription: Client write data transfer rate. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: Client Metadata Read IOPS - value: ClientMetadataReadIOPS - displayDescription: The rate of client file operations sent to the Cache, excluding data reads, that do not modify persistent state. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataReadIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: Client Metadata Write IOPS - value: ClientMetadataWriteIOPS - displayDescription: The rate of client file operations sent to the Cache, excluding data writes, that modify persistent state. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataWriteIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: Client Lock IOPS - value: ClientLockIOPS - displayDescription: Client file locking operations per second. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLockIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: Storage Target Health - value: StorageTargetHealth - displayDescription: Boolean results of connectivity test between the Cache and Storage Targets. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetHealth - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Errors - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: Count - - name: - localizedValue: Uptime - value: Uptime - displayDescription: Boolean results of connectivity test between the Cache and monitoring system. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/Uptime - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Availability - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: Count - - name: - localizedValue: Total StorageTarget IOPS - value: StorageTargetIOPS - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate of all file operations the Cache sends to a particular StorageTarget. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: Count - - name: - localizedValue: StorageTarget Write IOPS - value: StorageTargetWriteIOPS - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate of the file write operations the Cache sends to a particular StorageTarget. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetWriteIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: Count - - name: - localizedValue: StorageTarget Asynchronous Write Throughput - value: StorageTargetAsyncWriteThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate the Cache asynchronously writes data to a particular StorageTarget. These are opportunistic writes that do not cause clients to block. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetAsyncWriteThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: StorageTarget Synchronous Write Throughput - value: StorageTargetSyncWriteThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate the Cache synchronously writes data to a particular StorageTarget. These are writes that do cause clients to block. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetSyncWriteThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: StorageTarget Total Write Throughput - value: StorageTargetTotalWriteThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The total rate that the Cache writes data to a particular StorageTarget. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalWriteThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: StorageTarget Latency - value: StorageTargetLatency - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The average round trip latency of all the file operations the Cache sends to a partricular StorageTarget. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetLatency - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: MilliSeconds - - name: - localizedValue: StorageTarget Metadata Read IOPS - value: StorageTargetMetadataReadIOPS - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate of file operations that do not modify persistent state, and excluding the read operation, that the Cache sends to a particular StorageTarget. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataReadIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: StorageTarget Metadata Write IOPS - value: StorageTargetMetadataWriteIOPS - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate of file operations that do modify persistent state and excluding the write operation, that the Cache sends to a particular StorageTarget. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataWriteIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: StorageTarget Read IOPS - value: StorageTargetReadIOPS - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate of file read operations the Cache sends to a particular StorageTarget. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadIOPS - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: CountPerSecond - - name: - localizedValue: StorageTarget Read Ahead Throughput - value: StorageTargetReadAheadThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate the Cache opportunisticly reads data from the StorageTarget. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadAheadThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: StorageTarget Fill Throughput - value: StorageTargetFillThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The rate the Cache reads data from the StorageTarget to handle a cache miss. - id: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetFillThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - - name: - localizedValue: StorageTarget Total Read Throughput - value: StorageTargetTotalReadThroughput - dimensions: - - localizedValue: StorageTarget - value: StorageTarget - displayDescription: The total rate that the Cache reads data from a particular StorageTarget. - id: >- - /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalReadThroughput - isDimensionRequired: false - metricAvailabilities: - - retention: P93D - timeGrain: PT1M - - retention: P93D - timeGrain: PT5M - - retention: P93D - timeGrain: PT15M - - retention: P93D - timeGrain: PT30M - - retention: P93D - timeGrain: PT1H - - retention: P93D - timeGrain: PT6H - - retention: P93D - timeGrain: PT12H - - retention: P93D - timeGrain: P1D - metricClass: Transactions - namespace: microsoft.storagecache/caches - primaryAggregationType: Average - resourceId: /subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache - supportedAggregationTypes: - - Minimum - - Maximum - - Average - unit: BytesPerSecond - x-ms-pageable: - nextLinkName: null - language: !Languages - default: - name: List - description: Lists the metric definitions for the resource. - paging: - nextLinkName: null - protocol: !Protocols {} - language: !Languages - default: - name: MetricDefinitions - description: '' - protocol: !Protocols {} - - !OperationGroup - $key: Metrics - operations: - - !Operation - apiVersions: - - !ApiVersion - version: '2018-01-01' - parameters: - - *ref_274 - - !Parameter &ref_285 - schema: *ref_275 - implementation: Method - required: true - extensions: - x-ms-skip-url-encoding: true - language: !Languages - default: - name: resourceUri - description: The identifier of the resource. - serializedName: resourceUri - protocol: !Protocols - http: !HttpParameter - in: path - - !Parameter &ref_286 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: timespan - description: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. - serializedName: timespan - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_287 - schema: *ref_282 - implementation: Method - language: !Languages - default: - name: interval - description: The interval (i.e. timegrain) of the query. - serializedName: interval - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_288 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: metricnames - description: 'The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: ''Metric,Name1'' should be **''Metric%2Name1''**' - serializedName: metricnames - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_289 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: aggregation - description: The list of aggregation types (comma separated) to retrieve. - serializedName: aggregation - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_290 - schema: *ref_283 - implementation: Method - language: !Languages - default: - name: top - description: |- - The maximum number of records to retrieve. - Valid only if $filter is specified. - Defaults to 10. - serializedName: top - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_291 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: orderby - description: |- - The aggregation to use for sorting results and the direction of the sort. - Only one order can be specified. - Examples: sum asc. - serializedName: orderby - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_292 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: filter - description: >- - The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' - and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A - = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses - round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is - **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "** - serializedName: $filter - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_293 - schema: *ref_284 - implementation: Method - language: !Languages - default: - name: resultType - description: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - serializedName: resultType - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter - schema: *ref_276 - implementation: Method - origin: modelerfour:synthesized/api-version - required: true - language: !Languages - default: - name: apiVersion - description: Api Version - serializedName: api-version - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_294 - schema: *ref_277 - implementation: Method - language: !Languages - default: - name: metricnamespace - description: Metric namespace to query metric definitions for. - serializedName: metricnamespace - protocol: !Protocols - http: !HttpParameter - in: query - requests: - - !Request - parameters: - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: [] - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpRequest - path: /{resourceUri}/providers/Microsoft.Insights/metrics - method: get - uri: '{$host}' - signatureParameters: - - *ref_285 - - *ref_286 - - *ref_287 - - *ref_288 - - *ref_289 - - *ref_290 - - *ref_291 - - *ref_292 - - *ref_293 - - *ref_294 - responses: - - !SchemaResponse - schema: *ref_295 - language: !Languages - default: - name: '' - description: Successful request to get the list of metric values. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_281 - language: !Languages - default: - name: '' - description: Error response describing why the operation failed. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - Get Metric for data: - parameters: - $filter: BlobType eq '*' - aggregation: Average,count - api-version: '2018-01-01' - interval: PT1M - metric: BlobCapacity - metricnamespace: Microsoft.Storage/storageAccounts/blobServices - orderby: Average asc - resourceUri: subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default - timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z - top: 3 - responses: - '200': - body: - cost: 0 - interval: PT1M - namespace: Microsoft.Storage/storageAccounts/blobServices - resourceregion: eastus2 - timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z - value: - - name: - localizedValue: Blob Capacity - value: BlobCapacity - type: Microsoft.Insights/metrics - displayDescription: The amount of storage used by the storage account’s Blob service in bytes. - id: /subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity - timeseries: - - data: - - count: 0 - timeStamp: '2017-04-14T02:20:00Z' - - count: 0 - timeStamp: '2017-04-14T02:21:00Z' - - count: 0 - timeStamp: '2017-04-14T02:22:00Z' - - average: 0 - count: 1 - timeStamp: '2017-04-14T02:23:00Z' - metadatavalues: - - name: - localizedValue: blobtype - value: blobtype - value: PageBlob - - data: - - count: 0 - timeStamp: '2017-04-14T02:20:00Z' - - count: 0 - timeStamp: '2017-04-14T02:21:00Z' - - count: 0 - timeStamp: '2017-04-14T02:22:00Z' - - average: 245 - count: 1 - timeStamp: '2017-04-14T02:23:00Z' - metadatavalues: - - name: - localizedValue: blobtype - value: blobtype - value: BlockBlob - unit: Bytes - Get Metric for metadata: - parameters: - $filter: BlobType eq '*' - aggregation: Average,count - api-version: '2018-01-01' - interval: PT1M - metric: BlobCapacity - metricnamespace: Microsoft.Storage/storageAccounts/blobServices - orderby: Average asc - resourceUri: subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default - resulttype: metadata - timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z - top: 3 - responses: - '200': - body: - namespace: Microsoft.Storage/storageAccounts/blobServices - resourceregion: eastus2 - timespan: 2017-04-14T02:20:00Z/2017-04-14T04:20:00Z - value: - - name: - localizedValue: Blob Capacity - value: BlobCapacity - type: Microsoft.Insights/metrics - displayDescription: The amount of storage used by the storage account’s Blob service in bytes. - id: /subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default/providers/Microsoft.Insights/metrics/BlobCapacity - timeseries: - - metadatavalues: - - name: - localizedValue: blobtype - value: blobtype - value: BlockBlob - - metadatavalues: - - name: - localizedValue: blobtype - value: blobtype - value: PageBlob - unit: Bytes - Get Metric with error: - parameters: - aggregation: average - api-version: '2018-01-01' - interval: FULL - metricnames: MongoRequestsCount,MongoRequests - metricnamespace: microsoft.documentdb/databaseaccounts - resourceUri: subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo - timespan: 2021-06-07T21:51:00Z/2021-06-08T01:51:00Z - responses: - '200': - body: - cost: 239 - interval: PT4H - namespace: microsoft.documentdb/databaseaccounts - resourceregion: westus2 - timespan: 2021-06-07T21:51:00Z/2021-06-08T01:51:00Z - value: - - name: - localizedValue: (deprecated) Mongo Request Rate - value: MongoRequestsCount - type: Microsoft.Insights/metrics - errorCode: InvalidSamplingType - errorMessage: Sampling type is not found. Metric:CosmosDBCustomer,AzureMonitor,MongoRequests, SamplingType:NullableAverage. - id: /subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequestsCount - timeseries: [] - unit: CountPerSecond - - name: - localizedValue: Mongo Requests - value: MongoRequests - type: Microsoft.Insights/metrics - displayDescription: Number of Mongo Requests Made - errorCode: Success - id: /subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequests - timeseries: - - data: - - average: 0 - timeStamp: '2021-06-07T21:51:00Z' - metadatavalues: [] - unit: Count - x-ms-odata: '#/components/schemas/MetadataValue' - language: !Languages - default: - name: List - description: '**Lists the metric values for a resource**.' - protocol: !Protocols {} - language: !Languages - default: - name: Metrics - description: '' - protocol: !Protocols {} - - !OperationGroup - $key: MetricNamespaces - operations: - - !Operation - apiVersions: - - !ApiVersion - version: 2017-12-01-preview - parameters: - - *ref_274 - - !Parameter &ref_298 - schema: *ref_275 - implementation: Method - required: true - extensions: - x-ms-skip-url-encoding: true - language: !Languages - default: - name: resourceUri - description: The identifier of the resource. - serializedName: resourceUri - protocol: !Protocols - http: !HttpParameter - in: path - - !Parameter - schema: *ref_296 - implementation: Method - origin: modelerfour:synthesized/api-version - required: true - language: !Languages - default: - name: apiVersion - description: Api Version - serializedName: api-version - protocol: !Protocols - http: !HttpParameter - in: query - - !Parameter &ref_299 - schema: *ref_297 - implementation: Method - language: !Languages - default: - name: startTime - description: The ISO 8601 conform Date start time from which to query for metric namespaces. - serializedName: startTime - protocol: !Protocols - http: !HttpParameter - in: query - requests: - - !Request - parameters: - - !Parameter - schema: *ref_261 - implementation: Method - origin: modelerfour:synthesized/accept - required: true - language: !Languages - default: - name: accept - description: Accept header - serializedName: Accept - protocol: !Protocols - http: !HttpParameter - in: header - signatureParameters: [] - language: !Languages - default: - name: '' - description: '' - protocol: !Protocols - http: !HttpRequest - path: /{resourceUri}/providers/microsoft.insights/metricNamespaces - method: get - uri: '{$host}' - signatureParameters: - - *ref_298 - - *ref_299 - responses: - - !SchemaResponse - schema: *ref_300 - language: !Languages - default: - name: '' - description: Successful request to get the list of metric namespaces - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - '200' - exceptions: - - !SchemaResponse - schema: *ref_281 - language: !Languages - default: - name: '' - description: Error response describing why the operation failed. - protocol: !Protocols - http: !HttpResponse - knownMediaType: json - mediaTypes: - - application/json - statusCodes: - - default - extensions: - x-ms-examples: - Get Metric Namespaces without filter: - parameters: - api-version: 2017-12-01-preview - resourceUri: subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill - startTime: '2020-08-31T15:53:00Z' - responses: - '200': - body: - value: - - name: Azure.ApplicationInsights - type: Microsoft.Insights/metricNamespaces - classification: Custom - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/Azure.ApplicationInsights - properties: - metricNamespaceName: Azure.ApplicationInsights - - name: microsoft.insights-components - type: Microsoft.Insights/metricNamespaces - classification: Platform - id: /subscriptions/182c901a-129a-4f5d-86e4-cc6b294590a2/resourceGroups/hyr-log/providers/microsoft.insights/components/f1-bill/providers/microsoft.insights/metricNamespaces/microsoft.insights-components - properties: - metricNamespaceName: microsoft.insights/components - x-ms-pageable: - nextLinkName: null - language: !Languages - default: - name: List - description: Lists the metric namespaces for the resource. - paging: - nextLinkName: null - protocol: !Protocols {} - language: !Languages - default: - name: MetricNamespaces - description: '' - protocol: !Protocols {} -security: !Security - authenticationRequired: false - schemes: [] -language: !Languages - default: - name: Query - description: '' -protocol: !Protocols - http: !HttpModel {} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json b/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json deleted file mode 100644 index c18da4587c3ae..0000000000000 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Configuration.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "OutputFolder": ".", - "Namespace": "Azure.Monitor.Query", - "LibraryName": null, - "SharedSourceFolders": [ - "..\\..\\..\\..\\core\\Azure.Core\\src\\Shared\\", - "..\\..\\..\\..\\..\\..\\..\\Users\\nibhati\\.nuget\\packages\\microsoft.azure.autorest.csharp\\3.0.0-beta.20210822.2\\content\\Generator.Shared\\" - ] -} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs new file mode 100644 index 0000000000000..cbdc1b1afde82 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Monitor.Query.Models; + +namespace Azure.Monitor.Query +{ + internal partial class MetricDefinitionsRestClient + { + private Uri endpoint; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of MetricDefinitionsRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + public MetricDefinitionsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) + { + this.endpoint = endpoint ?? new Uri("https://management.azure.com"); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceUri, string metricnamespace) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Insights/metricDefinitions", false); + uri.AppendQuery("api-version", "2018-01-01", true); + if (metricnamespace != null) + { + uri.AppendQuery("metricnamespace", metricnamespace, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists the metric definitions for the resource. + /// The identifier of the resource. + /// Metric namespace to query metric definitions for. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, metricnamespace); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MetricDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MetricDefinitionCollection.DeserializeMetricDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists the metric definitions for the resource. + /// The identifier of the resource. + /// Metric namespace to query metric definitions for. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, metricnamespace); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MetricDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MetricDefinitionCollection.DeserializeMetricDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs new file mode 100644 index 0000000000000..f4a56530a16ed --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricNamespacesRestClient.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Monitor.Query.Models; + +namespace Azure.Monitor.Query +{ + internal partial class MetricNamespacesRestClient + { + private Uri endpoint; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of MetricNamespacesRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + public MetricNamespacesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) + { + this.endpoint = endpoint ?? new Uri("https://management.azure.com"); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceUri, string startTime) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/microsoft.insights/metricNamespaces", false); + uri.AppendQuery("api-version", "2017-12-01-preview", true); + if (startTime != null) + { + uri.AppendQuery("startTime", startTime, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists the metric namespaces for the resource. + /// The identifier of the resource. + /// The ISO 8601 conform Date start time from which to query for metric namespaces. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, string startTime = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, startTime); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MetricNamespaceCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MetricNamespaceCollection.DeserializeMetricNamespaceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists the metric namespaces for the resource. + /// The identifier of the resource. + /// The ISO 8601 conform Date start time from which to query for metric namespaces. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, string startTime = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, startTime); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MetricNamespaceCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MetricNamespaceCollection.DeserializeMetricNamespaceCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs new file mode 100644 index 0000000000000..83b4e94be0bb3 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Monitor.Query.Models; + +namespace Azure.Monitor.Query +{ + internal partial class MetricsRestClient + { + private Uri endpoint; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of MetricsRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + public MetricsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) + { + this.endpoint = endpoint ?? new Uri("https://management.azure.com"); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceUri, string timespan, TimeSpan? interval, string metricnames, string aggregation, int? top, string orderby, string filter, ResultType? resultType, string metricnamespace) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/", false); + uri.AppendPath(resourceUri, false); + uri.AppendPath("/providers/Microsoft.Insights/metrics", false); + if (timespan != null) + { + uri.AppendQuery("timespan", timespan, true); + } + if (interval != null) + { + uri.AppendQuery("interval", interval.Value, "P", true); + } + if (metricnames != null) + { + uri.AppendQuery("metricnames", metricnames, true); + } + if (aggregation != null) + { + uri.AppendQuery("aggregation", aggregation, true); + } + if (top != null) + { + uri.AppendQuery("top", top.Value, true); + } + if (orderby != null) + { + uri.AppendQuery("orderby", orderby, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (resultType != null) + { + uri.AppendQuery("resultType", resultType.Value.ToSerialString(), true); + } + uri.AppendQuery("api-version", "2018-01-01", true); + if (metricnamespace != null) + { + uri.AppendQuery("metricnamespace", metricnamespace, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// **Lists the metric values for a resource**. + /// The identifier of the resource. + /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. + /// The interval (i.e. timegrain) of the query. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. + /// The list of aggregation types (comma separated) to retrieve. + /// + /// The maximum number of records to retrieve. + /// Valid only if $filter is specified. + /// Defaults to 10. + /// + /// + /// The aggregation to use for sorting results and the direction of the sort. + /// Only one order can be specified. + /// Examples: sum asc. + /// + /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. + /// Metric namespace to query metric definitions for. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, timespan, interval, metricnames, aggregation, top, orderby, filter, resultType, metricnamespace); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MetricsQueryResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MetricsQueryResult.DeserializeMetricsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// **Lists the metric values for a resource**. + /// The identifier of the resource. + /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. + /// The interval (i.e. timegrain) of the query. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. + /// The list of aggregation types (comma separated) to retrieve. + /// + /// The maximum number of records to retrieve. + /// Valid only if $filter is specified. + /// Defaults to 10. + /// + /// + /// The aggregation to use for sorting results and the direction of the sort. + /// Only one order can be specified. + /// Examples: sum asc. + /// + /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. + /// Metric namespace to query metric definitions for. + /// The cancellation token to use. + /// is null. + public Response List(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) + { + if (resourceUri == null) + { + throw new ArgumentNullException(nameof(resourceUri)); + } + + using var message = CreateListRequest(resourceUri, timespan, interval, metricnames, aggregation, top, orderby, filter, resultType, metricnamespace); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MetricsQueryResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MetricsQueryResult.DeserializeMetricsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs new file mode 100644 index 0000000000000..4363e13230212 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class BatchQueryRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + if (Optional.IsCollectionDefined(Headers)) + { + writer.WritePropertyName("headers"); + writer.WriteStartObject(); + foreach (var item in Headers) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("body"); + writer.WriteObjectValue(Body); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Method)) + { + writer.WritePropertyName("method"); + writer.WriteStringValue(Method); + } + writer.WritePropertyName("workspace"); + writer.WriteStringValue(Workspace); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs new file mode 100644 index 0000000000000..45340f67a2905 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// An single request in a batch. + internal partial class BatchQueryRequest + { + /// Initializes a new instance of BatchQueryRequest. + /// The error details. + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + /// Workspace Id to be included in the query. + /// , , or is null. + public BatchQueryRequest(string id, QueryBody body, string workspace) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + if (workspace == null) + { + throw new ArgumentNullException(nameof(workspace)); + } + + Id = id; + Headers = new ChangeTrackingDictionary(); + Body = body; + Path = "/query"; + Method = "POST"; + Workspace = workspace; + } + + /// The error details. + public string Id { get; } + /// Dictionary of <string>. + public IDictionary Headers { get; } + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + public QueryBody Body { get; } + public string Path { get; set; } + public string Method { get; set; } + /// Workspace Id to be included in the query. + public string Workspace { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs new file mode 100644 index 0000000000000..ef45e5e7ede4f --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class BatchQueryResponse + { + internal static BatchQueryResponse DeserializeBatchQueryResponse(JsonElement element) + { + Optional id = default; + Optional status = default; + Optional body = default; + Optional> headers = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("body")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + body = LogsBatchQueryResult.DeserializeLogsBatchQueryResult(property.Value); + continue; + } + if (property.NameEquals("headers")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + headers = dictionary; + continue; + } + } + return new BatchQueryResponse(id.Value, Optional.ToNullable(status), body.Value, Optional.ToDictionary(headers)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs new file mode 100644 index 0000000000000..9ff6eda662dee --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchQueryResponse.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The BatchQueryResponse. + internal partial class BatchQueryResponse + { + /// Initializes a new instance of BatchQueryResponse. + internal BatchQueryResponse() + { + Headers = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of BatchQueryResponse. + /// + /// + /// Contains the tables, columns & rows resulting from a query. + /// Dictionary of <string>. + internal BatchQueryResponse(string id, int? status, LogsBatchQueryResult body, IReadOnlyDictionary headers) + { + Id = id; + Status = status; + _body = body; + Headers = headers; + } + + public string Id { get; } + public int? Status { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary Headers { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs new file mode 100644 index 0000000000000..e11fe601f8284 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class BatchRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("requests"); + writer.WriteStartArray(); + foreach (var item in Requests) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs new file mode 100644 index 0000000000000..7447577d726a1 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/BatchRequest.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Monitor.Query.Models +{ + /// An array of requests. + internal partial class BatchRequest + { + /// Initializes a new instance of BatchRequest. + /// An single request in a batch. + /// is null. + public BatchRequest(IEnumerable requests) + { + if (requests == null) + { + throw new ArgumentNullException(nameof(requests)); + } + + Requests = requests.ToList(); + } + + /// An single request in a batch. + public IList Requests { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs new file mode 100644 index 0000000000000..5b49881dce4e3 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class ErrorDetail + { + internal static ErrorDetail DeserializeErrorDetail(JsonElement element) + { + string code = default; + string message = default; + Optional target = default; + Optional value = default; + Optional> resources = default; + Optional additionalProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("resources")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resources = array; + continue; + } + if (property.NameEquals("additionalProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + additionalProperties = property.Value.GetObject(); + continue; + } + } + return new ErrorDetail(code, message, target.Value, value.Value, Optional.ToList(resources), additionalProperties.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs new file mode 100644 index 0000000000000..ab9f28a733fe7 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorDetail.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Error details. + internal partial class ErrorDetail + { + /// Initializes a new instance of ErrorDetail. + /// The error's code. + /// A human readable error message. + /// or is null. + internal ErrorDetail(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + Resources = new ChangeTrackingList(); + } + + /// Initializes a new instance of ErrorDetail. + /// The error's code. + /// A human readable error message. + /// Indicates which property in the request is responsible for the error. + /// Indicates which value in 'target' is responsible for the error. + /// Indicates resources which were responsible for the error. + /// Additional properties that can be provided on the error details object. + internal ErrorDetail(string code, string message, string target, string value, IReadOnlyList resources, object additionalProperties) + { + Code = code; + Message = message; + Target = target; + Value = value; + Resources = resources; + AdditionalProperties = additionalProperties; + } + + /// The error's code. + public string Code { get; } + /// A human readable error message. + public string Message { get; } + /// Indicates which property in the request is responsible for the error. + public string Target { get; } + /// Indicates which value in 'target' is responsible for the error. + public string Value { get; } + /// Indicates resources which were responsible for the error. + public IReadOnlyList Resources { get; } + /// Additional properties that can be provided on the error details object. + public object AdditionalProperties { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs new file mode 100644 index 0000000000000..070fac110bbde --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class ErrorInfo + { + internal static ErrorInfo DeserializeErrorInfo(JsonElement element) + { + string code = default; + string message = default; + Optional> details = default; + Optional innererror = default; + Optional additionalProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorDetail.DeserializeErrorDetail(item)); + } + details = array; + continue; + } + if (property.NameEquals("innererror")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + innererror = DeserializeErrorInfo(property.Value); + continue; + } + if (property.NameEquals("additionalProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + additionalProperties = property.Value.GetObject(); + continue; + } + } + return new ErrorInfo(code, message, Optional.ToList(details), innererror.Value, additionalProperties.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs new file mode 100644 index 0000000000000..dc5e2ec4632b8 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorInfo.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The code and message for an error. + internal partial class ErrorInfo + { + /// Initializes a new instance of ErrorInfo. + /// A machine readable error code. + /// A human readable error message. + /// or is null. + internal ErrorInfo(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of ErrorInfo. + /// A machine readable error code. + /// A human readable error message. + /// error details. + /// Inner error details if they exist. + /// Additional properties that can be provided on the error info object. + internal ErrorInfo(string code, string message, IReadOnlyList details, ErrorInfo innererror, object additionalProperties) + { + Code = code; + Message = message; + Details = details; + Innererror = innererror; + AdditionalProperties = additionalProperties; + } + + /// A machine readable error code. + public string Code { get; } + /// A human readable error message. + public string Message { get; } + /// error details. + public IReadOnlyList Details { get; } + /// Inner error details if they exist. + public ErrorInfo Innererror { get; } + /// Additional properties that can be provided on the error info object. + public object AdditionalProperties { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs new file mode 100644 index 0000000000000..947fb6477edb7 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class ErrorResponse + { + internal static ErrorResponse DeserializeErrorResponse(JsonElement element) + { + ErrorInfo error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error")) + { + error = ErrorInfo.DeserializeErrorInfo(property.Value); + continue; + } + } + return new ErrorResponse(error); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 0000000000000..c00d434bb6024 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Contains details when the response code indicates an error. + internal partial class ErrorResponse + { + /// Initializes a new instance of ErrorResponse. + /// The error details. + /// is null. + internal ErrorResponse(ErrorInfo error) + { + if (error == null) + { + throw new ArgumentNullException(nameof(error)); + } + + Error = error; + } + + /// The error details. + public ErrorInfo Error { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs new file mode 100644 index 0000000000000..97c4668e0d387 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class ErrorResponseAutoGenerated + { + internal static ErrorResponseAutoGenerated DeserializeErrorResponseAutoGenerated(JsonElement element) + { + Optional code = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new ErrorResponseAutoGenerated(code.Value, message.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs new file mode 100644 index 0000000000000..05a0e41019994 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ErrorResponseAutoGenerated.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Monitor.Query.Models +{ + /// Describes the format of Error response. + internal partial class ErrorResponseAutoGenerated + { + /// Initializes a new instance of ErrorResponseAutoGenerated. + internal ErrorResponseAutoGenerated() + { + } + + /// Initializes a new instance of ErrorResponseAutoGenerated. + /// Error code. + /// Error message indicating why the operation failed. + internal ErrorResponseAutoGenerated(string code, string message) + { + Code = code; + Message = message; + } + + /// Error code. + public string Code { get; } + /// Error message indicating why the operation failed. + public string Message { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs new file mode 100644 index 0000000000000..ecaf526f2a57b --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class LocalizableString + { + internal static LocalizableString DeserializeLocalizableString(JsonElement element) + { + string value = default; + Optional localizedValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue")) + { + localizedValue = property.Value.GetString(); + continue; + } + } + return new LocalizableString(value, localizedValue.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs new file mode 100644 index 0000000000000..53df968e429ec --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LocalizableString.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// The localizable string class. + internal partial class LocalizableString + { + /// Initializes a new instance of LocalizableString. + /// the invariant value. + /// is null. + internal LocalizableString(string value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value; + } + + /// Initializes a new instance of LocalizableString. + /// the invariant value. + /// the locale specific value. + internal LocalizableString(string value, string localizedValue) + { + Value = value; + LocalizedValue = localizedValue; + } + + /// the invariant value. + public string Value { get; } + /// the locale specific value. + public string LocalizedValue { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs new file mode 100644 index 0000000000000..74dbab41c0844 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.Serialization.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class LogsBatchQueryResult + { + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs new file mode 100644 index 0000000000000..8a199528e1ff7 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Monitor.Query.Models +{ + /// Contains the tables, columns & rows resulting from a query. + public partial class LogsBatchQueryResult : LogsQueryResult + { + /// Initializes a new instance of LogsBatchQueryResult. + /// The list of tables, columns and rows. + /// is null. + internal LogsBatchQueryResult(IEnumerable allTables) : base(allTables) + { + if (allTables == null) + { + throw new ArgumentNullException(nameof(allTables)); + } + } + + /// Initializes a new instance of LogsBatchQueryResult. + /// The list of tables, columns and rows. + /// Any object. + /// Any object. + /// Any object. + internal LogsBatchQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) : base(allTables, statistics, visualization, error) + { + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs new file mode 100644 index 0000000000000..0e66479af77bb --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class LogsBatchQueryResults + { + internal static LogsBatchQueryResults DeserializeLogsBatchQueryResults(JsonElement element) + { + Optional> responses = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("responses")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchQueryResponse.DeserializeBatchQueryResponse(item)); + } + responses = array; + continue; + } + } + return new LogsBatchQueryResults(Optional.ToList(responses)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs new file mode 100644 index 0000000000000..8f4d7937aecfa --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsBatchQueryResults.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Response to a batch query. + public partial class LogsBatchQueryResults + { + /// Initializes a new instance of LogsBatchQueryResults. + internal LogsBatchQueryResults() + { + Responses = new ChangeTrackingList(); + } + + /// Initializes a new instance of LogsBatchQueryResults. + /// An array of responses corresponding to each individual request in a batch. + internal LogsBatchQueryResults(IReadOnlyList responses) + { + Responses = responses; + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs new file mode 100644 index 0000000000000..a52a62206486e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsColumnType.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Monitor.Query.Models +{ + /// The data type of this column. + public readonly partial struct LogsColumnType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public LogsColumnType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BoolValue = "bool"; + private const string DatetimeValue = "datetime"; + private const string DynamicValue = "dynamic"; + private const string IntValue = "int"; + private const string LongValue = "long"; + private const string RealValue = "real"; + private const string StringValue = "string"; + private const string GuidValue = "guid"; + private const string DecimalValue = "decimal"; + private const string TimespanValue = "timespan"; + + /// bool. + public static LogsColumnType Bool { get; } = new LogsColumnType(BoolValue); + /// datetime. + public static LogsColumnType Datetime { get; } = new LogsColumnType(DatetimeValue); + /// dynamic. + public static LogsColumnType Dynamic { get; } = new LogsColumnType(DynamicValue); + /// int. + public static LogsColumnType Int { get; } = new LogsColumnType(IntValue); + /// long. + public static LogsColumnType Long { get; } = new LogsColumnType(LongValue); + /// real. + public static LogsColumnType Real { get; } = new LogsColumnType(RealValue); + /// string. + public static LogsColumnType String { get; } = new LogsColumnType(StringValue); + /// guid. + public static LogsColumnType Guid { get; } = new LogsColumnType(GuidValue); + /// decimal. + public static LogsColumnType Decimal { get; } = new LogsColumnType(DecimalValue); + /// timespan. + public static LogsColumnType Timespan { get; } = new LogsColumnType(TimespanValue); + /// Determines if two values are the same. + public static bool operator ==(LogsColumnType left, LogsColumnType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LogsColumnType left, LogsColumnType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LogsColumnType(string value) => new LogsColumnType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LogsColumnType other && Equals(other); + /// + public bool Equals(LogsColumnType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs new file mode 100644 index 0000000000000..7c04834c8cb8e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class LogsQueryResult + { + internal static LogsQueryResult DeserializeLogsQueryResult(JsonElement element) + { + IReadOnlyList tables = default; + Optional statistics = default; + Optional render = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tables")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); + } + tables = array; + continue; + } + if (property.NameEquals("statistics")) + { + statistics = property.Value.Clone(); + continue; + } + if (property.NameEquals("render")) + { + render = property.Value.Clone(); + continue; + } + if (property.NameEquals("error")) + { + error = property.Value.Clone(); + continue; + } + } + return new LogsQueryResult(tables, statistics, render, error); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs new file mode 100644 index 0000000000000..57c78433f1d8a --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; + +namespace Azure.Monitor.Query.Models +{ + /// Contains the tables, columns & rows resulting from a query. + public partial class LogsQueryResult + { + /// Initializes a new instance of LogsQueryResult. + /// The list of tables, columns and rows. + /// is null. + internal LogsQueryResult(IEnumerable allTables) + { + if (allTables == null) + { + throw new ArgumentNullException(nameof(allTables)); + } + + AllTables = allTables.ToList(); + } + + /// Initializes a new instance of LogsQueryResult. + /// The list of tables, columns and rows. + /// Any object. + /// Any object. + /// Any object. + internal LogsQueryResult(IReadOnlyList allTables, JsonElement statistics, JsonElement visualization, JsonElement error) + { + AllTables = allTables; + _statistics = statistics; + _visualization = visualization; + _error = error; + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs new file mode 100644 index 0000000000000..186f482383270 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class LogsQueryResultColumn + { + internal static LogsQueryResultColumn DeserializeLogsQueryResultColumn(JsonElement element) + { + string name = default; + LogsColumnType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new LogsColumnType(property.Value.GetString()); + continue; + } + } + return new LogsQueryResultColumn(name, type); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs new file mode 100644 index 0000000000000..169c5fd092841 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// A column in a table. + public partial class LogsQueryResultColumn + { + /// Initializes a new instance of LogsQueryResultColumn. + /// The name of this column. + /// The data type of this column. + /// is null. + internal LogsQueryResultColumn(string name, LogsColumnType type) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + Type = type; + } + + /// The name of this column. + public string Name { get; } + /// The data type of this column. + public LogsColumnType Type { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs new file mode 100644 index 0000000000000..f3b52004a9992 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class LogsTable + { + internal static LogsTable DeserializeLogsQueryResultTable(JsonElement element) + { + string name = default; + IReadOnlyList columns = default; + JsonElement rows = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("columns")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LogsQueryResultColumn.DeserializeLogsQueryResultColumn(item)); + } + columns = array; + continue; + } + if (property.NameEquals("rows")) + { + rows = property.Value.Clone(); + continue; + } + } + return new LogsTable(name, columns, rows); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs new file mode 100644 index 0000000000000..e89fc974ce47a --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Contains the columns and rows for one table in a query response. + [CodeGenModel("LogsQueryResultTable")] + public partial class LogsTable + { + /// Initializes a new instance of LogsTable. + /// The name of the table. + /// The list of columns in this table. + /// The resulting rows from this query. + /// or is null. + internal LogsTable(string name, IEnumerable columns, JsonElement internalRows) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (columns == null) + { + throw new ArgumentNullException(nameof(columns)); + } + + Name = name; + Columns = columns.ToList(); + InternalRows = internalRows; + } + + /// Initializes a new instance of LogsTable. + /// The name of the table. + /// The list of columns in this table. + /// The resulting rows from this query. + internal LogsTable(string name, IReadOnlyList columns, JsonElement internalRows) + { + Name = name; + Columns = columns; + InternalRows = internalRows; + } + + /// The name of the table. + public string Name { get; } + /// The list of columns in this table. + public IReadOnlyList Columns { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs new file mode 100644 index 0000000000000..34e53d67d4dce --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplication.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Application Insights apps that were part of the metadata request and that the user has access to. + internal partial class MetadataApplication + { + /// Initializes a new instance of MetadataApplication. + /// The ID of the Application Insights app. + /// The ARM resource ID of the Application Insights app. + /// The name of the Application Insights app. + /// The Azure region of the Application Insights app. + /// , , , or is null. + internal MetadataApplication(string id, string resourceId, string name, string region) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (region == null) + { + throw new ArgumentNullException(nameof(region)); + } + + Id = id; + ResourceId = resourceId; + Name = name; + Region = region; + } + + /// The ID of the Application Insights app. + public string Id { get; } + /// The ARM resource ID of the Application Insights app. + public string ResourceId { get; } + /// The name of the Application Insights app. + public string Name { get; } + /// The Azure region of the Application Insights app. + public string Region { get; } + /// The related metadata items for the Application Insights app. + public MetadataApplicationRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs new file mode 100644 index 0000000000000..8adf27b7069cd --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataApplicationRelated.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the Application Insights app. + internal partial class MetadataApplicationRelated + { + /// Initializes a new instance of MetadataApplicationRelated. + internal MetadataApplicationRelated() + { + Tables = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + } + + /// The related tables for the Application Insights app. + public IReadOnlyList Tables { get; } + /// The related functions for the Application Insights app. + public IReadOnlyList Functions { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs new file mode 100644 index 0000000000000..fa5525d7bc2f3 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategory.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Categories are used to group other metadata entities. + internal partial class MetadataCategory + { + /// Initializes a new instance of MetadataCategory. + /// The ID of the category. + /// The display name of the category. + /// or is null. + internal MetadataCategory(string id, string displayName) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (displayName == null) + { + throw new ArgumentNullException(nameof(displayName)); + } + + Id = id; + DisplayName = displayName; + } + + /// The ID of the category. + public string Id { get; } + /// The display name of the category. + public string DisplayName { get; } + /// The description of the category. + public string Description { get; } + /// The related metadata items for the category. + public MetadataCategoryRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs new file mode 100644 index 0000000000000..812faf089add9 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataCategoryRelated.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the category. + internal partial class MetadataCategoryRelated + { + /// Initializes a new instance of MetadataCategoryRelated. + internal MetadataCategoryRelated() + { + Tables = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Queries = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + } + + /// The tables related to the category. + public IReadOnlyList Tables { get; } + /// The functions related to the category. + public IReadOnlyList Functions { get; } + /// The resource types related to the category. + public IReadOnlyList ResourceTypes { get; } + /// The saved queries related to the category. + public IReadOnlyList Queries { get; } + /// The Log Analytics solutions related to the category. + public IReadOnlyList Solutions { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs new file mode 100644 index 0000000000000..c094800f090a5 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataColumnDataType.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Monitor.Query.Models +{ + /// The data type of the column. + internal readonly partial struct MetadataColumnDataType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public MetadataColumnDataType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BoolValue = "bool"; + private const string DatetimeValue = "datetime"; + private const string DynamicValue = "dynamic"; + private const string IntValue = "int"; + private const string LongValue = "long"; + private const string RealValue = "real"; + private const string StringValue = "string"; + private const string GuidValue = "guid"; + private const string DecimalValue = "decimal"; + private const string TimespanValue = "timespan"; + + /// bool. + public static MetadataColumnDataType Bool { get; } = new MetadataColumnDataType(BoolValue); + /// datetime. + public static MetadataColumnDataType Datetime { get; } = new MetadataColumnDataType(DatetimeValue); + /// dynamic. + public static MetadataColumnDataType Dynamic { get; } = new MetadataColumnDataType(DynamicValue); + /// int. + public static MetadataColumnDataType Int { get; } = new MetadataColumnDataType(IntValue); + /// long. + public static MetadataColumnDataType Long { get; } = new MetadataColumnDataType(LongValue); + /// real. + public static MetadataColumnDataType Real { get; } = new MetadataColumnDataType(RealValue); + /// string. + public static MetadataColumnDataType String { get; } = new MetadataColumnDataType(StringValue); + /// guid. + public static MetadataColumnDataType Guid { get; } = new MetadataColumnDataType(GuidValue); + /// decimal. + public static MetadataColumnDataType Decimal { get; } = new MetadataColumnDataType(DecimalValue); + /// timespan. + public static MetadataColumnDataType Timespan { get; } = new MetadataColumnDataType(TimespanValue); + /// Determines if two values are the same. + public static bool operator ==(MetadataColumnDataType left, MetadataColumnDataType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetadataColumnDataType left, MetadataColumnDataType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MetadataColumnDataType(string value) => new MetadataColumnDataType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetadataColumnDataType other && Equals(other); + /// + public bool Equals(MetadataColumnDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs new file mode 100644 index 0000000000000..e542f9b7ec92a --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunction.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Functions are stored Kusto queries that can be specified as part of queries by using their name. + internal partial class MetadataFunction + { + /// Initializes a new instance of MetadataFunction. + /// The ID of the function. + /// The name of the function, to be used in queries. + /// The KQL body of the function. + /// , , or is null. + internal MetadataFunction(string id, string name, string body) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + Id = id; + Name = name; + Body = body; + } + + /// The ID of the function. + public string Id { get; } + /// The name of the function, to be used in queries. + public string Name { get; } + /// The parameters/arguments of the function, if any. + public string Parameters { get; } + /// The display name of the function. + public string DisplayName { get; } + /// The description of the function. + public string Description { get; } + /// The KQL body of the function. + public string Body { get; } + /// The tags associated with the function. + public object Tags { get; } + /// The properties of the function. + public object Properties { get; } + /// The related metadata items for the function. + public MetadataFunctionRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs new file mode 100644 index 0000000000000..899d0af21598d --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataFunctionRelated.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the function. + internal partial class MetadataFunctionRelated + { + /// Initializes a new instance of MetadataFunctionRelated. + internal MetadataFunctionRelated() + { + Tables = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Workspaces = new ChangeTrackingList(); + } + + /// The related tables for the function. + public IReadOnlyList Tables { get; } + /// The related Log Analytics solutions for the function. + public IReadOnlyList Solutions { get; } + /// The related resource types for the function. + public IReadOnlyList ResourceTypes { get; } + /// The related categories for the function. + public IReadOnlyList Categories { get; } + /// The related workspaces for the function. + public IReadOnlyList Workspaces { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs new file mode 100644 index 0000000000000..7b82f7dfcf049 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissions.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Permission information for the metadata call, includes apps/workspaces/resource the user didn't have access to. + internal partial class MetadataPermissions + { + /// Initializes a new instance of MetadataPermissions. + /// The permission indication for the workspaces on the metadata request. + /// is null. + internal MetadataPermissions(IEnumerable workspaces) + { + if (workspaces == null) + { + throw new ArgumentNullException(nameof(workspaces)); + } + + Workspaces = workspaces.ToList(); + Resources = new ChangeTrackingList(); + Applications = new ChangeTrackingList(); + } + + /// The permission indication for the workspaces on the metadata request. + public IReadOnlyList Workspaces { get; } + /// The permission indication for the Azure resources on the metadata request. + public IReadOnlyList Resources { get; } + /// The permission indication for the Application Insights apps on the metadata request. + public IReadOnlyList Applications { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs new file mode 100644 index 0000000000000..e3e9a5d87c7eb --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsApplicationsItem.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// The MetadataPermissionsApplicationsItem. + internal partial class MetadataPermissionsApplicationsItem + { + /// Initializes a new instance of MetadataPermissionsApplicationsItem. + /// The resource ID on the permission indication. + /// is null. + internal MetadataPermissionsApplicationsItem(string resourceId) + { + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + + ResourceId = resourceId; + } + + /// The resource ID on the permission indication. + public string ResourceId { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs new file mode 100644 index 0000000000000..362b234ed6a88 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsResourcesItem.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The MetadataPermissionsResourcesItem. + internal partial class MetadataPermissionsResourcesItem + { + /// Initializes a new instance of MetadataPermissionsResourcesItem. + /// The resource ID on the permission indication. + /// is null. + internal MetadataPermissionsResourcesItem(string resourceId) + { + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + + ResourceId = resourceId; + DenyTables = new ChangeTrackingList(); + } + + /// The resource ID on the permission indication. + public string ResourceId { get; } + /// The list of tables that were denied access for the resource ID. + public IReadOnlyList DenyTables { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs new file mode 100644 index 0000000000000..c502f99455ded --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataPermissionsWorkspacesItem.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The MetadataPermissionsWorkspacesItem. + internal partial class MetadataPermissionsWorkspacesItem + { + /// Initializes a new instance of MetadataPermissionsWorkspacesItem. + /// The resource ID on the permission indication. + /// is null. + internal MetadataPermissionsWorkspacesItem(string resourceId) + { + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + + ResourceId = resourceId; + DenyTables = new ChangeTrackingList(); + } + + /// The resource ID on the permission indication. + public string ResourceId { get; } + /// The list of tables that were denied access for the resource ID. + public IReadOnlyList DenyTables { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs new file mode 100644 index 0000000000000..69f5e2f4a5351 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQuery.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Queries are stored pieces of KQL, along with a list of relevant metadata items. + internal partial class MetadataQuery + { + /// Initializes a new instance of MetadataQuery. + /// The ID of the query. + /// The KQL body of the query. + /// or is null. + internal MetadataQuery(string id, string body) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + Id = id; + Body = body; + Labels = new ChangeTrackingList(); + } + + /// The ID of the query. + public string Id { get; } + /// The display name of the query. + public string DisplayName { get; } + /// The description of the query. + public string Description { get; } + /// The KQL body of the query. + public string Body { get; } + /// The user defined labels associated with the query. + public IReadOnlyList Labels { get; } + /// The tags associated with the query. + public object Tags { get; } + /// The properties of the query. + public object Properties { get; } + /// The related metadata items for the query. + public MetadataQueryRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs new file mode 100644 index 0000000000000..cb11ec74ad137 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataQueryRelated.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the query. + internal partial class MetadataQueryRelated + { + /// Initializes a new instance of MetadataQueryRelated. + internal MetadataQueryRelated() + { + Categories = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Tables = new ChangeTrackingList(); + } + + /// The related categories for the query. + public IReadOnlyList Categories { get; } + /// The related Log Analytics solutions for the query. + public IReadOnlyList Solutions { get; } + /// The related resource types for the query. + public IReadOnlyList ResourceTypes { get; } + /// The related tables for the query. + public IReadOnlyList Tables { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs new file mode 100644 index 0000000000000..d8f56f083a7f6 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Metadata about types of Azure resources, containing relevant tables, functions, etc. + internal partial class MetadataResourceType + { + /// Initializes a new instance of MetadataResourceType. + /// The ID of the resource-type. + /// The type of the resource-type. + /// or is null. + internal MetadataResourceType(string id, string type) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (type == null) + { + throw new ArgumentNullException(nameof(type)); + } + + Id = id; + Type = type; + Labels = new ChangeTrackingList(); + } + + /// The ID of the resource-type. + public string Id { get; } + /// The type of the resource-type. + public string Type { get; } + /// The display name of the resource-type. + public string DisplayName { get; } + /// The description of the resource-type. + public string Description { get; } + /// The user-defined labels of the resource-type. + public IReadOnlyList Labels { get; } + /// The tags associated with the resource-type. + public object Tags { get; } + /// The properties of the resource-type. + public object Properties { get; } + /// The related metadata items for the resource-type. + public MetadataResourceTypeRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs new file mode 100644 index 0000000000000..d7ffac1ae4c3e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResourceTypeRelated.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the resource-type. + internal partial class MetadataResourceTypeRelated + { + /// Initializes a new instance of MetadataResourceTypeRelated. + internal MetadataResourceTypeRelated() + { + Tables = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Queries = new ChangeTrackingList(); + Workspaces = new ChangeTrackingList(); + Resources = new ChangeTrackingList(); + } + + /// The tables related to the resource-type. + public IReadOnlyList Tables { get; } + /// The functions related to the resource-type. + public IReadOnlyList Functions { get; } + /// The categories related to the resource-type. + public IReadOnlyList Categories { get; } + /// The queries related to the resource-type. + public IReadOnlyList Queries { get; } + /// The Log Analytics workspaces related to the resource-type. + public IReadOnlyList Workspaces { get; } + /// The Azure resources related to the resource-type. + public IReadOnlyList Resources { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs new file mode 100644 index 0000000000000..d4c899900f775 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataResults.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The metadata response for the app, including available tables, etc. + internal partial class MetadataResults + { + /// Initializes a new instance of MetadataResults. + internal MetadataResults() + { + Categories = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + Tables = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + Queries = new ChangeTrackingList(); + Applications = new ChangeTrackingList(); + Workspaces = new ChangeTrackingList(); + Resources = new ChangeTrackingList(); + Permissions = new ChangeTrackingList(); + } + + /// The list of categories that are referenced in this metadata response. + public IReadOnlyList Categories { get; } + /// The list of resource types that are referenced in this metadata response. + public IReadOnlyList ResourceTypes { get; } + /// The list of Log Analytics solutions installed on the workspace. + public IReadOnlyList Solutions { get; } + /// The list of tables and columns that comprise the schema of the workspace. + public IReadOnlyList Tables { get; } + /// The list of functions stored on the workspace, or introduced by solutions etc. + public IReadOnlyList Functions { get; } + /// The list of saved queries stored on the workspace, or introduced by solutions, resource types, etc. + public IReadOnlyList Queries { get; } + /// The list of Application Insights apps that were referenced in the metadata request. + public IReadOnlyList Applications { get; } + /// The list of Log Analytics workspaces that were referenced in the metadata request. + public IReadOnlyList Workspaces { get; } + /// The list of Azure resources that were referenced in the metadata request. + public IReadOnlyList Resources { get; } + /// The list of permission rules that affected the metadata request. + public IReadOnlyList Permissions { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs new file mode 100644 index 0000000000000..a43240b4919c6 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolution.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Solutions can group tables and functions that are associated with a certain Azure Log Analytics offering. + internal partial class MetadataSolution + { + /// Initializes a new instance of MetadataSolution. + /// The ID of the Log Analytics solution. + /// The name of the Log Analytics solution. + /// The related metadata items for the Log Analytics solution. + /// , , or is null. + internal MetadataSolution(string id, string name, MetadataSolutionRelated related) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (related == null) + { + throw new ArgumentNullException(nameof(related)); + } + + Id = id; + Name = name; + Related = related; + } + + /// The ID of the Log Analytics solution. + public string Id { get; } + /// The name of the Log Analytics solution. + public string Name { get; } + /// The display name of the Log Analytics solution. + public string DisplayName { get; } + /// The description of the Log Analytics solution. + public string Description { get; } + /// The tags that are associated with the Log Analytics solution. + public object Tags { get; } + /// The properties of the Log Analytics solution. + public object Properties { get; } + /// The related metadata items for the Log Analytics solution. + public MetadataSolutionRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs new file mode 100644 index 0000000000000..3febbb787df96 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataSolutionRelated.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the Log Analytics solution. + internal partial class MetadataSolutionRelated + { + /// Initializes a new instance of MetadataSolutionRelated. + /// The tables related to the Log Analytics solution. + /// is null. + internal MetadataSolutionRelated(IEnumerable tables) + { + if (tables == null) + { + throw new ArgumentNullException(nameof(tables)); + } + + Tables = tables.ToList(); + Functions = new ChangeTrackingList(); + Categories = new ChangeTrackingList(); + Queries = new ChangeTrackingList(); + Workspaces = new ChangeTrackingList(); + } + + /// The tables related to the Log Analytics solution. + public IReadOnlyList Tables { get; } + /// The functions related to the Log Analytics solution. + public IReadOnlyList Functions { get; } + /// The categories related to the Log Analytics solution. + public IReadOnlyList Categories { get; } + /// The saved queries related to the Log Analytics solution. + public IReadOnlyList Queries { get; } + /// The Workspaces referenced in the metadata request that are related to the Log Analytics solution. + public IReadOnlyList Workspaces { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs new file mode 100644 index 0000000000000..07247a046dec1 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTable.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Tables are part of the workspace schema, and contain a list of columns and a reference to other relevant metadata items. + internal partial class MetadataTable + { + /// Initializes a new instance of MetadataTable. + /// The ID of the table. + /// The name of the table. + /// or is null. + internal MetadataTable(string id, string name) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Id = id; + Name = name; + Labels = new ChangeTrackingList(); + Columns = new ChangeTrackingList(); + } + + /// The ID of the table. + public string Id { get; } + /// The name of the table. + public string Name { get; } + /// The description of the table. + public string Description { get; } + /// The column associated with the timespan query parameter for the table. + public string TimespanColumn { get; } + /// The user defined labels of the table. + public IReadOnlyList Labels { get; } + /// The tags associated with the table. + public object Tags { get; } + /// The properties of the table. + public object Properties { get; } + /// The list of columns defined on the table. + public IReadOnlyList Columns { get; } + /// The related metadata items for the table. + public MetadataTableRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs new file mode 100644 index 0000000000000..f294f9a2c6b0b --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableColumnsItem.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// The MetadataTableColumnsItem. + internal partial class MetadataTableColumnsItem + { + /// Initializes a new instance of MetadataTableColumnsItem. + /// The name of the column. + /// The data type of the column. + /// is null. + internal MetadataTableColumnsItem(string name, MetadataColumnDataType type) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + Type = type; + } + + /// The name of the column. + public string Name { get; } + /// The description of the column. + public string Description { get; } + /// The data type of the column. + public MetadataColumnDataType Type { get; } + /// A flag indicating this column is a preferred facet. + public bool? IsPreferredFacet { get; } + /// an indication of the source of the column, used only when multiple workspaces have conflicting definition for the column. + public object Source { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs new file mode 100644 index 0000000000000..d5f9b3579d429 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataTableRelated.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the table. + internal partial class MetadataTableRelated + { + /// Initializes a new instance of MetadataTableRelated. + internal MetadataTableRelated() + { + Categories = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Workspaces = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + Queries = new ChangeTrackingList(); + } + + /// The related categories for the table. + public IReadOnlyList Categories { get; } + /// The related Log Analytics solutions for the table. + public IReadOnlyList Solutions { get; } + /// The related resource types for the table. + public IReadOnlyList ResourceTypes { get; } + /// The related Log Analytics workspaces for the table. + public IReadOnlyList Workspaces { get; } + /// The related functions for the table. + public IReadOnlyList Functions { get; } + /// The related saved queries for the table. + public IReadOnlyList Queries { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs new file mode 100644 index 0000000000000..b556c9e0cedf8 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class MetadataValue + { + internal static MetadataValue DeserializeMetadataValue(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = LocalizableString.DeserializeLocalizableString(property.Value); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new MetadataValue(name.Value, value.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs new file mode 100644 index 0000000000000..15f52d8d253bb --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataValue.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Monitor.Query.Models +{ + /// Represents a metric metadata value. + internal partial class MetadataValue + { + /// Initializes a new instance of MetadataValue. + internal MetadataValue() + { + } + + /// Initializes a new instance of MetadataValue. + /// the name of the metadata. + /// the value of the metadata. + internal MetadataValue(LocalizableString name, string value) + { + Name = name; + Value = value; + } + + /// the name of the metadata. + public LocalizableString Name { get; } + /// the value of the metadata. + public string Value { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs new file mode 100644 index 0000000000000..ccf406740e66c --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspace.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Log Analytics workspaces that were part of the metadata request and that the user has access to. + internal partial class MetadataWorkspace + { + /// Initializes a new instance of MetadataWorkspace. + /// The ID of the Log Analytics workspace. + /// The ARM resource ID of the Log Analytics workspace. + /// The name of the Log Analytics workspace. + /// The Azure region of the Log Analytics workspace. + /// , , , or is null. + internal MetadataWorkspace(string id, string resourceId, string name, string region) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceId == null) + { + throw new ArgumentNullException(nameof(resourceId)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (region == null) + { + throw new ArgumentNullException(nameof(region)); + } + + Id = id; + ResourceId = resourceId; + Name = name; + Region = region; + } + + /// The ID of the Log Analytics workspace. + public string Id { get; } + /// The ARM resource ID of the Log Analytics workspace. + public string ResourceId { get; } + /// The name of the Log Analytics workspace. + public string Name { get; } + /// The Azure region of the Log Analytics workspace. + public string Region { get; } + /// The related metadata items for the Log Analytics workspace. + public MetadataWorkspaceRelated Related { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs new file mode 100644 index 0000000000000..0e2fa176f3eef --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetadataWorkspaceRelated.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The related metadata items for the Log Analytics workspace. + internal partial class MetadataWorkspaceRelated + { + /// Initializes a new instance of MetadataWorkspaceRelated. + internal MetadataWorkspaceRelated() + { + Tables = new ChangeTrackingList(); + Solutions = new ChangeTrackingList(); + ResourceTypes = new ChangeTrackingList(); + Functions = new ChangeTrackingList(); + Resources = new ChangeTrackingList(); + } + + /// The related tables for the Log Analytics workspace. + public IReadOnlyList Tables { get; } + /// The related Log Analytics solutions for the Log Analytics workspace. + public IReadOnlyList Solutions { get; } + /// The related resource types for the Log Analytics workspace. + public IReadOnlyList ResourceTypes { get; } + /// The related functions for the Log Analytics workspace. + public IReadOnlyList Functions { get; } + /// The related Azure resources for the Log Analytics workspace. + public IReadOnlyList Resources { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs new file mode 100644 index 0000000000000..359c4de83c7e5 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class Metric + { + internal static Metric DeserializeMetric(JsonElement element) + { + string id = default; + string type = default; + LocalizableString name = default; + Optional displayDescription = default; + Optional errorCode = default; + Optional errorMessage = default; + MetricUnit unit = default; + IReadOnlyList timeseries = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = LocalizableString.DeserializeLocalizableString(property.Value); + continue; + } + if (property.NameEquals("displayDescription")) + { + displayDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorCode")) + { + errorCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage")) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("unit")) + { + unit = new MetricUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeseries")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TimeSeriesElement.DeserializeTimeSeriesElement(item)); + } + timeseries = array; + continue; + } + } + return new Metric(id, type, name, displayDescription.Value, errorCode.Value, errorMessage.Value, unit, timeseries); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs new file mode 100644 index 0000000000000..c644fe047a108 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Monitor.Query.Models +{ + /// The result data of a query. + public partial class Metric + { + /// Initializes a new instance of Metric. + /// the metric Id. + /// the resource type of the metric resource. + /// the name and the display name of the metric, i.e. it is localizable string. + /// The unit of the metric. + /// the time series returned when a data query is performed. + /// , , , or is null. + internal Metric(string id, string type, LocalizableString localizedName, MetricUnit unit, IEnumerable timeSeries) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (type == null) + { + throw new ArgumentNullException(nameof(type)); + } + if (localizedName == null) + { + throw new ArgumentNullException(nameof(localizedName)); + } + if (timeSeries == null) + { + throw new ArgumentNullException(nameof(timeSeries)); + } + + Id = id; + Type = type; + LocalizedName = localizedName; + Unit = unit; + TimeSeries = timeSeries.ToList(); + } + + /// Initializes a new instance of Metric. + /// the metric Id. + /// the resource type of the metric resource. + /// the name and the display name of the metric, i.e. it is localizable string. + /// Detailed description of this metric. + /// 'Success' or the error details on query failures for this metric. + /// Error message encountered querying this specific metric. + /// The unit of the metric. + /// the time series returned when a data query is performed. + internal Metric(string id, string type, LocalizableString localizedName, string displayDescription, string errorCode, string errorMessage, MetricUnit unit, IReadOnlyList timeSeries) + { + Id = id; + Type = type; + LocalizedName = localizedName; + DisplayDescription = displayDescription; + ErrorCode = errorCode; + ErrorMessage = errorMessage; + Unit = unit; + TimeSeries = timeSeries; + } + + /// the metric Id. + public string Id { get; } + /// the resource type of the metric resource. + public string Type { get; } + /// Detailed description of this metric. + public string DisplayDescription { get; } + /// The unit of the metric. + public MetricUnit Unit { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs new file mode 100644 index 0000000000000..9b13b0e6e063a --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAggregationType.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + internal static partial class MetricAggregationTypeExtensions + { + public static string ToSerialString(this MetricAggregationType value) => value switch + { + MetricAggregationType.None => "None", + MetricAggregationType.Average => "Average", + MetricAggregationType.Count => "Count", + MetricAggregationType.Minimum => "Minimum", + MetricAggregationType.Maximum => "Maximum", + MetricAggregationType.Total => "Total", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MetricAggregationType value.") + }; + + public static MetricAggregationType ToMetricAggregationType(this string value) + { + if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.None; + if (string.Equals(value, "Average", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Average; + if (string.Equals(value, "Count", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Count; + if (string.Equals(value, "Minimum", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Minimum; + if (string.Equals(value, "Maximum", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Maximum; + if (string.Equals(value, "Total", StringComparison.InvariantCultureIgnoreCase)) return MetricAggregationType.Total; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MetricAggregationType value."); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs new file mode 100644 index 0000000000000..2a32475079891 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class MetricAvailability + { + internal static MetricAvailability DeserializeMetricAvailability(JsonElement element) + { + Optional timeGrain = default; + Optional retention = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeGrain")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeGrain = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("retention")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + retention = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MetricAvailability(Optional.ToNullable(timeGrain), Optional.ToNullable(retention)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs new file mode 100644 index 0000000000000..802c58effbd39 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + public partial class MetricAvailability + { + /// Initializes a new instance of MetricAvailability. + internal MetricAvailability() + { + } + + /// Initializes a new instance of MetricAvailability. + /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + internal MetricAvailability(TimeSpan? timeGrain, TimeSpan? retention) + { + Granularity = timeGrain; + Retention = retention; + } + + /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + [CodeGenMember("TimeGrain")] + public TimeSpan? Granularity { get; } + /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + public TimeSpan? Retention { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs new file mode 100644 index 0000000000000..f0bd71c17412c --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricClass.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Monitor.Query.Models +{ + /// The class of the metric. + public readonly partial struct MetricClass : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public MetricClass(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailabilityValue = "Availability"; + private const string TransactionsValue = "Transactions"; + private const string ErrorsValue = "Errors"; + private const string LatencyValue = "Latency"; + private const string SaturationValue = "Saturation"; + + /// Availability. + public static MetricClass Availability { get; } = new MetricClass(AvailabilityValue); + /// Transactions. + public static MetricClass Transactions { get; } = new MetricClass(TransactionsValue); + /// Errors. + public static MetricClass Errors { get; } = new MetricClass(ErrorsValue); + /// Latency. + public static MetricClass Latency { get; } = new MetricClass(LatencyValue); + /// Saturation. + public static MetricClass Saturation { get; } = new MetricClass(SaturationValue); + /// Determines if two values are the same. + public static bool operator ==(MetricClass left, MetricClass right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetricClass left, MetricClass right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MetricClass(string value) => new MetricClass(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetricClass other && Equals(other); + /// + public bool Equals(MetricClass other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs new file mode 100644 index 0000000000000..780ab86eef11f --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class MetricDefinition + { + internal static MetricDefinition DeserializeMetricDefinition(JsonElement element) + { + Optional isDimensionRequired = default; + Optional resourceId = default; + Optional @namespace = default; + Optional name = default; + Optional displayDescription = default; + Optional category = default; + Optional metricClass = default; + Optional unit = default; + Optional primaryAggregationType = default; + Optional> supportedAggregationTypes = default; + Optional> metricAvailabilities = default; + Optional id = default; + Optional> dimensions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isDimensionRequired")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDimensionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("namespace")) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = LocalizableString.DeserializeLocalizableString(property.Value); + continue; + } + if (property.NameEquals("displayDescription")) + { + displayDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("category")) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("metricClass")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + metricClass = new MetricClass(property.Value.GetString()); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new MetricUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("primaryAggregationType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + primaryAggregationType = property.Value.GetString().ToMetricAggregationType(); + continue; + } + if (property.NameEquals("supportedAggregationTypes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString().ToMetricAggregationType()); + } + supportedAggregationTypes = array; + continue; + } + if (property.NameEquals("metricAvailabilities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetricAvailability.DeserializeMetricAvailability(item)); + } + metricAvailabilities = array; + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("dimensions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LocalizableString.DeserializeLocalizableString(item)); + } + dimensions = array; + continue; + } + } + return new MetricDefinition(Optional.ToNullable(isDimensionRequired), resourceId.Value, @namespace.Value, name.Value, displayDescription.Value, category.Value, Optional.ToNullable(metricClass), Optional.ToNullable(unit), Optional.ToNullable(primaryAggregationType), Optional.ToList(supportedAggregationTypes), Optional.ToList(metricAvailabilities), id.Value, Optional.ToList(dimensions)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs new file mode 100644 index 0000000000000..bd737f7834b2e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// Metric definition class specifies the metadata for a metric. + public partial class MetricDefinition + { + /// Initializes a new instance of MetricDefinition. + internal MetricDefinition() + { + SupportedAggregationTypes = new ChangeTrackingList(); + MetricAvailabilities = new ChangeTrackingList(); + LocalizedDimensions = new ChangeTrackingList(); + } + + /// Initializes a new instance of MetricDefinition. + /// Flag to indicate whether the dimension is required. + /// the resource identifier of the resource that emitted the metric. + /// the namespace the metric belongs to. + /// the name and the display name of the metric, i.e. it is a localizable string. + /// Detailed description of this metric. + /// Custom category name for this metric. + /// The class of the metric. + /// The unit of the metric. + /// the primary aggregation type value defining how to use the values for display. + /// the collection of what aggregation types are supported. + /// the collection of what aggregation intervals are available to be queried. + /// the resource identifier of the metric definition. + /// the name and the display name of the dimension, i.e. it is a localizable string. + internal MetricDefinition(bool? isDimensionRequired, string resourceId, string @namespace, LocalizableString localizedName, string displayDescription, string category, MetricClass? metricClass, MetricUnit? unit, MetricAggregationType? primaryAggregationType, IReadOnlyList supportedAggregationTypes, IReadOnlyList metricAvailabilities, string id, IReadOnlyList localizedDimensions) + { + IsDimensionRequired = isDimensionRequired; + ResourceId = resourceId; + Namespace = @namespace; + LocalizedName = localizedName; + DisplayDescription = displayDescription; + Category = category; + MetricClass = metricClass; + Unit = unit; + PrimaryAggregationType = primaryAggregationType; + SupportedAggregationTypes = supportedAggregationTypes; + MetricAvailabilities = metricAvailabilities; + Id = id; + LocalizedDimensions = localizedDimensions; + } + + /// Flag to indicate whether the dimension is required. + public bool? IsDimensionRequired { get; } + /// the resource identifier of the resource that emitted the metric. + public string ResourceId { get; } + /// the namespace the metric belongs to. + public string Namespace { get; } + /// Detailed description of this metric. + public string DisplayDescription { get; } + /// Custom category name for this metric. + public string Category { get; } + /// The class of the metric. + public MetricClass? MetricClass { get; } + /// The unit of the metric. + public MetricUnit? Unit { get; } + /// the primary aggregation type value defining how to use the values for display. + public MetricAggregationType? PrimaryAggregationType { get; } + /// the collection of what aggregation types are supported. + public IReadOnlyList SupportedAggregationTypes { get; } + /// the collection of what aggregation intervals are available to be queried. + public IReadOnlyList MetricAvailabilities { get; } + /// the resource identifier of the metric definition. + public string Id { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs new file mode 100644 index 0000000000000..9070af3186dea --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class MetricDefinitionCollection + { + internal static MetricDefinitionCollection DeserializeMetricDefinitionCollection(JsonElement element) + { + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetricDefinition.DeserializeMetricDefinition(item)); + } + value = array; + continue; + } + } + return new MetricDefinitionCollection(value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs new file mode 100644 index 0000000000000..c11cc2c6efb98 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinitionCollection.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Monitor.Query.Models +{ + /// Represents collection of metric definitions. + internal partial class MetricDefinitionCollection + { + /// Initializes a new instance of MetricDefinitionCollection. + /// the values for the metric definitions. + /// is null. + internal MetricDefinitionCollection(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToList(); + } + + /// Initializes a new instance of MetricDefinitionCollection. + /// the values for the metric definitions. + internal MetricDefinitionCollection(IReadOnlyList value) + { + Value = value; + } + + /// the values for the metric definitions. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs new file mode 100644 index 0000000000000..97f75c566a3da --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class MetricNamespace + { + internal static MetricNamespace DeserializeMetricNamespace(JsonElement element) + { + Optional id = default; + Optional type = default; + Optional name = default; + Optional classification = default; + Optional properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("classification")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + classification = new NamespaceClassification(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MetricNamespaceName.DeserializeMetricNamespaceName(property.Value); + continue; + } + } + return new MetricNamespace(id.Value, type.Value, name.Value, Optional.ToNullable(classification), properties.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs new file mode 100644 index 0000000000000..d8225ba7afedd --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Monitor.Query.Models +{ + /// Metric namespace class specifies the metadata for a metric namespace. + public partial class MetricNamespace + { + /// Initializes a new instance of MetricNamespace. + internal MetricNamespace() + { + } + + /// Initializes a new instance of MetricNamespace. + /// The ID of the metric namespace. + /// The type of the namespace. + /// The escaped name of the namespace. + /// Kind of namespace. + /// Properties which include the fully qualified namespace name. + internal MetricNamespace(string id, string type, string name, NamespaceClassification? classification, MetricNamespaceName properties) + { + Id = id; + Type = type; + Name = name; + Classification = classification; + Properties = properties; + } + + /// The ID of the metric namespace. + public string Id { get; } + /// The type of the namespace. + public string Type { get; } + /// The escaped name of the namespace. + public string Name { get; } + /// Kind of namespace. + public NamespaceClassification? Classification { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs new file mode 100644 index 0000000000000..f8d2cb3dc4420 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class MetricNamespaceCollection + { + internal static MetricNamespaceCollection DeserializeMetricNamespaceCollection(JsonElement element) + { + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetricNamespace.DeserializeMetricNamespace(item)); + } + value = array; + continue; + } + } + return new MetricNamespaceCollection(value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs new file mode 100644 index 0000000000000..6f171c4cf4927 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceCollection.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Monitor.Query.Models +{ + /// Represents collection of metric namespaces. + internal partial class MetricNamespaceCollection + { + /// Initializes a new instance of MetricNamespaceCollection. + /// The values for the metric namespaces. + /// is null. + internal MetricNamespaceCollection(IEnumerable value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + Value = value.ToList(); + } + + /// Initializes a new instance of MetricNamespaceCollection. + /// The values for the metric namespaces. + internal MetricNamespaceCollection(IReadOnlyList value) + { + Value = value; + } + + /// The values for the metric namespaces. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs new file mode 100644 index 0000000000000..558796bc5641e --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class MetricNamespaceName + { + internal static MetricNamespaceName DeserializeMetricNamespaceName(JsonElement element) + { + Optional metricNamespaceName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metricNamespaceName")) + { + metricNamespaceName = property.Value.GetString(); + continue; + } + } + return new MetricNamespaceName(metricNamespaceName.Value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs new file mode 100644 index 0000000000000..af901b3eebc27 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespaceName.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Monitor.Query.Models +{ + /// The fully qualified metric namespace name. + internal partial class MetricNamespaceName + { + /// Initializes a new instance of MetricNamespaceName. + internal MetricNamespaceName() + { + } + + /// Initializes a new instance of MetricNamespaceName. + /// The metric namespace name. + internal MetricNamespaceName(string metricNamespaceNameValue) + { + MetricNamespaceNameValue = metricNamespaceNameValue; + } + + /// The metric namespace name. + public string MetricNamespaceNameValue { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs new file mode 100644 index 0000000000000..5f239a8e36bbd --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricUnit.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Monitor.Query.Models +{ + /// The unit of the metric. + public readonly partial struct MetricUnit : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public MetricUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "Count"; + private const string BytesValue = "Bytes"; + private const string SecondsValue = "Seconds"; + private const string CountPerSecondValue = "CountPerSecond"; + private const string BytesPerSecondValue = "BytesPerSecond"; + private const string PercentValue = "Percent"; + private const string MilliSecondsValue = "MilliSeconds"; + private const string ByteSecondsValue = "ByteSeconds"; + private const string UnspecifiedValue = "Unspecified"; + private const string CoresValue = "Cores"; + private const string MilliCoresValue = "MilliCores"; + private const string NanoCoresValue = "NanoCores"; + private const string BitsPerSecondValue = "BitsPerSecond"; + + /// Count. + public static MetricUnit Count { get; } = new MetricUnit(CountValue); + /// Bytes. + public static MetricUnit Bytes { get; } = new MetricUnit(BytesValue); + /// Seconds. + public static MetricUnit Seconds { get; } = new MetricUnit(SecondsValue); + /// CountPerSecond. + public static MetricUnit CountPerSecond { get; } = new MetricUnit(CountPerSecondValue); + /// BytesPerSecond. + public static MetricUnit BytesPerSecond { get; } = new MetricUnit(BytesPerSecondValue); + /// Percent. + public static MetricUnit Percent { get; } = new MetricUnit(PercentValue); + /// MilliSeconds. + public static MetricUnit MilliSeconds { get; } = new MetricUnit(MilliSecondsValue); + /// ByteSeconds. + public static MetricUnit ByteSeconds { get; } = new MetricUnit(ByteSecondsValue); + /// Unspecified. + public static MetricUnit Unspecified { get; } = new MetricUnit(UnspecifiedValue); + /// Cores. + public static MetricUnit Cores { get; } = new MetricUnit(CoresValue); + /// MilliCores. + public static MetricUnit MilliCores { get; } = new MetricUnit(MilliCoresValue); + /// NanoCores. + public static MetricUnit NanoCores { get; } = new MetricUnit(NanoCoresValue); + /// BitsPerSecond. + public static MetricUnit BitsPerSecond { get; } = new MetricUnit(BitsPerSecondValue); + /// Determines if two values are the same. + public static bool operator ==(MetricUnit left, MetricUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetricUnit left, MetricUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MetricUnit(string value) => new MetricUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetricUnit other && Equals(other); + /// + public bool Equals(MetricUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs new file mode 100644 index 0000000000000..1595dd63bd5ce --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class MetricValue + { + internal static MetricValue DeserializeMetricValue(JsonElement element) + { + DateTimeOffset timeStamp = default; + Optional average = default; + Optional minimum = default; + Optional maximum = default; + Optional total = default; + Optional count = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeStamp")) + { + timeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("average")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + average = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("minimum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minimum = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("maximum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maximum = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("total")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + total = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("count")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetDouble(); + continue; + } + } + return new MetricValue(timeStamp, Optional.ToNullable(average), Optional.ToNullable(minimum), Optional.ToNullable(maximum), Optional.ToNullable(total), Optional.ToNullable(count)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs new file mode 100644 index 0000000000000..908e7cde31e18 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricValue.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Represents a metric value. + public partial class MetricValue + { + /// Initializes a new instance of MetricValue. + /// the timestamp for the metric value in ISO 8601 format. + internal MetricValue(DateTimeOffset timeStamp) + { + TimeStamp = timeStamp; + } + + /// Initializes a new instance of MetricValue. + /// the timestamp for the metric value in ISO 8601 format. + /// the average value in the time range. + /// the least value in the time range. + /// the greatest value in the time range. + /// the sum of all of the values in the time range. + /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. + internal MetricValue(DateTimeOffset timeStamp, double? average, double? minimum, double? maximum, double? total, double? count) + { + TimeStamp = timeStamp; + Average = average; + Minimum = minimum; + Maximum = maximum; + Total = total; + Count = count; + } + + /// the timestamp for the metric value in ISO 8601 format. + public DateTimeOffset TimeStamp { get; } + /// the average value in the time range. + public double? Average { get; } + /// the least value in the time range. + public double? Minimum { get; } + /// the greatest value in the time range. + public double? Maximum { get; } + /// the sum of all of the values in the time range. + public double? Total { get; } + /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. + public double? Count { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs new file mode 100644 index 0000000000000..63a16b06cde51 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class MetricsQueryResult + { + internal static MetricsQueryResult DeserializeMetricsQueryResult(JsonElement element) + { + Optional cost = default; + string timespan = default; + Optional interval = default; + Optional @namespace = default; + Optional resourceregion = default; + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cost")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + cost = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timespan")) + { + timespan = property.Value.GetString(); + continue; + } + if (property.NameEquals("interval")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interval = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("namespace")) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceregion")) + { + resourceregion = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Metric.DeserializeMetric(item)); + } + value = array; + continue; + } + } + return new MetricsQueryResult(Optional.ToNullable(cost), timespan, Optional.ToNullable(interval), @namespace.Value, resourceregion.Value, value); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs new file mode 100644 index 0000000000000..2b2c965e32505 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Monitor.Query.Models +{ + /// The response to a metrics query. + public partial class MetricsQueryResult + { + /// Initializes a new instance of MetricsQueryResult. + /// The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. + /// the value of the collection. + /// or is null. + internal MetricsQueryResult(string timespan, IEnumerable metrics) + { + if (timespan == null) + { + throw new ArgumentNullException(nameof(timespan)); + } + if (metrics == null) + { + throw new ArgumentNullException(nameof(metrics)); + } + + _timespan = timespan; + Metrics = metrics.ToList(); + } + + /// Initializes a new instance of MetricsQueryResult. + /// The integer value representing the relative cost of the query. + /// The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. + /// The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. + /// The namespace of the metrics being queried. + /// The region of the resource being queried for metrics. + /// the value of the collection. + internal MetricsQueryResult(int? cost, string timespan, TimeSpan? interval, string @namespace, string resourceRegion, IReadOnlyList metrics) + { + Cost = cost; + _timespan = timespan; + Interval = interval; + Namespace = @namespace; + ResourceRegion = resourceRegion; + Metrics = metrics; + } + + /// The integer value representing the relative cost of the query. + public int? Cost { get; } + /// The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. + public TimeSpan? Interval { get; } + /// The namespace of the metrics being queried. + public string Namespace { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs new file mode 100644 index 0000000000000..ca890b69e7290 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/NamespaceClassification.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Monitor.Query.Models +{ + /// Kind of namespace. + public readonly partial struct NamespaceClassification : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public NamespaceClassification(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PlatformValue = "Platform"; + private const string CustomValue = "Custom"; + private const string QosValue = "Qos"; + + /// Platform. + public static NamespaceClassification Platform { get; } = new NamespaceClassification(PlatformValue); + /// Custom. + public static NamespaceClassification Custom { get; } = new NamespaceClassification(CustomValue); + /// Qos. + public static NamespaceClassification Qos { get; } = new NamespaceClassification(QosValue); + /// Determines if two values are the same. + public static bool operator ==(NamespaceClassification left, NamespaceClassification right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NamespaceClassification left, NamespaceClassification right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NamespaceClassification(string value) => new NamespaceClassification(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NamespaceClassification other && Equals(other); + /// + public bool Equals(NamespaceClassification other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs new file mode 100644 index 0000000000000..4a2b17a59beef --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + internal partial class QueryBody : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("query"); + writer.WriteStringValue(Query); + if (Optional.IsDefined(Timespan)) + { + writer.WritePropertyName("timespan"); + writer.WriteStringValue(Timespan); + } + if (Optional.IsCollectionDefined(Workspaces)) + { + writer.WritePropertyName("workspaces"); + writer.WriteStartArray(); + foreach (var item in Workspaces) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs new file mode 100644 index 0000000000000..2e1f827a39a51 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/QueryBody.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + internal partial class QueryBody + { + /// Initializes a new instance of QueryBody. + /// The query to execute. + /// is null. + public QueryBody(string query) + { + if (query == null) + { + throw new ArgumentNullException(nameof(query)); + } + + Query = query; + Workspaces = new ChangeTrackingList(); + } + + /// The query to execute. + public string Query { get; } + /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + public string Timespan { get; set; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs new file mode 100644 index 0000000000000..da62ed092731d --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/ResultType.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + internal static partial class ResultTypeExtensions + { + public static string ToSerialString(this ResultType value) => value switch + { + ResultType.Data => "Data", + ResultType.Metadata => "Metadata", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResultType value.") + }; + + public static ResultType ToResultType(this string value) + { + if (string.Equals(value, "Data", StringComparison.InvariantCultureIgnoreCase)) return ResultType.Data; + if (string.Equals(value, "Metadata", StringComparison.InvariantCultureIgnoreCase)) return ResultType.Metadata; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResultType value."); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs new file mode 100644 index 0000000000000..04f6356b8d1d0 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + public partial class TimeSeriesElement + { + internal static TimeSeriesElement DeserializeTimeSeriesElement(JsonElement element) + { + Optional> metadatavalues = default; + Optional> data = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metadatavalues")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataValue.DeserializeMetadataValue(item)); + } + metadatavalues = array; + continue; + } + if (property.NameEquals("data")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetricValue.DeserializeMetricValue(item)); + } + data = array; + continue; + } + } + return new TimeSeriesElement(Optional.ToList(metadatavalues), Optional.ToList(data)); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs new file mode 100644 index 0000000000000..4de57ab3e0b89 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/TimeSeriesElement.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Monitor.Query.Models +{ + /// A time series result type. The discriminator value is always TimeSeries in this case. + public partial class TimeSeriesElement + { + /// Initializes a new instance of TimeSeriesElement. + internal TimeSeriesElement() + { + Metadatavalues = new ChangeTrackingList(); + Data = new ChangeTrackingList(); + } + + /// Initializes a new instance of TimeSeriesElement. + /// the metadata values returned if $filter was specified in the call. + /// An array of data points representing the metric values. This is only returned if a result type of data is specified. + internal TimeSeriesElement(IReadOnlyList metadatavalues, IReadOnlyList data) + { + Metadatavalues = metadatavalues; + Data = data; + } + /// An array of data points representing the metric values. This is only returned if a result type of data is specified. + public IReadOnlyList Data { get; } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs new file mode 100644 index 0000000000000..b8b3133515251 --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Monitor.Query.Models +{ + /// Model factory for read-only models. + public static partial class QueryModelFactory + { + /// Initializes a new instance of LogsQueryResultColumn. + /// The name of this column. + /// The data type of this column. + /// A new instance for mocking. + public static LogsQueryResultColumn LogsQueryResultColumn(string name = null, LogsColumnType type = default) + { + return new LogsQueryResultColumn(name, type); + } + + /// Initializes a new instance of MetricAvailability. + /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. + /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. + /// A new instance for mocking. + public static MetricAvailability MetricAvailability(TimeSpan? timeGrain = null, TimeSpan? retention = null) + { + return new MetricAvailability(timeGrain, retention); + } + + /// Initializes a new instance of MetricValue. + /// the timestamp for the metric value in ISO 8601 format. + /// the average value in the time range. + /// the least value in the time range. + /// the greatest value in the time range. + /// the sum of all of the values in the time range. + /// the number of samples in the time range. Can be used to determine the number of values that contributed to the average value. + /// A new instance for mocking. + public static MetricValue MetricValue(DateTimeOffset timeStamp = default, double? average = null, double? minimum = null, double? maximum = null, double? total = null, double? count = null) + { + return new MetricValue(timeStamp, average, minimum, maximum, total, count); + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs new file mode 100644 index 0000000000000..0718ed2f1492f --- /dev/null +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryRestClient.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Monitor.Query.Models; + +namespace Azure.Monitor.Query +{ + internal partial class QueryRestClient + { + private Uri endpoint; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of QueryRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + public QueryRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null) + { + this.endpoint = endpoint ?? new Uri("https://api.loganalytics.io/v1"); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetRequest(string workspaceId, string query, TimeSpan? timespan) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/query", false); + uri.AppendQuery("query", query, true); + if (timespan != null) + { + uri.AppendQuery("timespan", timespan.Value, "P", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Executes an Analytics query for data. + /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + /// The cancellation token to use. + /// or is null. + public async Task> GetAsync(string workspaceId, string query, TimeSpan? timespan = null, CancellationToken cancellationToken = default) + { + if (workspaceId == null) + { + throw new ArgumentNullException(nameof(workspaceId)); + } + if (query == null) + { + throw new ArgumentNullException(nameof(query)); + } + + using var message = CreateGetRequest(workspaceId, query, timespan); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LogsQueryResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Executes an Analytics query for data. + /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + /// Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression. + /// The cancellation token to use. + /// or is null. + public Response Get(string workspaceId, string query, TimeSpan? timespan = null, CancellationToken cancellationToken = default) + { + if (workspaceId == null) + { + throw new ArgumentNullException(nameof(workspaceId)); + } + if (query == null) + { + throw new ArgumentNullException(nameof(query)); + } + + using var message = CreateGetRequest(workspaceId, query, timespan); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LogsQueryResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExecuteRequest(string workspaceId, QueryBody body, string prefer) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/query", false); + request.Uri = uri; + if (prefer != null) + { + request.Headers.Add("Prefer", prefer); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + return message; + } + + /// Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + /// Optional. The prefer header to set server timeout, query statistics and visualization information. + /// The cancellation token to use. + /// or is null. + public async Task> ExecuteAsync(string workspaceId, QueryBody body, string prefer = null, CancellationToken cancellationToken = default) + { + if (workspaceId == null) + { + throw new ArgumentNullException(nameof(workspaceId)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateExecuteRequest(workspaceId, body, prefer); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LogsQueryResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + /// ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal. + /// The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). + /// Optional. The prefer header to set server timeout, query statistics and visualization information. + /// The cancellation token to use. + /// or is null. + public Response Execute(string workspaceId, QueryBody body, string prefer = null, CancellationToken cancellationToken = default) + { + if (workspaceId == null) + { + throw new ArgumentNullException(nameof(workspaceId)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateExecuteRequest(workspaceId, body, prefer); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LogsQueryResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LogsQueryResult.DeserializeLogsQueryResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateBatchRequest(BatchRequest body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/$batch", false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + return message; + } + + /// Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + /// The batch request body. + /// The cancellation token to use. + /// is null. + public async Task> BatchAsync(BatchRequest body, CancellationToken cancellationToken = default) + { + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateBatchRequest(body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LogsBatchQueryResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LogsBatchQueryResults.DeserializeLogsBatchQueryResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Executes a batch of Analytics queries for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query. + /// The batch request body. + /// The cancellation token to use. + /// is null. + public Response Batch(BatchRequest body, CancellationToken cancellationToken = default) + { + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateBatchRequest(body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LogsBatchQueryResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LogsBatchQueryResults.DeserializeLogsBatchQueryResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs index 540aa2070f02b..04446142e4cfc 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs @@ -38,7 +38,7 @@ public class MetricsQueryOptions /// /// Gets or sets the filter that is used to refine the set of metric data returned. /// - /// MetricResult contains metadata A, B and C.
+ /// Metric contains metadata A, B and C.
///
/// - Return all time series of C where A = a1 and B = b1 or b2:
/// A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'
diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs index 3e6171fff2858..2f85bec243765 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs @@ -59,7 +59,7 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsTable.DeserializeLogsTable(item)); + array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); } tables = array; continue; @@ -78,4 +78,4 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement return new LogsBatchQueryResult(tables, statistics, render, error); } } -} +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs similarity index 97% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs index b21f51f2bdf50..97b0aaad6546b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs @@ -12,14 +12,13 @@ namespace Azure.Monitor.Query.Models /// /// Represents a row in the table of results returned from the logs query. /// - [CodeGenModel("LogsQueryResultRow")] - public class LogsTableRow + public class LogsQueryResultRow { private readonly Dictionary _columnMap; - private readonly IReadOnlyList _columns; + private readonly IReadOnlyList _columns; private readonly JsonElement _row; - internal LogsTableRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) + internal LogsQueryResultRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) { _columnMap = columnMap; _columns = columns; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs similarity index 78% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs index a563dd0d36bd3..3b3c9194c764d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs @@ -11,7 +11,7 @@ namespace Azure.Monitor.Query.Models [CodeGenModel("Table")] public partial class LogsTable { - private IReadOnlyList _rows; + private IReadOnlyList _rows; [CodeGenMember("Rows")] private JsonElement InternalRows { get; } @@ -19,9 +19,9 @@ public partial class LogsTable /// /// Gets the rows of the result table. /// - public IReadOnlyList Rows => _rows ??= CreateRows(); + public IReadOnlyList Rows => _rows ??= CreateRows(); - private IReadOnlyList CreateRows() + private IReadOnlyList CreateRows() { Dictionary columnDictionary = new(); @@ -30,11 +30,11 @@ private IReadOnlyList CreateRows() columnDictionary[Columns[index].Name] = index; } - List rows = new List(); + List rows = new List(); foreach (var row in InternalRows.EnumerateArray()) { - rows.Add(new LogsTableRow(columnDictionary, Columns, row)); + rows.Add(new LogsQueryResultRow(columnDictionary, Columns, row)); } return rows; @@ -55,4 +55,4 @@ public override string ToString() return $"{Name}: {Rows.Count} rows, {Columns.Count} columns"; } } -} +} \ No newline at end of file diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs similarity index 100% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResult.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResults.cs diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs index 7878b4e84dfdc..5037746176c6a 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs @@ -6,7 +6,7 @@ namespace Azure.Monitor.Query.Models { - public partial class MetricResult + public partial class Metric { private const string SuccessErrorCode = "Success"; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs index bb182b2c96ec5..da44b85ef36d1 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs @@ -14,7 +14,7 @@ public partial class MetricsQueryResult /// Metrics returned as the result of the query. [CodeGenMember("Value")] - public IReadOnlyList Metrics { get; } + public IReadOnlyList Metrics { get; } /// /// The timespan for which the data was retrieved. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs index 84d315912949a..0e1796323e3df 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs @@ -6,7 +6,7 @@ namespace Azure.Monitor.Query.Models { [CodeGenModel("Column")] - public partial class LogsTableColumn + public partial class LogsQueryResultColumn { /// public override string ToString() diff --git a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs index 40c34c4bb91d8..390e37022ebbd 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs @@ -8,5 +8,5 @@ [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Insights")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.MetricResult")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.Metric")] [assembly: SuppressMessage("Usage", "AZC0014:Types from System.Text.Json, Newtonsoft.Json, System.Collections.Immutable assemblies should not be exposed as part of public API surface.", Justification = "")] diff --git a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs index 570d9667b9644..4181f3e457c8d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs @@ -7,7 +7,7 @@ namespace Azure.Monitor.Query { - internal class RowBinder: TypeBinder + internal class RowBinder: TypeBinder { internal static RowBinder Shared = new(); internal IReadOnlyList BindResults(IReadOnlyList tables) @@ -45,12 +45,12 @@ internal IReadOnlyList BindResults(IReadOnlyList tables) return results; } - protected override void Set(LogsTableRow destination, T value, BoundMemberInfo memberInfo) + protected override void Set(LogsQueryResultRow destination, T value, BoundMemberInfo memberInfo) { throw new NotSupportedException(); } - protected override bool TryGet(BoundMemberInfo memberInfo, LogsTableRow source, out T value) + protected override bool TryGet(BoundMemberInfo memberInfo, LogsQueryResultRow source, out T value) { int column; diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs index 390469173877e..117d2f6807669 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs @@ -240,7 +240,7 @@ public async Task CanQueryAllSupportedTypes() "dynamic({\"a\":123, \"b\":\"hello\", \"c\":[1,2,3], \"d\":{}})" + "]", _logsTestData.DataTimeRange); - LogsTableRow row = results.Value.Table.Rows[0]; + LogsQueryResultRow row = results.Value.Table.Rows[0]; var expectedDate = DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"); Assert.AreEqual(expectedDate, row.GetDateTimeOffset("DateTime")); From f1c517140919b8a8843fd115e78c30cc3cad3daf Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Tue, 24 Aug 2021 00:49:39 -0700 Subject: [PATCH 4/6] rename This reverts commit 81ff204d352b1446fe88903f50394e250515bcd8 and redoes the renaming. --- .../src/Generated/MetricDefinitionsRestClient.cs | 4 ++-- .../src/Generated/MetricsRestClient.cs | 12 ++++++------ .../Models/LogsQueryResult.Serialization.cs | 2 +- ...e.Serialization.cs => LogsTable.Serialization.cs} | 8 ++++---- .../Models/{LogsQueryResultTable.cs => LogsTable.cs} | 8 +++----- ...alization.cs => LogsTableColumn.Serialization.cs} | 6 +++--- .../{LogsQueryResultColumn.cs => LogsTableColumn.cs} | 7 ++++--- .../src/Generated/Models/Metric.Serialization.cs | 6 +++--- .../src/Generated/Models/Metric.cs | 10 +++++----- .../src/Generated/Models/MetricAvailability.cs | 2 +- .../src/Generated/Models/MetricDefinition.cs | 2 +- .../src/Generated/Models/MetricNamespace.cs | 2 +- .../Models/MetricsQueryResult.Serialization.cs | 6 +++--- .../src/Generated/Models/MetricsQueryResult.cs | 4 ++-- .../src/Generated/QueryModelFactory.cs | 8 ++++---- .../Azure.Monitor.Query/src/MetricsQueryOptions.cs | 2 +- .../src/Models/LogsBatchQueryResult.cs | 4 ++-- .../Models/{LogsQueryResultTable.cs => LogsTable.cs} | 12 ++++++------ .../{LogsQueryResultRow.cs => LogsTableRow.cs} | 7 ++++--- .../src/Models/{Metric.cs => MetricResult.cs} | 3 ++- .../src/Models/MetricsQueryResult.cs | 2 +- .../src/Models/QueryResultColumn.cs | 4 ++-- .../src/Properties/AssemblyInfo.cs | 2 +- sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs | 6 +++--- .../tests/LogsQueryClientClientLiveTests.cs | 2 +- 25 files changed, 66 insertions(+), 65 deletions(-) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{LogsQueryResultTable.Serialization.cs => LogsTable.Serialization.cs} (77%) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{LogsQueryResultTable.cs => LogsTable.cs} (83%) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{LogsQueryResultColumn.Serialization.cs => LogsTableColumn.Serialization.cs} (79%) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{LogsQueryResultColumn.cs => LogsTableColumn.cs} (81%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResultTable.cs => LogsTable.cs} (78%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{LogsQueryResultRow.cs => LogsTableRow.cs} (97%) rename sdk/monitor/Azure.Monitor.Query/src/Models/{Metric.cs => MetricResult.cs} (94%) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs index cbdc1b1afde82..2ac077d98d22b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs @@ -55,7 +55,7 @@ internal HttpMessage CreateListRequest(string resourceUri, string metricnamespac /// Lists the metric definitions for the resource. /// The identifier of the resource. - /// Metric namespace to query metric definitions for. + /// MetricResult namespace to query metric definitions for. /// The cancellation token to use. /// is null. public async Task> ListAsync(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) @@ -83,7 +83,7 @@ public async Task> ListAsync(string resourc /// Lists the metric definitions for the resource. /// The identifier of the resource. - /// Metric namespace to query metric definitions for. + /// MetricResult namespace to query metric definitions for. /// The cancellation token to use. /// is null. public Response List(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs index 83b4e94be0bb3..12d603ae542a5 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs @@ -89,7 +89,7 @@ internal HttpMessage CreateListRequest(string resourceUri, string timespan, Time /// The identifier of the resource. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'MetricResult,Name1' should be **'MetricResult%2Name1'**. /// The list of aggregation types (comma separated) to retrieve. /// /// The maximum number of records to retrieve. @@ -101,9 +101,9 @@ internal HttpMessage CreateListRequest(string resourceUri, string timespan, Time /// Only one order can be specified. /// Examples: sum asc. /// - /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// The **$filter** is used to reduce the set of metric data returned. Example: MetricResult contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// Metric namespace to query metric definitions for. + /// MetricResult namespace to query metric definitions for. /// The cancellation token to use. /// is null. public async Task> ListAsync(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) @@ -133,7 +133,7 @@ public async Task> ListAsync(string resourceUri, st /// The identifier of the resource. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'MetricResult,Name1' should be **'MetricResult%2Name1'**. /// The list of aggregation types (comma separated) to retrieve. /// /// The maximum number of records to retrieve. @@ -145,9 +145,9 @@ public async Task> ListAsync(string resourceUri, st /// Only one order can be specified. /// Examples: sum asc. /// - /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// The **$filter** is used to reduce the set of metric data returned. Example: MetricResult contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// Metric namespace to query metric definitions for. + /// MetricResult namespace to query metric definitions for. /// The cancellation token to use. /// is null. public Response List(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs index 7c04834c8cb8e..111a65079f04c 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResult.Serialization.cs @@ -26,7 +26,7 @@ internal static LogsQueryResult DeserializeLogsQueryResult(JsonElement element) List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); + array.Add(LogsTable.DeserializeLogsTable(item)); } tables = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs similarity index 77% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs index f3b52004a9992..5e34d49658976 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs @@ -13,10 +13,10 @@ namespace Azure.Monitor.Query.Models { public partial class LogsTable { - internal static LogsTable DeserializeLogsQueryResultTable(JsonElement element) + internal static LogsTable DeserializeLogsTable(JsonElement element) { string name = default; - IReadOnlyList columns = default; + IReadOnlyList columns = default; JsonElement rows = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static LogsTable DeserializeLogsQueryResultTable(JsonElement element) } if (property.NameEquals("columns")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsQueryResultColumn.DeserializeLogsQueryResultColumn(item)); + array.Add(LogsTableColumn.DeserializeLogsQueryResultColumn(item)); } columns = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.cs similarity index 83% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.cs index e89fc974ce47a..409043d197749 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.cs @@ -9,12 +9,10 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; -using Azure.Core; namespace Azure.Monitor.Query.Models { /// Contains the columns and rows for one table in a query response. - [CodeGenModel("LogsQueryResultTable")] public partial class LogsTable { /// Initializes a new instance of LogsTable. @@ -22,7 +20,7 @@ public partial class LogsTable /// The list of columns in this table. /// The resulting rows from this query. /// or is null. - internal LogsTable(string name, IEnumerable columns, JsonElement internalRows) + internal LogsTable(string name, IEnumerable columns, JsonElement internalRows) { if (name == null) { @@ -42,7 +40,7 @@ internal LogsTable(string name, IEnumerable columns, Json /// The name of the table. /// The list of columns in this table. /// The resulting rows from this query. - internal LogsTable(string name, IReadOnlyList columns, JsonElement internalRows) + internal LogsTable(string name, IReadOnlyList columns, JsonElement internalRows) { Name = name; Columns = columns; @@ -52,6 +50,6 @@ internal LogsTable(string name, IReadOnlyList columns, Js /// The name of the table. public string Name { get; } /// The list of columns in this table. - public IReadOnlyList Columns { get; } + public IReadOnlyList Columns { get; } } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs similarity index 79% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs index 186f482383270..9d91e9e1c2492 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.Monitor.Query.Models { - public partial class LogsQueryResultColumn + public partial class LogsTableColumn { - internal static LogsQueryResultColumn DeserializeLogsQueryResultColumn(JsonElement element) + internal static LogsTableColumn DeserializeLogsQueryResultColumn(JsonElement element) { string name = default; LogsColumnType type = default; @@ -29,7 +29,7 @@ internal static LogsQueryResultColumn DeserializeLogsQueryResultColumn(JsonEleme continue; } } - return new LogsQueryResultColumn(name, type); + return new LogsTableColumn(name, type); } } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs similarity index 81% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs index 169c5fd092841..bf970b5039163 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsQueryResultColumn.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs @@ -6,17 +6,18 @@ #nullable disable using System; +using Azure.Core; namespace Azure.Monitor.Query.Models { /// A column in a table. - public partial class LogsQueryResultColumn + public partial class LogsTableColumn { - /// Initializes a new instance of LogsQueryResultColumn. + /// Initializes a new instance of LogsTableColumn. /// The name of this column. /// The data type of this column. /// is null. - internal LogsQueryResultColumn(string name, LogsColumnType type) + internal LogsTableColumn(string name, LogsColumnType type) { if (name == null) { diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs index 359c4de83c7e5..f0fd1f7a417de 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.Monitor.Query.Models { - public partial class Metric + public partial class MetricResult { - internal static Metric DeserializeMetric(JsonElement element) + internal static MetricResult DeserializeMetric(JsonElement element) { string id = default; string type = default; @@ -71,7 +71,7 @@ internal static Metric DeserializeMetric(JsonElement element) continue; } } - return new Metric(id, type, name, displayDescription.Value, errorCode.Value, errorMessage.Value, unit, timeseries); + return new MetricResult(id, type, name, displayDescription.Value, errorCode.Value, errorMessage.Value, unit, timeseries); } } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs index c644fe047a108..1d582893bc7fa 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs @@ -12,16 +12,16 @@ namespace Azure.Monitor.Query.Models { /// The result data of a query. - public partial class Metric + public partial class MetricResult { - /// Initializes a new instance of Metric. + /// Initializes a new instance of MetricResult. /// the metric Id. /// the resource type of the metric resource. /// the name and the display name of the metric, i.e. it is localizable string. /// The unit of the metric. /// the time series returned when a data query is performed. /// , , , or is null. - internal Metric(string id, string type, LocalizableString localizedName, MetricUnit unit, IEnumerable timeSeries) + internal MetricResult(string id, string type, LocalizableString localizedName, MetricUnit unit, IEnumerable timeSeries) { if (id == null) { @@ -47,7 +47,7 @@ internal Metric(string id, string type, LocalizableString localizedName, MetricU TimeSeries = timeSeries.ToList(); } - /// Initializes a new instance of Metric. + /// Initializes a new instance of MetricResult. /// the metric Id. /// the resource type of the metric resource. /// the name and the display name of the metric, i.e. it is localizable string. @@ -56,7 +56,7 @@ internal Metric(string id, string type, LocalizableString localizedName, MetricU /// Error message encountered querying this specific metric. /// The unit of the metric. /// the time series returned when a data query is performed. - internal Metric(string id, string type, LocalizableString localizedName, string displayDescription, string errorCode, string errorMessage, MetricUnit unit, IReadOnlyList timeSeries) + internal MetricResult(string id, string type, LocalizableString localizedName, string displayDescription, string errorCode, string errorMessage, MetricUnit unit, IReadOnlyList timeSeries) { Id = id; Type = type; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs index 802c58effbd39..b7cdff4286504 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs @@ -10,7 +10,7 @@ namespace Azure.Monitor.Query.Models { - /// Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + /// MetricResult availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. public partial class MetricAvailability { /// Initializes a new instance of MetricAvailability. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs index bd737f7834b2e..aea96e9c2cdd4 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs @@ -10,7 +10,7 @@ namespace Azure.Monitor.Query.Models { - /// Metric definition class specifies the metadata for a metric. + /// MetricResult definition class specifies the metadata for a metric. public partial class MetricDefinition { /// Initializes a new instance of MetricDefinition. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs index d8225ba7afedd..c48bdf8dfe003 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs @@ -7,7 +7,7 @@ namespace Azure.Monitor.Query.Models { - /// Metric namespace class specifies the metadata for a metric namespace. + /// MetricResult namespace class specifies the metadata for a metric namespace. public partial class MetricNamespace { /// Initializes a new instance of MetricNamespace. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs index 63a16b06cde51..6a737cd5c8b44 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs @@ -21,7 +21,7 @@ internal static MetricsQueryResult DeserializeMetricsQueryResult(JsonElement ele Optional interval = default; Optional @namespace = default; Optional resourceregion = default; - IReadOnlyList value = default; + IReadOnlyList value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("cost")) @@ -61,10 +61,10 @@ internal static MetricsQueryResult DeserializeMetricsQueryResult(JsonElement ele } if (property.NameEquals("value")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(Metric.DeserializeMetric(item)); + array.Add(MetricResult.DeserializeMetric(item)); } value = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs index 2b2c965e32505..f07bffbe44ba4 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.cs @@ -18,7 +18,7 @@ public partial class MetricsQueryResult /// The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. /// the value of the collection. /// or is null. - internal MetricsQueryResult(string timespan, IEnumerable metrics) + internal MetricsQueryResult(string timespan, IEnumerable metrics) { if (timespan == null) { @@ -40,7 +40,7 @@ internal MetricsQueryResult(string timespan, IEnumerable metrics) /// The namespace of the metrics being queried. /// The region of the resource being queried for metrics. /// the value of the collection. - internal MetricsQueryResult(int? cost, string timespan, TimeSpan? interval, string @namespace, string resourceRegion, IReadOnlyList metrics) + internal MetricsQueryResult(int? cost, string timespan, TimeSpan? interval, string @namespace, string resourceRegion, IReadOnlyList metrics) { Cost = cost; _timespan = timespan; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs index b8b3133515251..5fe4b807d3764 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs @@ -12,13 +12,13 @@ namespace Azure.Monitor.Query.Models /// Model factory for read-only models. public static partial class QueryModelFactory { - /// Initializes a new instance of LogsQueryResultColumn. + /// Initializes a new instance of LogsTableColumn. /// The name of this column. /// The data type of this column. - /// A new instance for mocking. - public static LogsQueryResultColumn LogsQueryResultColumn(string name = null, LogsColumnType type = default) + /// A new instance for mocking. + public static LogsTableColumn LogsQueryResultColumn(string name = null, LogsColumnType type = default) { - return new LogsQueryResultColumn(name, type); + return new LogsTableColumn(name, type); } /// Initializes a new instance of MetricAvailability. diff --git a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs index 04446142e4cfc..540aa2070f02b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryOptions.cs @@ -38,7 +38,7 @@ public class MetricsQueryOptions /// /// Gets or sets the filter that is used to refine the set of metric data returned. /// - /// Metric contains metadata A, B and C.
+ /// MetricResult contains metadata A, B and C.
///
/// - Return all time series of C where A = a1 and B = b1 or b2:
/// A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'
diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs index 2f85bec243765..3e6171fff2858 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResult.cs @@ -59,7 +59,7 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsTable.DeserializeLogsQueryResultTable(item)); + array.Add(LogsTable.DeserializeLogsTable(item)); } tables = array; continue; @@ -78,4 +78,4 @@ internal static LogsBatchQueryResult DeserializeLogsBatchQueryResult(JsonElement return new LogsBatchQueryResult(tables, statistics, render, error); } } -} \ No newline at end of file +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs similarity index 78% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs index 3b3c9194c764d..a563dd0d36bd3 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultTable.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTable.cs @@ -11,7 +11,7 @@ namespace Azure.Monitor.Query.Models [CodeGenModel("Table")] public partial class LogsTable { - private IReadOnlyList _rows; + private IReadOnlyList _rows; [CodeGenMember("Rows")] private JsonElement InternalRows { get; } @@ -19,9 +19,9 @@ public partial class LogsTable /// /// Gets the rows of the result table. /// - public IReadOnlyList Rows => _rows ??= CreateRows(); + public IReadOnlyList Rows => _rows ??= CreateRows(); - private IReadOnlyList CreateRows() + private IReadOnlyList CreateRows() { Dictionary columnDictionary = new(); @@ -30,11 +30,11 @@ private IReadOnlyList CreateRows() columnDictionary[Columns[index].Name] = index; } - List rows = new List(); + List rows = new List(); foreach (var row in InternalRows.EnumerateArray()) { - rows.Add(new LogsQueryResultRow(columnDictionary, Columns, row)); + rows.Add(new LogsTableRow(columnDictionary, Columns, row)); } return rows; @@ -55,4 +55,4 @@ public override string ToString() return $"{Name}: {Rows.Count} rows, {Columns.Count} columns"; } } -} \ No newline at end of file +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs similarity index 97% rename from sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs index 97b0aaad6546b..b21f51f2bdf50 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsQueryResultRow.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsTableRow.cs @@ -12,13 +12,14 @@ namespace Azure.Monitor.Query.Models /// /// Represents a row in the table of results returned from the logs query. /// - public class LogsQueryResultRow + [CodeGenModel("LogsQueryResultRow")] + public class LogsTableRow { private readonly Dictionary _columnMap; - private readonly IReadOnlyList _columns; + private readonly IReadOnlyList _columns; private readonly JsonElement _row; - internal LogsQueryResultRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) + internal LogsTableRow(Dictionary columnMap, IReadOnlyList columns, JsonElement row) { _columnMap = columnMap; _columns = columns; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricResult.cs similarity index 94% rename from sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs rename to sdk/monitor/Azure.Monitor.Query/src/Models/MetricResult.cs index 5037746176c6a..322b85d28bd05 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/Metric.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricResult.cs @@ -6,7 +6,8 @@ namespace Azure.Monitor.Query.Models { - public partial class Metric + [CodeGenModel("Metric")] + public partial class MetricResult { private const string SuccessErrorCode = "Success"; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs index da44b85ef36d1..bb182b2c96ec5 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/MetricsQueryResult.cs @@ -14,7 +14,7 @@ public partial class MetricsQueryResult /// Metrics returned as the result of the query. [CodeGenMember("Value")] - public IReadOnlyList Metrics { get; } + public IReadOnlyList Metrics { get; } /// /// The timespan for which the data was retrieved. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs index 0e1796323e3df..9bff8c090858f 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/QueryResultColumn.cs @@ -6,7 +6,7 @@ namespace Azure.Monitor.Query.Models { [CodeGenModel("Column")] - public partial class LogsQueryResultColumn + public partial class LogsTableColumn { /// public override string ToString() @@ -14,4 +14,4 @@ public override string ToString() return $"{Name} ({Type})"; } } -} \ No newline at end of file +} diff --git a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs index 390e37022ebbd..40c34c4bb91d8 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Properties/AssemblyInfo.cs @@ -8,5 +8,5 @@ [assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Insights")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.Metric")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Monitor.Query.Models.MetricResult")] [assembly: SuppressMessage("Usage", "AZC0014:Types from System.Text.Json, Newtonsoft.Json, System.Collections.Immutable assemblies should not be exposed as part of public API surface.", Justification = "")] diff --git a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs index 4181f3e457c8d..570d9667b9644 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/RowBinder.cs @@ -7,7 +7,7 @@ namespace Azure.Monitor.Query { - internal class RowBinder: TypeBinder + internal class RowBinder: TypeBinder { internal static RowBinder Shared = new(); internal IReadOnlyList BindResults(IReadOnlyList tables) @@ -45,12 +45,12 @@ internal IReadOnlyList BindResults(IReadOnlyList tables) return results; } - protected override void Set(LogsQueryResultRow destination, T value, BoundMemberInfo memberInfo) + protected override void Set(LogsTableRow destination, T value, BoundMemberInfo memberInfo) { throw new NotSupportedException(); } - protected override bool TryGet(BoundMemberInfo memberInfo, LogsQueryResultRow source, out T value) + protected override bool TryGet(BoundMemberInfo memberInfo, LogsTableRow source, out T value) { int column; diff --git a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs index 117d2f6807669..390469173877e 100644 --- a/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.Query/tests/LogsQueryClientClientLiveTests.cs @@ -240,7 +240,7 @@ public async Task CanQueryAllSupportedTypes() "dynamic({\"a\":123, \"b\":\"hello\", \"c\":[1,2,3], \"d\":{}})" + "]", _logsTestData.DataTimeRange); - LogsQueryResultRow row = results.Value.Table.Rows[0]; + LogsTableRow row = results.Value.Table.Rows[0]; var expectedDate = DateTimeOffset.Parse("2015-12-31 23:59:59.9+00:00"); Assert.AreEqual(expectedDate, row.GetDateTimeOffset("DateTime")); From bc105899870abc54bccb2556446ecdfad5fd331d Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Tue, 24 Aug 2021 09:36:35 -0700 Subject: [PATCH 5/6] update --- sdk/monitor/Azure.Monitor.Query/README.md | 4 +- .../api/Azure.Monitor.Query.netstandard2.0.cs | 60 +++++++++---------- .../Generated/MetricDefinitionsRestClient.cs | 4 +- .../src/Generated/MetricsRestClient.cs | 12 ++-- .../Models/LogsTable.Serialization.cs | 2 +- .../Models/LogsTableColumn.Serialization.cs | 2 +- .../src/Generated/Models/LogsTableColumn.cs | 1 - .../Generated/Models/MetricAvailability.cs | 8 +-- .../src/Generated/Models/MetricDefinition.cs | 2 +- .../src/Generated/Models/MetricNamespace.cs | 2 +- ...ation.cs => MetricResult.Serialization.cs} | 2 +- .../Models/{Metric.cs => MetricResult.cs} | 0 .../MetricsQueryResult.Serialization.cs | 2 +- .../src/Generated/QueryModelFactory.cs | 2 +- .../src/LogsQueryClient.cs | 16 ++--- .../src/Models/LogsBatchQuery.cs | 4 +- .../src/Models/LogsBatchQueryResults.cs | 4 +- 17 files changed, 62 insertions(+), 65 deletions(-) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{Metric.Serialization.cs => MetricResult.Serialization.cs} (97%) rename sdk/monitor/Azure.Monitor.Query/src/Generated/Models/{Metric.cs => MetricResult.cs} (100%) diff --git a/sdk/monitor/Azure.Monitor.Query/README.md b/sdk/monitor/Azure.Monitor.Query/README.md index b823b8fb1fc21..889db7e07ff04 100644 --- a/sdk/monitor/Azure.Monitor.Query/README.md +++ b/sdk/monitor/Azure.Monitor.Query/README.md @@ -74,7 +74,7 @@ Response response = await client.QueryAsync( "AzureActivity | top 10 by TimeGenerated", new DateTimeRange(TimeSpan.FromDays(1))); -LogsQueryResultTable table = response.Value.Table; +LogsTable table = response.Value.Table; foreach (var row in table.Rows) { @@ -178,7 +178,7 @@ Response response = await client.QueryAsync( "AzureActivity | top 10 by TimeGenerated", new DateTimeRange(TimeSpan.FromDays(1))); -LogsQueryResultTable table = response.Value.Table; +LogsTable table = response.Value.Table; foreach (var column in table.Columns) { diff --git a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs index 3c74cfb21005b..af1770e21fdc4 100644 --- a/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs +++ b/sdk/monitor/Azure.Monitor.Query/api/Azure.Monitor.Query.netstandard2.0.cs @@ -63,10 +63,10 @@ public partial class MetricsQueryOptions public MetricsQueryOptions() { } public System.Collections.Generic.IList Aggregations { get { throw null; } } public string Filter { get { throw null; } set { } } - public System.TimeSpan? Interval { get { throw null; } set { } } + public System.TimeSpan? Granularity { get { throw null; } set { } } public string MetricNamespace { get { throw null; } set { } } public string OrderBy { get { throw null; } set { } } - public Azure.Core.DateTimeRange? TimeSpan { get { throw null; } set { } } + public Azure.Core.DateTimeRange? TimeRange { get { throw null; } set { } } public int? Top { get { throw null; } set { } } } } @@ -114,22 +114,31 @@ internal LogsBatchQueryResults() { } public partial class LogsQueryResult { internal LogsQueryResult() { } - public System.Collections.Generic.IReadOnlyList AllTables { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllTables { get { throw null; } } public Azure.Core.ResponseError Error { get { throw null; } } - public Azure.Monitor.Query.Models.LogsQueryResultTable Table { get { throw null; } } + public Azure.Monitor.Query.Models.LogsTable Table { get { throw null; } } public System.BinaryData GetStatistics() { throw null; } public System.BinaryData GetVisualization() { throw null; } } - public partial class LogsQueryResultColumn + public partial class LogsTable { - internal LogsQueryResultColumn() { } + internal LogsTable() { } + public System.Collections.Generic.IReadOnlyList Columns { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Rows { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Deserialize() { throw null; } + public override string ToString() { throw null; } + } + public partial class LogsTableColumn + { + internal LogsTableColumn() { } public string Name { get { throw null; } } public Azure.Monitor.Query.Models.LogsColumnType Type { get { throw null; } } public override string ToString() { throw null; } } - public partial class LogsQueryResultRow + public partial class LogsTableRow { - internal LogsQueryResultRow() { } + internal LogsTableRow() { } public int Count { get { throw null; } } public object this[int index] { get { throw null; } } public object this[string name] { get { throw null; } } @@ -159,26 +168,6 @@ internal LogsQueryResultRow() { } public bool IsNull(string name) { throw null; } public override string ToString() { throw null; } } - public partial class LogsQueryResultTable - { - internal LogsQueryResultTable() { } - public System.Collections.Generic.IReadOnlyList Columns { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Rows { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Deserialize() { throw null; } - public override string ToString() { throw null; } - } - public partial class Metric - { - internal Metric() { } - public string DisplayDescription { get { throw null; } } - public Azure.Core.ResponseError Error { get { throw null; } } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList TimeSeries { get { throw null; } } - public string Type { get { throw null; } } - public Azure.Monitor.Query.Models.MetricUnit Unit { get { throw null; } } - } public enum MetricAggregationType { None = 0, @@ -241,12 +230,23 @@ internal MetricNamespace() { } public string Name { get { throw null; } } public string Type { get { throw null; } } } + public partial class MetricResult + { + internal MetricResult() { } + public string DisplayDescription { get { throw null; } } + public Azure.Core.ResponseError Error { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TimeSeries { get { throw null; } } + public string Type { get { throw null; } } + public Azure.Monitor.Query.Models.MetricUnit Unit { get { throw null; } } + } public partial class MetricsQueryResult { internal MetricsQueryResult() { } public int? Cost { get { throw null; } } public System.TimeSpan? Interval { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Metrics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Metrics { get { throw null; } } public string Namespace { get { throw null; } } public string ResourceRegion { get { throw null; } } public Azure.Core.DateTimeRange TimeSpan { get { throw null; } } @@ -312,7 +312,7 @@ internal MetricValue() { } } public static partial class QueryModelFactory { - public static Azure.Monitor.Query.Models.LogsQueryResultColumn LogsQueryResultColumn(string name = null, Azure.Monitor.Query.Models.LogsColumnType type = default(Azure.Monitor.Query.Models.LogsColumnType)) { throw null; } + public static Azure.Monitor.Query.Models.LogsTableColumn LogsTableColumn(string name = null, Azure.Monitor.Query.Models.LogsColumnType type = default(Azure.Monitor.Query.Models.LogsColumnType)) { throw null; } public static Azure.Monitor.Query.Models.MetricAvailability MetricAvailability(System.TimeSpan? timeGrain = default(System.TimeSpan?), System.TimeSpan? retention = default(System.TimeSpan?)) { throw null; } public static Azure.Monitor.Query.Models.MetricValue MetricValue(System.DateTimeOffset timeStamp = default(System.DateTimeOffset), double? average = default(double?), double? minimum = default(double?), double? maximum = default(double?), double? total = default(double?), double? count = default(double?)) { throw null; } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs index 2ac077d98d22b..cbdc1b1afde82 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricDefinitionsRestClient.cs @@ -55,7 +55,7 @@ internal HttpMessage CreateListRequest(string resourceUri, string metricnamespac /// Lists the metric definitions for the resource. /// The identifier of the resource. - /// MetricResult namespace to query metric definitions for. + /// Metric namespace to query metric definitions for. /// The cancellation token to use. /// is null. public async Task> ListAsync(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) @@ -83,7 +83,7 @@ public async Task> ListAsync(string resourc /// Lists the metric definitions for the resource. /// The identifier of the resource. - /// MetricResult namespace to query metric definitions for. + /// Metric namespace to query metric definitions for. /// The cancellation token to use. /// is null. public Response List(string resourceUri, string metricnamespace = null, CancellationToken cancellationToken = default) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs index 12d603ae542a5..83b4e94be0bb3 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/MetricsRestClient.cs @@ -89,7 +89,7 @@ internal HttpMessage CreateListRequest(string resourceUri, string timespan, Time /// The identifier of the resource. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'MetricResult,Name1' should be **'MetricResult%2Name1'**. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. /// The list of aggregation types (comma separated) to retrieve. /// /// The maximum number of records to retrieve. @@ -101,9 +101,9 @@ internal HttpMessage CreateListRequest(string resourceUri, string timespan, Time /// Only one order can be specified. /// Examples: sum asc. /// - /// The **$filter** is used to reduce the set of metric data returned. Example: MetricResult contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// MetricResult namespace to query metric definitions for. + /// Metric namespace to query metric definitions for. /// The cancellation token to use. /// is null. public async Task> ListAsync(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) @@ -133,7 +133,7 @@ public async Task> ListAsync(string resourceUri, st /// The identifier of the resource. /// The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. /// The interval (i.e. timegrain) of the query. - /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'MetricResult,Name1' should be **'MetricResult%2Name1'**. + /// The names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be **'Metric%2Name1'**. /// The list of aggregation types (comma separated) to retrieve. /// /// The maximum number of records to retrieve. @@ -145,9 +145,9 @@ public async Task> ListAsync(string resourceUri, st /// Only one order can be specified. /// Examples: sum asc. /// - /// The **$filter** is used to reduce the set of metric data returned. Example: MetricResult contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. + /// The **$filter** is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series where A = a1 **$filter=A eq 'a1' and B eq '*' and C eq '*'**. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** Instead of using $filter= "dim (test) 1 eq '*' " use **$filter= "dim %2528test%2529 1 eq '*' "** When dimension name is **dim (test) 3** and dimension value is **dim3 (test) val** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **$filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. /// Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. - /// MetricResult namespace to query metric definitions for. + /// Metric namespace to query metric definitions for. /// The cancellation token to use. /// is null. public Response List(string resourceUri, string timespan = null, TimeSpan? interval = null, string metricnames = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, ResultType? resultType = null, string metricnamespace = null, CancellationToken cancellationToken = default) diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs index 5e34d49658976..1641f701ec6b3 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTable.Serialization.cs @@ -30,7 +30,7 @@ internal static LogsTable DeserializeLogsTable(JsonElement element) List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(LogsTableColumn.DeserializeLogsQueryResultColumn(item)); + array.Add(LogsTableColumn.DeserializeLogsTableColumn(item)); } columns = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs index 9d91e9e1c2492..a89d672c21883 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.Monitor.Query.Models { public partial class LogsTableColumn { - internal static LogsTableColumn DeserializeLogsQueryResultColumn(JsonElement element) + internal static LogsTableColumn DeserializeLogsTableColumn(JsonElement element) { string name = default; LogsColumnType type = default; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs index bf970b5039163..a7f9558177756 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/LogsTableColumn.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using Azure.Core; namespace Azure.Monitor.Query.Models { diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs index b7cdff4286504..4c400580c534b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricAvailability.cs @@ -6,11 +6,10 @@ #nullable disable using System; -using Azure.Core; namespace Azure.Monitor.Query.Models { - /// MetricResult availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + /// Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. public partial class MetricAvailability { /// Initializes a new instance of MetricAvailability. @@ -23,13 +22,12 @@ internal MetricAvailability() /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. internal MetricAvailability(TimeSpan? timeGrain, TimeSpan? retention) { - Granularity = timeGrain; + TimeGrain = timeGrain; Retention = retention; } /// the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. - [CodeGenMember("TimeGrain")] - public TimeSpan? Granularity { get; } + public TimeSpan? TimeGrain { get; } /// the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. public TimeSpan? Retention { get; } } diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs index aea96e9c2cdd4..bd737f7834b2e 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricDefinition.cs @@ -10,7 +10,7 @@ namespace Azure.Monitor.Query.Models { - /// MetricResult definition class specifies the metadata for a metric. + /// Metric definition class specifies the metadata for a metric. public partial class MetricDefinition { /// Initializes a new instance of MetricDefinition. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs index c48bdf8dfe003..d8225ba7afedd 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricNamespace.cs @@ -7,7 +7,7 @@ namespace Azure.Monitor.Query.Models { - /// MetricResult namespace class specifies the metadata for a metric namespace. + /// Metric namespace class specifies the metadata for a metric namespace. public partial class MetricNamespace { /// Initializes a new instance of MetricNamespace. diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricResult.Serialization.cs similarity index 97% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricResult.Serialization.cs index f0fd1f7a417de..c18c1773a9d25 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricResult.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.Monitor.Query.Models { public partial class MetricResult { - internal static MetricResult DeserializeMetric(JsonElement element) + internal static MetricResult DeserializeMetricResult(JsonElement element) { string id = default; string type = default; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricResult.cs similarity index 100% rename from sdk/monitor/Azure.Monitor.Query/src/Generated/Models/Metric.cs rename to sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricResult.cs diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs index 6a737cd5c8b44..3ff71589b737b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Models/MetricsQueryResult.Serialization.cs @@ -64,7 +64,7 @@ internal static MetricsQueryResult DeserializeMetricsQueryResult(JsonElement ele List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MetricResult.DeserializeMetric(item)); + array.Add(MetricResult.DeserializeMetricResult(item)); } value = array; continue; diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs index 5fe4b807d3764..cb962391945b3 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/QueryModelFactory.cs @@ -16,7 +16,7 @@ public static partial class QueryModelFactory /// The name of this column. /// The data type of this column. /// A new instance for mocking. - public static LogsTableColumn LogsQueryResultColumn(string name = null, LogsColumnType type = default) + public static LogsTableColumn LogsTableColumn(string name = null, LogsColumnType type = default) { return new LogsTableColumn(name, type); } diff --git a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs index 8553a6f351a85..0ebaa6110f4a5 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/LogsQueryClient.cs @@ -89,7 +89,7 @@ protected LogsQueryClient() /// Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryAsync<MyLogEntryModel>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// /// Example of querying a primitive: @@ -97,7 +97,7 @@ protected LogsQueryClient() /// Response<IReadOnlyList<string>> response = await client.QueryAsync<string>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// /// The workspace id to include in the query (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). @@ -121,7 +121,7 @@ public virtual Response> Query(string workspaceId, string qu /// Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryAsync<MyLogEntryModel>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// /// Example of querying a primitive: @@ -129,7 +129,7 @@ public virtual Response> Query(string workspaceId, string qu /// Response<IReadOnlyList<string>> response = await client.QueryAsync<string>( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// ///
/// The workspace id to include in the query (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). @@ -207,11 +207,11 @@ public virtual async Task> QueryAsync(string workspace /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// @@ -260,11 +260,11 @@ public virtual Response QueryBatch(LogsBatchQuery batch, /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs index 6f3ad46926695..c83018551b801 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQuery.cs @@ -29,11 +29,11 @@ public LogsBatchQuery() /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// diff --git a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs index 48f8e10739023..a112ec26f548d 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Models/LogsBatchQueryResults.cs @@ -27,11 +27,11 @@ public partial class LogsBatchQueryResults /// string countQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// string topQueryId = batch.AddQuery( /// workspaceId, /// "AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count", - /// new DateTimeRange(TimeRange.FromDays(1))); + /// new DateTimeRange(TimeSpan.FromDays(1))); /// /// Response<LogsBatchQueryResults> response = await client.QueryBatchAsync(batch); /// From 6fb0a590b1ed291535875a5138f22ec218f53f6a Mon Sep 17 00:00:00 2001 From: Nisha Bhatia <67986960+nisha-bhatia@users.noreply.github.com> Date: Tue, 24 Aug 2021 09:38:29 -0700 Subject: [PATCH 6/6] Create PiiDetectionSkillMaskingMode.cs --- .../Models/PiiDetectionSkillMaskingMode.cs | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs new file mode 100644 index 0000000000000..0c6970d3e4d22 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A string indicating what maskingMode to use to mask the personal information detected in the input text. + public readonly partial struct PiiDetectionSkillMaskingMode : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PiiDetectionSkillMaskingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string ReplaceValue = "replace"; + + /// No masking occurs and the maskedText output will not be returned. + public static PiiDetectionSkillMaskingMode None { get; } = new PiiDetectionSkillMaskingMode(NoneValue); + /// Replaces the detected entities with the character given in the maskingCharacter parameter. The character will be repeated to the length of the detected entity so that the offsets will correctly correspond to both the input text as well as the output maskedText. + public static PiiDetectionSkillMaskingMode Replace { get; } = new PiiDetectionSkillMaskingMode(ReplaceValue); + /// Determines if two values are the same. + public static bool operator ==(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PiiDetectionSkillMaskingMode(string value) => new PiiDetectionSkillMaskingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PiiDetectionSkillMaskingMode other && Equals(other); + /// + public bool Equals(PiiDetectionSkillMaskingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +}