Share via


LoadTestRunClient.GetMetricDimensionValuesAsync Method

Definition

Overloads

GetMetricDimensionValuesAsync(String, String, String, String, String, Nullable<TimeGrain>, CancellationToken)

List the dimension values for the given metric dimension name.

GetMetricDimensionValuesAsync(String, String, String, String, String, String, RequestContext)

[Protocol Method] List the dimension values for the given metric dimension name.

GetMetricDimensionValuesAsync(String, String, String, String, String, Nullable<TimeGrain>, CancellationToken)

Source:
LoadTestRunClient.cs

List the dimension values for the given metric dimension name.

public virtual Azure.AsyncPageable<string> GetMetricDimensionValuesAsync(string testRunId, string name, string metricname, string metricNamespace, string timespan, Azure.Developer.LoadTesting.TimeGrain? interval = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMetricDimensionValuesAsync : string * string * string * string * string * Nullable<Azure.Developer.LoadTesting.TimeGrain> * System.Threading.CancellationToken -> Azure.AsyncPageable<string>
override this.GetMetricDimensionValuesAsync : string * string * string * string * string * Nullable<Azure.Developer.LoadTesting.TimeGrain> * System.Threading.CancellationToken -> Azure.AsyncPageable<string>
Public Overridable Function GetMetricDimensionValuesAsync (testRunId As String, name As String, metricname As String, metricNamespace As String, timespan As String, Optional interval As Nullable(Of TimeGrain) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of String)

Parameters

testRunId
String

Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

name
String

Dimension name.

metricname
String

Metric name.

metricNamespace
String

Metric namespace to query metric definitions for.

timespan
String

The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

interval
Nullable<TimeGrain>

The interval (i.e. timegrain) of the query.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

testRunId, name, metricname, metricNamespace or timespan is null.

testRunId or name is an empty string, and was expected to be non-empty.

Applies to

GetMetricDimensionValuesAsync(String, String, String, String, String, String, RequestContext)

Source:
LoadTestRunClient.cs
Source:
LoadTestRunClient.cs

[Protocol Method] List the dimension values for the given metric dimension name.

public virtual Azure.AsyncPageable<BinaryData> GetMetricDimensionValuesAsync(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = default, Azure.RequestContext context = default);
public virtual Azure.AsyncPageable<BinaryData> GetMetricDimensionValuesAsync(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval, Azure.RequestContext context);
abstract member GetMetricDimensionValuesAsync : string * string * string * string * string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetMetricDimensionValuesAsync : string * string * string * string * string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
abstract member GetMetricDimensionValuesAsync : string * string * string * string * string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetMetricDimensionValuesAsync : string * string * string * string * string * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetMetricDimensionValuesAsync (testRunId As String, name As String, metricName As String, metricNamespace As String, timeInterval As String, Optional interval As String = Nothing, Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)
Public Overridable Function GetMetricDimensionValuesAsync (testRunId As String, name As String, metricname As String, metricNamespace As String, timespan As String, interval As String, context As RequestContext) As AsyncPageable(Of BinaryData)

Parameters

testRunId
String

Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.

name
String

Dimension name.

metricNamemetricname
String

Metric name.

metricNamespace
String

Metric namespace to query metric definitions for.

timeIntervaltimespan
String

The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

interval
String

The interval (i.e. timegrain) of the query. Allowed values: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H".

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

testRunId, name, metricname, metricNamespace or timespan is null.

testRunId or name is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetMetricDimensionValuesAsync and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);

await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("<testRunId>", "<name>", "<metricName>", "<metricNamespace>", "<timeInterval>"))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.ToString());
}

This sample shows how to call GetMetricDimensionValuesAsync with all parameters and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);

await foreach (BinaryData item in client.GetMetricDimensionValuesAsync("<testRunId>", "<name>", "<metricName>", "<metricNamespace>", "<timeInterval>", interval: "PT5S"))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.ToString());
}

Applies to