-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
MetricsClientOptions.cs
55 lines (49 loc) · 1.87 KB
/
MetricsClientOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.Monitor.Query.Models;
namespace Azure.Monitor.Query
{
/// <summary>
/// Provides the client configuration options for connecting to Azure Monitor Metrics service.
/// </summary>
public class MetricsClientOptions: ClientOptions
{
private readonly ServiceVersion _version;
/// <summary>
/// The latest service version supported by this client library.
/// </summary>
internal const ServiceVersion LatestVersion = ServiceVersion.V2024_02_01;
/// <summary>
/// Initializes a new instance of the <see cref="MetricsClientOptions"/> class.
/// </summary>
/// <param name="version">
/// The <see cref="ServiceVersion"/> of the service API used when
/// making requests.
/// </param>
public MetricsClientOptions(ServiceVersion version = LatestVersion)
{
_version = version;
}
/// <summary>
/// The versions of Azure Monitor Metrics service supported by this client
/// library.
/// </summary>
public enum ServiceVersion
{
#pragma warning disable CA1707 // Identifiers should not contain underscores
/// <summary>
/// Version V2024_02_01 of the service.
/// </summary>
V2024_02_01 = 1,
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
/// <summary>
/// Gets or sets the audience to use for authentication with Microsoft Entra ID.
/// </summary>
/// <value>If <c>null</c>, <see cref="MetricsClientAudience.AzurePublicCloud" /> will be assumed.</value>
public MetricsClientAudience? Audience { get; set; }
}
}