/// <summary> /// Gets a subscription usage metric. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='locationName'> /// The name of the region where the resource is located. /// </param> /// <param name='usageName'> /// Name of usage metric to return. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionUsage> GetAsync(this ISubscriptionUsagesOperations operations, string locationName, string usageName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(locationName, usageName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a subscription usage metric. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='locationName'> /// The name of the region where the resource is located. /// </param> /// <param name='usageName'> /// Name of usage metric to return. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionUsageInner> GetAsync(this ISubscriptionUsagesOperations operations, string locationName, string usageName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(locationName, usageName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }