Esempio n. 1
0
 /// <summary>
 /// Lists the charges based for the defined scope.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope associated with usage details operations. This includes
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}'
 /// for Department scope and
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
 /// for EnrollmentAccount scope. For department and enrollment accounts, you
 /// can also add billing period to the scope using
 /// '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g.
 /// to specify billing period at department scope use
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='filter'>
 /// May be used to filter charges by properties/usageEnd (Utc time),
 /// properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt',
 /// 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
 /// Tag filter is a key value pair string where key and value is separated by a
 /// colon (:).
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ChargeSummary> ListByScopeAsync(this IChargesOperations operations, string scope, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByScopeWithHttpMessagesAsync(scope, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Lists the charges based for the defined scope.
 /// <see href="https://docs.microsoft.com/en-us/rest/api/consumption/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope associated with usage details operations. This includes
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}'
 /// for Department scope and
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}'
 /// for EnrollmentAccount scope. For department and enrollment accounts, you
 /// can also add billing period to the scope using
 /// '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g.
 /// to specify billing period at department scope use
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='filter'>
 /// May be used to filter charges by properties/usageEnd (Utc time),
 /// properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt',
 /// 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.
 /// Tag filter is a key value pair string where key and value is separated by a
 /// colon (:).
 /// </param>
 public static ChargeSummary ListByScope(this IChargesOperations operations, string scope, string filter = default(string))
 {
     return(operations.ListByScopeAsync(scope, filter).GetAwaiter().GetResult());
 }