diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml
deleted file mode 100644
index b736f7ed1cfe..000000000000
--- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/LogsIngestionClient.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-This sample shows how to call UploadAsync with required parameters and request content.
-");
-var client = new LogsIngestionClient(endpoint, credential);
-
-var data = new[] {
- new {}
-};
-
-Response response = await client.UploadAsync("", "", RequestContent.Create(data));
-Console.WriteLine(response.Status);
-]]>
-This sample shows how to call UploadAsync with all parameters and request content.
-");
-var client = new LogsIngestionClient(endpoint, credential);
-
-var data = new[] {
- new {}
-};
-
-Response response = await client.UploadAsync("", "", RequestContent.Create(data), "");
-Console.WriteLine(response.Status);
-]]>
-
-
-See error response code and error response message for more detail.
-
-
-
-
-This sample shows how to call Upload with required parameters and request content.
-");
-var client = new LogsIngestionClient(endpoint, credential);
-
-var data = new[] {
- new {}
-};
-
-Response response = client.Upload("", "", RequestContent.Create(data));
-Console.WriteLine(response.Status);
-]]>
-This sample shows how to call Upload with all parameters and request content.
-");
-var client = new LogsIngestionClient(endpoint, credential);
-
-var data = new[] {
- new {}
-};
-
-Response response = client.Upload("", "", RequestContent.Create(data), "");
-Console.WriteLine(response.Status);
-]]>
-
-
-See error response code and error response message for more detail.
-
-
-
-
\ No newline at end of file
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/MetricsClient.xml b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/MetricsClient.xml
new file mode 100644
index 000000000000..16bc5e9a2be3
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/Docs/MetricsClient.xml
@@ -0,0 +1,455 @@
+
+
+
+
+
+This sample shows how to call BatchAsync with required parameters and parse the result.
+", "", "", new String[]{""}, RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call BatchAsync with all parameters and request content, and how to parse the result.
+", "", "", new String[]{""}, RequestContent.Create(data), "", new TimeSpan(1, 2, 3), "", 1234, "", "");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("timespan").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("interval").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("namespace").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("resourceregion").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("resourceid").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("name").GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("name").GetProperty("localizedValue").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("displayDescription").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("type").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("unit").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("name").GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("name").GetProperty("localizedValue").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("timeStamp").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("average").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("minimum").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("maximum").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("total").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("count").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("errorCode").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("errorMessage").ToString());
+]]>
+
+
+Below is the JSON schema for the request and response payloads.
+
+Request Body:
+
+Schema for ResourceIdList:
+{
+ resourceids: [ResourceIdentifier], # Optional. The list of resource IDs to query metrics for.
+}
+
+
+Response Body:
+
+Schema for MetricResultsResponse:
+{
+ values: [
+ {
+ timespan: string, # Required. 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.
+ interval: string (duration ISO 8601 Format), # Optional. The interval (window size) for which the metric data was returned in. Follows the IS8601/RFC3339 duration format (e.g. 'P1D' for 1 day). 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.
+ namespace: string, # Optional. The namespace of the metrics been queried
+ resourceregion: string, # Optional. The region of the resource been queried for metrics.
+ resourceid: string, # Optional. The resource that has been queried for metrics.
+ value: [
+ {
+ id: string, # Required. The metric Id.
+ name: {
+ value: string, # Required. The invariant value.
+ localizedValue: string, # Optional. The display name.
+ }, # Required. The name and the display name of the metric, i.e. it is localizable string.
+ displayDescription: string, # Required. Description of this metric
+ type: string, # Required. The resource type of the metric resource.
+ unit: "Count" | "Bytes" | "Seconds" | "CountPerSecond" | "BytesPerSecond" | "Percent" | "MilliSeconds" | "ByteSeconds" | "Unspecified" | "Cores" | "MilliCores" | "NanoCores" | "BitsPerSecond", # Required. The unit of the metric.
+ timeseries: [
+ {
+ metadatavalues: [
+ {
+ name: LocalizableString, # Optional. The name of the metadata.
+ value: string, # Optional. The value of the metadata.
+ }
+ ], # Optional. The metadata values returned if filter was specified in the call.
+ data: [
+ {
+ timeStamp: string (ISO 8601 Format), # Required. The timestamp for the metric value in ISO 8601 format.
+ average: number, # Optional. The average value in the time range.
+ minimum: number, # Optional. The least value in the time range.
+ maximum: number, # Optional. The greatest value in the time range.
+ total: number, # Optional. The sum of all of the values in the time range.
+ count: number, # Optional. The number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
+ }
+ ], # Optional. An array of data points representing the metric values. This is only returned if a result type of data is specified.
+ }
+ ], # Required. The time series returned when a data query is performed.
+ errorCode: string, # Optional. 'Success' or the error details on query failures for this metric.
+ errorMessage: string, # Optional. Error message encountered querying this specific metric.
+ }
+ ], # Required. The value of the collection.
+ }
+ ], # Optional. The collection of metric data responses per resource, per metric.
+}
+
+
+
+
+
+
+This sample shows how to call Batch with required parameters and parse the result.
+", "", "", new String[]{""}, RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call Batch with all parameters and request content, and how to parse the result.
+", "", "", new String[]{""}, RequestContent.Create(data), "", new TimeSpan(1, 2, 3), "", 1234, "", "");
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("timespan").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("interval").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("namespace").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("resourceregion").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("resourceid").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("name").GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("name").GetProperty("localizedValue").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("displayDescription").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("type").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("unit").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("name").GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("name").GetProperty("localizedValue").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("metadatavalues")[0].GetProperty("value").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("timeStamp").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("average").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("minimum").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("maximum").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("total").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("timeseries")[0].GetProperty("data")[0].GetProperty("count").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("errorCode").ToString());
+Console.WriteLine(result.GetProperty("values")[0].GetProperty("value")[0].GetProperty("errorMessage").ToString());
+]]>
+
+
+Below is the JSON schema for the request and response payloads.
+
+Request Body:
+
+Schema for ResourceIdList:
+{
+ resourceids: [ResourceIdentifier], # Optional. The list of resource IDs to query metrics for.
+}
+
+
+Response Body:
+
+Schema for MetricResultsResponse:
+{
+ values: [
+ {
+ timespan: string, # Required. 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.
+ interval: string (duration ISO 8601 Format), # Optional. The interval (window size) for which the metric data was returned in. Follows the IS8601/RFC3339 duration format (e.g. 'P1D' for 1 day). 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.
+ namespace: string, # Optional. The namespace of the metrics been queried
+ resourceregion: string, # Optional. The region of the resource been queried for metrics.
+ resourceid: string, # Optional. The resource that has been queried for metrics.
+ value: [
+ {
+ id: string, # Required. The metric Id.
+ name: {
+ value: string, # Required. The invariant value.
+ localizedValue: string, # Optional. The display name.
+ }, # Required. The name and the display name of the metric, i.e. it is localizable string.
+ displayDescription: string, # Required. Description of this metric
+ type: string, # Required. The resource type of the metric resource.
+ unit: "Count" | "Bytes" | "Seconds" | "CountPerSecond" | "BytesPerSecond" | "Percent" | "MilliSeconds" | "ByteSeconds" | "Unspecified" | "Cores" | "MilliCores" | "NanoCores" | "BitsPerSecond", # Required. The unit of the metric.
+ timeseries: [
+ {
+ metadatavalues: [
+ {
+ name: LocalizableString, # Optional. The name of the metadata.
+ value: string, # Optional. The value of the metadata.
+ }
+ ], # Optional. The metadata values returned if filter was specified in the call.
+ data: [
+ {
+ timeStamp: string (ISO 8601 Format), # Required. The timestamp for the metric value in ISO 8601 format.
+ average: number, # Optional. The average value in the time range.
+ minimum: number, # Optional. The least value in the time range.
+ maximum: number, # Optional. The greatest value in the time range.
+ total: number, # Optional. The sum of all of the values in the time range.
+ count: number, # Optional. The number of samples in the time range. Can be used to determine the number of values that contributed to the average value.
+ }
+ ], # Optional. An array of data points representing the metric values. This is only returned if a result type of data is specified.
+ }
+ ], # Required. The time series returned when a data query is performed.
+ errorCode: string, # Optional. 'Success' or the error details on query failures for this metric.
+ errorMessage: string, # Optional. Error message encountered querying this specific metric.
+ }
+ ], # Required. The value of the collection.
+ }
+ ], # Optional. The collection of metric data responses per resource, per metric.
+}
+
+
+
+
+
+
+This sample shows how to call CreateAsync with required parameters and request content, and how to parse the result.
+",
+ data = new {
+ baseData = new {
+ metric = "",
+ namespace = "",
+ series = new[] {
+ new {
+ min = 123.45d,
+ max = 123.45d,
+ sum = 123.45d,
+ count = 1234,
+ }
+ },
+ },
+ },
+};
+
+Response response = await client.CreateAsync("", "", "", "", "", "", 1234, "", RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call CreateAsync with all parameters and request content, and how to parse the result.
+",
+ data = new {
+ baseData = new {
+ metric = "",
+ namespace = "",
+ dimNames = new[] {
+ ""
+ },
+ series = new[] {
+ new {
+ dimValues = new[] {
+ ""
+ },
+ min = 123.45d,
+ max = 123.45d,
+ sum = 123.45d,
+ count = 1234,
+ }
+ },
+ },
+ },
+};
+
+Response response = await client.CreateAsync("", "", "", "", "", "", 1234, "", RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("statusCode").ToString());
+Console.WriteLine(result.GetProperty("apiFailureResponse").GetProperty("error").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("apiFailureResponse").GetProperty("error").GetProperty("message").ToString());
+]]>
+
+
+Below is the JSON schema for the request and response payloads.
+
+Request Body:
+
+Schema for AzureMetricsDocument:
+{
+ time: string, # Required. Gets or sets Time property (in ISO 8601 format)
+ data: {
+ baseData: {
+ metric: string, # Required. Gets or sets the Metric name
+ namespace: string, # Required. Gets or sets the Metric namespace
+ dimNames: [string], # Optional. Gets or sets the list of dimension names (optional)
+ series: [
+ {
+ dimValues: [string], # Optional. Gets or sets dimension values
+ min: number, # Required. Gets or sets Min value
+ max: number, # Required. Gets or sets Max value
+ sum: number, # Required. Gets or sets Sum value
+ count: number, # Required. Gets or sets Count value
+ }
+ ], # Required. Gets or sets the list of time series data for the metric (one per unique dimension combination)
+ }, # Required.
+ }, # Required.
+}
+
+
+Response Body:
+
+Schema for AzureMetricsResult:
+{
+ statusCode: number, # Optional. Http status code response
+ apiFailureResponse: {
+ error: {
+ code: string, # Optional. Gets or sets the azure metrics error code
+ message: string, # Optional. Gets or sets the azure metrics error message
+ }, # Optional.
+ }, # Optional.
+}
+
+
+
+
+
+
+This sample shows how to call Create with required parameters and request content, and how to parse the result.
+",
+ data = new {
+ baseData = new {
+ metric = "",
+ namespace = "",
+ series = new[] {
+ new {
+ min = 123.45d,
+ max = 123.45d,
+ sum = 123.45d,
+ count = 1234,
+ }
+ },
+ },
+ },
+};
+
+Response response = client.Create("", "", "", "", "", "", 1234, "", RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.ToString());
+]]>
+This sample shows how to call Create with all parameters and request content, and how to parse the result.
+",
+ data = new {
+ baseData = new {
+ metric = "",
+ namespace = "",
+ dimNames = new[] {
+ ""
+ },
+ series = new[] {
+ new {
+ dimValues = new[] {
+ ""
+ },
+ min = 123.45d,
+ max = 123.45d,
+ sum = 123.45d,
+ count = 1234,
+ }
+ },
+ },
+ },
+};
+
+Response response = client.Create("", "", "", "", "", "", 1234, "", RequestContent.Create(data));
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("statusCode").ToString());
+Console.WriteLine(result.GetProperty("apiFailureResponse").GetProperty("error").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("apiFailureResponse").GetProperty("error").GetProperty("message").ToString());
+]]>
+
+
+Below is the JSON schema for the request and response payloads.
+
+Request Body:
+
+Schema for AzureMetricsDocument:
+{
+ time: string, # Required. Gets or sets Time property (in ISO 8601 format)
+ data: {
+ baseData: {
+ metric: string, # Required. Gets or sets the Metric name
+ namespace: string, # Required. Gets or sets the Metric namespace
+ dimNames: [string], # Optional. Gets or sets the list of dimension names (optional)
+ series: [
+ {
+ dimValues: [string], # Optional. Gets or sets dimension values
+ min: number, # Required. Gets or sets Min value
+ max: number, # Required. Gets or sets Max value
+ sum: number, # Required. Gets or sets Sum value
+ count: number, # Required. Gets or sets Count value
+ }
+ ], # Required. Gets or sets the list of time series data for the metric (one per unique dimension combination)
+ }, # Required.
+ }, # Required.
+}
+
+
+Response Body:
+
+Schema for AzureMetricsResult:
+{
+ statusCode: number, # Optional. Http status code response
+ apiFailureResponse: {
+ error: {
+ code: string, # Optional. Gets or sets the azure metrics error code
+ message: string, # Optional. Gets or sets the azure metrics error message
+ }, # Optional.
+ }, # Optional.
+}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/IngestionClientBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/IngestionClientBuilderExtensions.cs
deleted file mode 100644
index 652d6e4ae38d..000000000000
--- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/IngestionClientBuilderExtensions.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using Azure.Core.Extensions;
-using Azure.Monitor.Ingestion;
-
-namespace Microsoft.Extensions.Azure
-{
- /// Extension methods to add to client builder.
- public static partial class IngestionClientBuilderExtensions
- {
- /// Registers a instance.
- /// The builder to register with.
- /// The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
- public static IAzureClientBuilder AddLogsIngestionClient(this TBuilder builder, Uri endpoint)
- where TBuilder : IAzureClientFactoryBuilderWithCredential
- {
- return builder.RegisterClientFactory((options, cred) => new LogsIngestionClient(endpoint, cred, options));
- }
-
- /// Registers a instance.
- /// The builder to register with.
- /// The configuration values.
- public static IAzureClientBuilder AddLogsIngestionClient(this TBuilder builder, TConfiguration configuration)
- where TBuilder : IAzureClientFactoryBuilderWithConfiguration
- {
- return builder.RegisterClientFactory(configuration);
- }
- }
-}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClient.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClient.cs
deleted file mode 100644
index 8a1ec2a8fd60..000000000000
--- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClient.cs
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using System.Threading.Tasks;
-using Azure;
-using Azure.Core;
-using Azure.Core.Pipeline;
-
-namespace Azure.Monitor.Ingestion
-{
- // Data plane generated client.
- /// The LogsIngestion service client.
- public partial class LogsIngestionClient
- {
- private static readonly string[] AuthorizationScopes = new string[] { "https://monitor.azure.com//.default" };
- private readonly TokenCredential _tokenCredential;
- private readonly HttpPipeline _pipeline;
- private readonly Uri _endpoint;
- private readonly string _apiVersion;
-
- /// The ClientDiagnostics is used to provide tracing support for the client library.
- internal ClientDiagnostics ClientDiagnostics { get; }
-
- /// The HTTP pipeline for sending and receiving REST requests and responses.
- public virtual HttpPipeline Pipeline => _pipeline;
-
- /// Initializes a new instance of LogsIngestionClient.
- /// The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
- /// A credential used to authenticate to an Azure Service.
- /// or is null.
- public LogsIngestionClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new LogsIngestionClientOptions())
- {
- }
-
- /// Initializes a new instance of LogsIngestionClient.
- /// The Data Collection Endpoint for the Data Collection Rule, for example https://dce-name.eastus-2.ingest.monitor.azure.com.
- /// A credential used to authenticate to an Azure Service.
- /// The options for configuring the client.
- /// or is null.
- public LogsIngestionClient(Uri endpoint, TokenCredential credential, LogsIngestionClientOptions options)
- {
- Argument.AssertNotNull(endpoint, nameof(endpoint));
- Argument.AssertNotNull(credential, nameof(credential));
- options ??= new LogsIngestionClientOptions();
-
- ClientDiagnostics = new ClientDiagnostics(options, true);
- _tokenCredential = credential;
- _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier());
- _endpoint = endpoint;
- _apiVersion = options.Version;
- }
-
- /// Ingestion API used to directly ingest data using Data Collection Rules.
- /// The immutable Id of the Data Collection Rule resource.
- /// The streamDeclaration name as defined in the Data Collection Rule.
- /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
- /// If content is already gzipped, put "gzip". Default behavior is to gzip all input.
- /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// , or is null.
- /// or is an empty string, and was expected to be non-empty.
- /// Service returned a non-success status code.
- /// The response returned from the service.
- ///
- public virtual async Task UploadAsync(string ruleId, string streamName, RequestContent content, string contentEncoding = null, RequestContext context = null)
- {
- Argument.AssertNotNullOrEmpty(ruleId, nameof(ruleId));
- Argument.AssertNotNullOrEmpty(streamName, nameof(streamName));
- Argument.AssertNotNull(content, nameof(content));
-
- using var scope = ClientDiagnostics.CreateScope("LogsIngestionClient.Upload");
- scope.Start();
- try
- {
- using HttpMessage message = CreateUploadRequest(ruleId, streamName, content, contentEncoding, context);
- return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- /// Ingestion API used to directly ingest data using Data Collection Rules.
- /// The immutable Id of the Data Collection Rule resource.
- /// The streamDeclaration name as defined in the Data Collection Rule.
- /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
- /// If content is already gzipped, put "gzip". Default behavior is to gzip all input.
- /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// , or is null.
- /// or is an empty string, and was expected to be non-empty.
- /// Service returned a non-success status code.
- /// The response returned from the service.
- ///
- public virtual Response Upload(string ruleId, string streamName, RequestContent content, string contentEncoding = null, RequestContext context = null)
- {
- Argument.AssertNotNullOrEmpty(ruleId, nameof(ruleId));
- Argument.AssertNotNullOrEmpty(streamName, nameof(streamName));
- Argument.AssertNotNull(content, nameof(content));
-
- using var scope = ClientDiagnostics.CreateScope("LogsIngestionClient.Upload");
- scope.Start();
- try
- {
- using HttpMessage message = CreateUploadRequest(ruleId, streamName, content, contentEncoding, context);
- return _pipeline.ProcessMessage(message, context);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- private static ResponseClassifier _responseClassifier204;
- private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 });
- }
-}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClientOptions.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClientOptions.cs
deleted file mode 100644
index c15b2eec08de..000000000000
--- a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/LogsIngestionClientOptions.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System;
-using Azure.Core;
-
-namespace Azure.Monitor.Ingestion
-{
- /// Client options for LogsIngestionClient.
- public partial class LogsIngestionClientOptions : ClientOptions
- {
- private const ServiceVersion LatestVersion = ServiceVersion.V2023_01_01;
-
- /// The version of the service to use.
- public enum ServiceVersion
- {
- /// Service version "2023-01-01".
- V2023_01_01 = 1,
- }
-
- internal string Version { get; }
-
- /// Initializes new instance of LogsIngestionClientOptions.
- public LogsIngestionClientOptions(ServiceVersion version = LatestVersion)
- {
- Version = version switch
- {
- ServiceVersion.V2023_01_01 => "2023-01-01",
- _ => throw new NotSupportedException()
- };
- }
- }
-}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClient.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClient.cs
new file mode 100644
index 000000000000..d9fe5a8a027f
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClient.cs
@@ -0,0 +1,313 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.Monitor.Ingestion
+{
+ // Data plane generated client.
+ /// The Metrics service client.
+ public partial class MetricsClient
+ {
+ private static readonly string[] AuthorizationScopes = new string[] { "https://monitor.azure.com//.default" };
+ private readonly TokenCredential _tokenCredential;
+ private readonly HttpPipeline _pipeline;
+ private readonly Uri _endpoint;
+
+ /// The ClientDiagnostics is used to provide tracing support for the client library.
+ internal ClientDiagnostics ClientDiagnostics { get; }
+
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ public virtual HttpPipeline Pipeline => _pipeline;
+
+ /// Initializes a new instance of MetricsClient for mocking.
+ protected MetricsClient()
+ {
+ }
+
+ /// Initializes a new instance of MetricsClient.
+ /// A credential used to authenticate to an Azure Service.
+ /// is null.
+ public MetricsClient(TokenCredential credential) : this(credential, new Uri("https://monitoring.azure.com"), new MetricsClientOptions())
+ {
+ }
+
+ /// Initializes a new instance of MetricsClient.
+ /// A credential used to authenticate to an Azure Service.
+ /// server parameter.
+ /// The options for configuring the client.
+ /// or is null.
+ public MetricsClient(TokenCredential credential, Uri endpoint, MetricsClientOptions options)
+ {
+ Argument.AssertNotNull(credential, nameof(credential));
+ Argument.AssertNotNull(endpoint, nameof(endpoint));
+ options ??= new MetricsClientOptions();
+
+ ClientDiagnostics = new ClientDiagnostics(options, true);
+ _tokenCredential = credential;
+ _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier());
+ _endpoint = endpoint;
+ }
+
+ /// Lists the metric values for multiple resources.
+ /// The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. The region should match the region of the requested resources.
+ /// The subscription identifier for the resources in this batch.
+ /// Metric namespace that contains the requested metric names.
+ /// The names of the metrics (comma separated) to retrieve.
+ /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
+ /// The timespan of the query. It is a string in the following format 'startDateTime_ISO/endDateTime_ISO'.
+ /// The interval (i.e. timegrain) of the query.
+ /// 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.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , , , or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service. Details of the response body schema are in the Remarks section below.
+ ///
+ public virtual async Task BatchAsync(string baseUrl, string subscriptionId, string metricnamespace, IEnumerable metricnames, RequestContent content, string timespan = null, TimeSpan? interval = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, RequestContext context = null)
+ {
+ Argument.AssertNotNull(baseUrl, nameof(baseUrl));
+ Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
+ Argument.AssertNotNull(metricnamespace, nameof(metricnamespace));
+ Argument.AssertNotNull(metricnames, nameof(metricnames));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("MetricsClient.Batch");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateBatchRequest(baseUrl, subscriptionId, metricnamespace, metricnames, content, timespan, interval, aggregation, top, orderby, filter, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Lists the metric values for multiple resources.
+ /// The regional endpoint to use, for example https://eastus.metrics.monitor.azure.com. The region should match the region of the requested resources.
+ /// The subscription identifier for the resources in this batch.
+ /// Metric namespace that contains the requested metric names.
+ /// The names of the metrics (comma separated) to retrieve.
+ /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
+ /// The timespan of the query. It is a string in the following format 'startDateTime_ISO/endDateTime_ISO'.
+ /// The interval (i.e. timegrain) of the query.
+ /// 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.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all time series of C where A = a1 and B = b1 or b2<br>**filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical or operator cannot separate two different metadata names.<br>- Return all time series where A = a1, B = b1 and C = c1:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return all time series where A = a1<br>**filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , , , or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service. Details of the response body schema are in the Remarks section below.
+ ///
+ public virtual Response Batch(string baseUrl, string subscriptionId, string metricnamespace, IEnumerable metricnames, RequestContent content, string timespan = null, TimeSpan? interval = null, string aggregation = null, int? top = null, string orderby = null, string filter = null, RequestContext context = null)
+ {
+ Argument.AssertNotNull(baseUrl, nameof(baseUrl));
+ Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
+ Argument.AssertNotNull(metricnamespace, nameof(metricnamespace));
+ Argument.AssertNotNull(metricnames, nameof(metricnames));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("MetricsClient.Batch");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateBatchRequest(baseUrl, subscriptionId, metricnamespace, metricnames, content, timespan, interval, aggregation, top, orderby, filter, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// **Post the metric values for a resource**.
+ /// The azure subscription id.
+ /// The ARM resource group name.
+ /// The ARM resource provider name.
+ /// The ARM resource type name.
+ /// The ARM resource name.
+ /// Supports application/json and application/x-ndjson.
+ /// Content length of the payload.
+ /// Authorization token issue for issued for audience "https:\\monitoring.azure.com\".
+ /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , , , , , , or is null.
+ /// , , , or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service. Details of the response body schema are in the Remarks section below.
+ ///
+ public virtual async Task CreateAsync(string subscriptionId, string resourceGroupName, string resourceProvider, string resourceTypeName, string resourceName, string contentType, int contentLength, string authorization, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
+ Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
+ Argument.AssertNotNullOrEmpty(resourceProvider, nameof(resourceProvider));
+ Argument.AssertNotNullOrEmpty(resourceTypeName, nameof(resourceTypeName));
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+ Argument.AssertNotNull(contentType, nameof(contentType));
+ Argument.AssertNotNull(authorization, nameof(authorization));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("MetricsClient.Create");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateRequest(subscriptionId, resourceGroupName, resourceProvider, resourceTypeName, resourceName, contentType, contentLength, authorization, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// **Post the metric values for a resource**.
+ /// The azure subscription id.
+ /// The ARM resource group name.
+ /// The ARM resource provider name.
+ /// The ARM resource type name.
+ /// The ARM resource name.
+ /// Supports application/json and application/x-ndjson.
+ /// Content length of the payload.
+ /// Authorization token issue for issued for audience "https:\\monitoring.azure.com\".
+ /// The content to send as the body of the request. Details of the request body schema are in the Remarks section below.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , , , , , , or is null.
+ /// , , , or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service. Details of the response body schema are in the Remarks section below.
+ ///
+ public virtual Response Create(string subscriptionId, string resourceGroupName, string resourceProvider, string resourceTypeName, string resourceName, string contentType, int contentLength, string authorization, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
+ Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
+ Argument.AssertNotNullOrEmpty(resourceProvider, nameof(resourceProvider));
+ Argument.AssertNotNullOrEmpty(resourceTypeName, nameof(resourceTypeName));
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+ Argument.AssertNotNull(contentType, nameof(contentType));
+ Argument.AssertNotNull(authorization, nameof(authorization));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("MetricsClient.Create");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateRequest(subscriptionId, resourceGroupName, resourceProvider, resourceTypeName, resourceName, contentType, contentLength, authorization, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ internal HttpMessage CreateBatchRequest(string baseUrl, string subscriptionId, string metricnamespace, IEnumerable metricnames, RequestContent content, string timespan, TimeSpan? interval, string aggregation, int? top, string orderby, string filter, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.AppendRaw(baseUrl, false);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/metrics:getBatch", false);
+ uri.AppendQuery("metricnamespace", metricnamespace, true);
+ uri.AppendQueryDelimited("metricnames", metricnames, ",", true);
+ if (timespan != null)
+ {
+ uri.AppendQuery("timespan", timespan, true);
+ }
+ if (interval != null)
+ {
+ uri.AppendQuery("interval", interval.Value, "P", 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);
+ }
+ uri.AppendQuery("api-version", "2023-03-01-preview", true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string resourceProvider, string resourceTypeName, string resourceName, string contentType, int contentLength, string authorization, RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourcegroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/", false);
+ uri.AppendPath(resourceProvider, true);
+ uri.AppendPath("/", false);
+ uri.AppendPath(resourceTypeName, true);
+ uri.AppendPath("/", false);
+ uri.AppendPath(resourceName, true);
+ uri.AppendPath("/metrics", false);
+ request.Uri = uri;
+ request.Headers.Add("Authorization", authorization);
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", contentType);
+ request.Headers.Add("Content-Length", contentLength);
+ request.Content = content;
+ return message;
+ }
+
+ private static ResponseClassifier _responseClassifier200;
+ private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 });
+ }
+}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClientOptions.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClientOptions.cs
new file mode 100644
index 000000000000..1dc6d1f37c19
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MetricsClientOptions.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+
+namespace Azure.Monitor.Ingestion
+{
+ /// Client options for MetricsClient.
+ public partial class MetricsClientOptions : ClientOptions
+ {
+ private const ServiceVersion LatestVersion = ServiceVersion.V2023_03_01_Preview;
+
+ /// The version of the service to use.
+ public enum ServiceVersion
+ {
+ /// Service version "2018-09-01-preview".
+ V2018_09_01_Preview = 1,
+ /// Service version "2023-03-01-preview".
+ V2023_03_01_Preview = 2,
+ }
+
+ internal string Version { get; }
+
+ /// Initializes new instance of MetricsClientOptions.
+ public MetricsClientOptions(ServiceVersion version = LatestVersion)
+ {
+ Version = version switch
+ {
+ ServiceVersion.V2018_09_01_Preview => "2018-09-01-preview",
+ ServiceVersion.V2023_03_01_Preview => "2023-03-01-preview",
+ _ => throw new NotSupportedException()
+ };
+ }
+ }
+}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MonitorClientBuilderExtensions.cs b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MonitorClientBuilderExtensions.cs
new file mode 100644
index 000000000000..869ba4a7016f
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.Ingestion/src/Generated/MonitorClientBuilderExtensions.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core.Extensions;
+using Azure.Monitor.Ingestion;
+
+namespace Microsoft.Extensions.Azure
+{
+ /// Extension methods to add to client builder.
+ public static partial class MonitorClientBuilderExtensions
+ {
+ /// Registers a instance.
+ /// The builder to register with.
+ /// server parameter.
+ public static IAzureClientBuilder AddMetricsClient(this TBuilder builder, Uri endpoint)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new MetricsClient(cred, endpoint, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddMetricsClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ }
+}
diff --git a/sdk/monitor/Azure.Monitor.Ingestion/src/autorest.md b/sdk/monitor/Azure.Monitor.Ingestion/src/autorest.md
index 5ed752539b56..b451366018d2 100644
--- a/sdk/monitor/Azure.Monitor.Ingestion/src/autorest.md
+++ b/sdk/monitor/Azure.Monitor.Ingestion/src/autorest.md
@@ -6,8 +6,8 @@ Run `dotnet build /t:GenerateCode` to generate code.
> see https://aka.ms/autorest
``` yaml
-input-file:
-- https://github.com/Azure/azure-rest-api-specs/blob/f07297ce913bfc911470a86436e73c9aceec0587/specification/monitor/data-plane/ingestion/stable/2023-01-01/DataCollectionRules.json
+require:
+- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/monitor/data-plane/readme.md
security: AADToken
security-scopes: https://monitor.azure.com//.default
```
@@ -33,3 +33,4 @@ directive:
where: $.paths["/dataCollectionRules/{ruleId}/streams/{stream}"].post.parameters[3]
transform: $["description"] = "If content is already gzipped, put \"gzip\". Default behavior is to gzip all input";
```
+