Exemple #1
0
 /// <summary>
 /// Lists the usage details for the defined scope. Usage details are available
 /// via this API only for May 1, 2014 or later.
 /// <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='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <UsageDetail> > ListNextAsync(this IUsageDetailsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0
 /// <summary>
 /// Download usage details data.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope associated with usage details operations. This includes
 /// '/subscriptions/{subscriptionId}/' for subscription scope,
 /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for
 /// resourceGroup scope,
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
 /// Billing Account scope,
 /// '/providers/Microsoft.Billing/departments/{departmentId}' for Department
 /// scope,
 /// '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for
 /// EnrollmentAccount scope and
 /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
 /// Management Group scope. For subscription, billing account, department,
 /// enrollment account and management group, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='metric'>
 /// Allows to select different type of cost/usage records. Possible values
 /// include: 'ActualCostMetricType', 'AmortizedCostMetricType',
 /// 'UsageMetricType'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UsageDetailsDownloadResponse> BeginDownloadAsync(this IUsageDetailsOperations operations, string scope, string metric = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDownloadWithHttpMessagesAsync(scope, metric, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #3
0
 /// <summary>
 /// Lists the usage details for the defined scope. Usage details are available
 /// via this API only for May 1, 2014 or later.
 /// <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
 /// '/subscriptions/{subscriptionId}/' for subscription scope,
 /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for
 /// resourceGroup scope,
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
 /// Billing Account scope,
 /// '/providers/Microsoft.Billing/departments/{departmentId}' for Department
 /// scope,
 /// '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for
 /// EnrollmentAccount scope and
 /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
 /// Management Group scope. For subscription, billing account, department,
 /// enrollment account and management group, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the properties/additionalInfo or
 /// properties/meterDetails within a list of usage details. By default, these
 /// fields are not included when listing usage details.
 /// </param>
 /// <param name='filter'>
 /// May be used to filter usageDetails by properties/resourceGroup,
 /// properties/resourceName, properties/resourceId, properties/chargeType,
 /// properties/reservationId or tags. 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='skiptoken'>
 /// Skiptoken is only used if a previous operation returned a partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a skiptoken parameter that specifies a
 /// starting point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N
 /// usageDetails.
 /// </param>
 /// <param name='metric'>
 /// Allows to select different type of cost/usage records. Possible values
 /// include: 'ActualCostMetricType', 'AmortizedCostMetricType',
 /// 'UsageMetricType'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <UsageDetail> > ListAsync(this IUsageDetailsOperations operations, string scope, string expand = default(string), string filter = default(string), string skiptoken = default(string), int?top = default(int?), string metric = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(scope, expand, filter, skiptoken, top, metric, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #4
0
 /// <summary>
 /// Lists the usage details for the defined scope. Usage details are available
 /// via this API only for May 1, 2014 or later.
 /// <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
 /// '/subscriptions/{subscriptionId}/' for subscription scope,
 /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for
 /// resourceGroup scope,
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
 /// Billing Account scope,
 /// '/providers/Microsoft.Billing/departments/{departmentId}' for Department
 /// scope,
 /// '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for
 /// EnrollmentAccount scope and
 /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
 /// Management Group scope. For subscription, billing account, department,
 /// enrollment account and management group, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the properties/additionalInfo or
 /// properties/meterDetails within a list of usage details. By default, these
 /// fields are not included when listing usage details.
 /// </param>
 /// <param name='filter'>
 /// May be used to filter usageDetails by properties/resourceGroup,
 /// properties/resourceName, properties/resourceId, properties/chargeType,
 /// properties/reservationId or tags. 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='skiptoken'>
 /// Skiptoken is only used if a previous operation returned a partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a skiptoken parameter that specifies a
 /// starting point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N
 /// usageDetails.
 /// </param>
 /// <param name='metric'>
 /// Allows to select different type of cost/usage records. Possible values
 /// include: 'ActualCostMetricType', 'AmortizedCostMetricType',
 /// 'UsageMetricType'
 /// </param>
 public static IPage <UsageDetail> List(this IUsageDetailsOperations operations, string scope, string expand = default(string), string filter = default(string), string skiptoken = default(string), int?top = default(int?), string metric = default(string))
 {
     return(operations.ListAsync(scope, expand, filter, skiptoken, top, metric).GetAwaiter().GetResult());
 }
Exemple #5
0
 /// <summary>
 /// Lists the usage details for the defined scope. Usage details are available
 /// via this API only for May 1, 2014 or later.
 /// <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='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <UsageDetail> ListNext(this IUsageDetailsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemple #6
0
 /// <summary>
 /// Download usage details data.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='scope'>
 /// The scope associated with usage details operations. This includes
 /// '/subscriptions/{subscriptionId}/' for subscription scope,
 /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for
 /// resourceGroup scope,
 /// '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for
 /// Billing Account scope,
 /// '/providers/Microsoft.Billing/departments/{departmentId}' for Department
 /// scope,
 /// '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for
 /// EnrollmentAccount scope and
 /// '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for
 /// Management Group scope. For subscription, billing account, department,
 /// enrollment account and management group, 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/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'
 /// </param>
 /// <param name='metric'>
 /// Allows to select different type of cost/usage records. Possible values
 /// include: 'ActualCostMetricType', 'AmortizedCostMetricType',
 /// 'UsageMetricType'
 /// </param>
 public static UsageDetailsDownloadResponse BeginDownload(this IUsageDetailsOperations operations, string scope, string metric = default(string))
 {
     return(operations.BeginDownloadAsync(scope, metric).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists the usage details for a scope by billing period. Usage details are
 /// available via this API only for May 1, 2014 or later.
 /// <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='billingPeriodName'>
 /// Billing Period Name.
 /// </param>
 /// <param name='expand'>
 /// May be used to expand the properties/additionalProperties or
 /// properties/meterDetails within a list of usage details. By default, these
 /// fields are not included when listing usage details.
 /// </param>
 /// <param name='filter'>
 /// May be used to filter usageDetails by properties/usageEnd (Utc time),
 /// properties/usageStart (Utc time), properties/resourceGroup,
 /// properties/instanceName or properties/instanceId. The filter supports 'eq',
 /// 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne',
 /// 'or', or 'not'.
 /// </param>
 /// <param name='skiptoken'>
 /// Skiptoken is only used if a previous operation returned a partial result.
 /// If a previous response contains a nextLink element, the value of the
 /// nextLink element will include a skiptoken parameter that specifies a
 /// starting point to use for subsequent calls.
 /// </param>
 /// <param name='top'>
 /// May be used to limit the number of results to the most recent N
 /// usageDetails.
 /// </param>
 public static IPage <UsageDetail> ListByBillingPeriod(this IUsageDetailsOperations operations, string billingPeriodName, string expand = default(string), string filter = default(string), string skiptoken = default(string), int?top = default(int?))
 {
     return(operations.ListByBillingPeriodAsync(billingPeriodName, expand, filter, skiptoken, top).GetAwaiter().GetResult());
 }