/// <summary> /// Lists the metric definitions for the resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceUri'> /// The identifier of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <MetricDefinitionInner> > ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, ODataQuery <MetricDefinitionInner> odataQuery = default(ODataQuery <MetricDefinitionInner>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the metric definitions for the resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceUri'> /// The identifier of the resource. /// </param> /// <param name='metricnamespace'> /// Metric namespace to query metric definitions for. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<IEnumerable<MetricDefinition>> ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, string metricnamespace = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, metricnamespace, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// Lists the metric definitions for the resource. The **$filter** parameter is /// optional, and can be used to only retrieve certain metric definitions. For /// example, get just the definition for the CPU percentage counter: /// $filter=name.value eq '\Processor(_Total)\% Processor Time'. This $filter /// is very restricted and allows only these 'name eq <value>' clauses /// separated by or operators. No other syntax is allowed. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceUri'> /// The identifier of the resource. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <System.Collections.Generic.IEnumerable <MetricDefinition> > ListAsync(this IMetricDefinitionsOperations operations, string resourceUri, Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition> odataQuery = default(Microsoft.Rest.Azure.OData.ODataQuery <MetricDefinition>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }