Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SDKs/Consumption/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Billing_2018-11-01-preview;Consumption_2018-11-01-preview;</AzureApiTag>
<AzureApiTag>Billing_2019-04-01-preview;Capacity_2019-04-01-preview;Consumption_2019-04-01-preview;Management_2019-04-01-preview;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Consumption
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for AggregatedCostOperations.
/// </summary>
public static partial class AggregatedCostOperationsExtensions
{
/// <summary>
/// Provides the aggregate cost of a management group and all child management
/// groups by current billing period.
/// <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='managementGroupId'>
/// Azure Management Group ID.
/// </param>
/// <param name='filter'>
/// May be used to filter aggregated cost by properties/usageStart (Utc time),
/// properties/usageEnd (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 ManagementGroupAggregatedCostResult GetByManagementGroup(this IAggregatedCostOperations operations, string managementGroupId, string filter = default(string))
{
return operations.GetByManagementGroupAsync(managementGroupId, filter).GetAwaiter().GetResult();
}

/// <summary>
/// Provides the aggregate cost of a management group and all child management
/// groups by current billing period.
/// <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='managementGroupId'>
/// Azure Management Group ID.
/// </param>
/// <param name='filter'>
/// May be used to filter aggregated cost by properties/usageStart (Utc time),
/// properties/usageEnd (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<ManagementGroupAggregatedCostResult> GetByManagementGroupAsync(this IAggregatedCostOperations operations, string managementGroupId, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetByManagementGroupWithHttpMessagesAsync(managementGroupId, filter, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Provides the aggregate cost of a management group and all child management
/// groups by specified billing period
/// <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='managementGroupId'>
/// Azure Management Group ID.
/// </param>
/// <param name='billingPeriodName'>
/// Billing Period Name.
/// </param>
public static ManagementGroupAggregatedCostResult GetForBillingPeriodByManagementGroup(this IAggregatedCostOperations operations, string managementGroupId, string billingPeriodName)
{
return operations.GetForBillingPeriodByManagementGroupAsync(managementGroupId, billingPeriodName).GetAwaiter().GetResult();
}

/// <summary>
/// Provides the aggregate cost of a management group and all child management
/// groups by specified billing period
/// <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='managementGroupId'>
/// Azure Management Group ID.
/// </param>
/// <param name='billingPeriodName'>
/// Billing Period Name.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ManagementGroupAggregatedCostResult> GetForBillingPeriodByManagementGroupAsync(this IAggregatedCostOperations operations, string managementGroupId, string billingPeriodName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetForBillingPeriodByManagementGroupWithHttpMessagesAsync(managementGroupId, billingPeriodName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading