LoadTestRunClient.GetMetricDimensionValues Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetMetricDimensionValues(String, String, String, String, String, Nullable<TimeGrain>, CancellationToken) |
List the dimension values for the given metric dimension name. |
GetMetricDimensionValues(String, String, String, String, String, String, RequestContext) |
[Protocol Method] List the dimension values for the given metric dimension name.
|
GetMetricDimensionValues(String, String, String, String, String, Nullable<TimeGrain>, CancellationToken)
- Source:
- LoadTestRunClient.cs
List the dimension values for the given metric dimension name.
public virtual Azure.Pageable<string> GetMetricDimensionValues(string testRunId, string name, string metricname, string metricNamespace, string timespan, Azure.Developer.LoadTesting.TimeGrain? interval = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMetricDimensionValues : string * string * string * string * string * Nullable<Azure.Developer.LoadTesting.TimeGrain> * System.Threading.CancellationToken -> Azure.Pageable<string>
override this.GetMetricDimensionValues : string * string * string * string * string * Nullable<Azure.Developer.LoadTesting.TimeGrain> * System.Threading.CancellationToken -> Azure.Pageable<string>
Public Overridable Function GetMetricDimensionValues (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 Pageable(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'.
- 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
GetMetricDimensionValues(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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetMetricDimensionValues(String, String, String, String, String, Nullable<TimeGrain>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> GetMetricDimensionValues(string testRunId, string name, string metricName, string metricNamespace, string timeInterval, string interval = default, Azure.RequestContext context = default);
public virtual Azure.Pageable<BinaryData> GetMetricDimensionValues(string testRunId, string name, string metricname, string metricNamespace, string timespan, string interval, Azure.RequestContext context);
abstract member GetMetricDimensionValues : string * string * string * string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetMetricDimensionValues : string * string * string * string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
abstract member GetMetricDimensionValues : string * string * string * string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetMetricDimensionValues : string * string * string * string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetMetricDimensionValues (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 Pageable(Of BinaryData)
Public Overridable Function GetMetricDimensionValues (testRunId As String, name As String, metricname As String, metricNamespace As String, timespan As String, interval As String, context As RequestContext) As Pageable(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 Pageable<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 GetMetricDimensionValues and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
foreach (BinaryData item in client.GetMetricDimensionValues("<testRunId>", "<name>", "<metricName>", "<metricNamespace>", "<timeInterval>"))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
This sample shows how to call GetMetricDimensionValues with all parameters and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
LoadTestRunClient client = new LoadTestRunClient(endpoint, credential);
foreach (BinaryData item in client.GetMetricDimensionValues("<testRunId>", "<name>", "<metricName>", "<metricNamespace>", "<timeInterval>", interval: "PT5S"))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}