IMetricsOperations.ListWithHttpMessagesAsync 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.
Lists the metric values for a resource.
public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Monitor.Models.Response>> ListWithHttpMessagesAsync (string resourceUri, Microsoft.Rest.Azure.OData.ODataQuery<Microsoft.Azure.Management.Monitor.Models.MetadataValue> odataQuery = default, string timespan = default, TimeSpan? interval = default, string metricnames = default, string aggregation = default, int? top = default, string orderby = default, Microsoft.Azure.Management.Monitor.Models.ResultType? resultType = default, string metricnamespace = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ListWithHttpMessagesAsync : string * Microsoft.Rest.Azure.OData.ODataQuery<Microsoft.Azure.Management.Monitor.Models.MetadataValue> * string * Nullable<TimeSpan> * string * string * Nullable<int> * string * Nullable<Microsoft.Azure.Management.Monitor.Models.ResultType> * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Monitor.Models.Response>>
Public Function ListWithHttpMessagesAsync (resourceUri As String, Optional odataQuery As ODataQuery(Of MetadataValue) = Nothing, Optional timespan As String = Nothing, Optional interval As Nullable(Of TimeSpan) = Nothing, Optional metricnames As String = Nothing, Optional aggregation As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional orderby As String = Nothing, Optional resultType As Nullable(Of ResultType) = Nothing, Optional metricnamespace As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of Response))
Parameters
- resourceUri
- String
The identifier of the resource.
- odataQuery
- ODataQuery<MetadataValue>
OData parameters to apply to the operation.
- timespan
- String
The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.
- metricnames
- String
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'
- aggregation
- String
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.
- orderby
- String
The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
- resultType
- Nullable<ResultType>
Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
- metricnamespace
- String
Metric namespace to query metric definitions for.
- customHeaders
- Dictionary<String,List<String>>
The headers that will be added to request.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Exceptions
Thrown when the operation returned an invalid status code
Thrown when unable to deserialize the response
Thrown when a required parameter is null