Billing class
You can use the Billing API to programatically list the billing views available to you for a given time period. A billing view represents a set of billing data.
The Billing API provides the following endpoint:
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateSourceViews(
{required String arn, required List< String> sourceViews}) → Future<AssociateSourceViewsResponse> - Associates one or more source billing views with an existing billing view. This allows creating aggregate billing views that combine data from multiple sources.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createBillingView(
{required String name, required List< String> sourceViews, String? clientToken, Expression? dataFilterExpression, String? description, List<ResourceTag> ? resourceTags}) → Future<CreateBillingViewResponse> - Creates a billing view with the specified billing view attributes.
-
deleteBillingView(
{required String arn, bool? force}) → Future< DeleteBillingViewResponse> - Deletes the specified billing view.
-
disassociateSourceViews(
{required String arn, required List< String> sourceViews}) → Future<DisassociateSourceViewsResponse> - Removes the association between one or more source billing views and an existing billing view. This allows modifying the composition of aggregate billing views.
-
getBillingPreferences(
{required List< BillingFeature> features, List<BillingFeatureFilter> ? filters, int? maxResults, String? nextToken}) → Future<GetBillingPreferencesResponse> - Retrieves billing preferences for the specified feature. Each feature controls a distinct billing capability: which accounts can share Reserved Instances or credits, whether billing alerts are enabled, the historical record of sharing changes, and per-credit options.
-
getBillingView(
{required String arn}) → Future< GetBillingViewResponse> - Returns the metadata associated to the specified billing view ARN.
-
getCreditAllocationHistory(
{required String accountId, required DateTime endDate, required DateTime startDate, int? creditId, int? maxResults, String? nextToken}) → Future< GetCreditAllocationHistoryResponse> - Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills. Traverses the consolidated billing family to capture cross-account credit applications. Supports pagination and optional filtering to a single credit.
-
getCredits(
{required String accountId, required DateTime startDate, DateTime? endDate, bool? payerAccountFlag}) → Future< GetCreditsResponse> - Returns the list of Amazon Web Services account credits for the specified account. Each credit includes its identifier, type, monetary amounts, applicable products, expiration, sharing configuration, and current enabled status.
-
getEnterpriseSupportChargeSummary(
{required String billingMonth}) → Future< GetEnterpriseSupportChargeSummaryResponse> - Returns a summary of Enterprise Support data aggregated across all accounts in the Enterprise Support profile.
-
getEnterpriseSupportContractDetails(
{required String billingMonth}) → Future< GetEnterpriseSupportContractDetailsResponse> - Returns Enterprise Support contract details.
-
getResourcePolicy(
{required String resourceArn}) → Future< GetResourcePolicyResponse> -
Returns the resource-based policy document attached to the resource in
JSONformat. -
listBillingViews(
{ActiveTimeRange? activeTimeRange, List< String> ? arns, List<BillingViewType> ? billingViewTypes, int? maxResults, List<StringSearch> ? names, String? nextToken, String? ownerAccountId, String? sourceAccountId}) → Future<ListBillingViewsResponse> - Lists the billing views available for a given time period.
-
listEnterpriseSupportLinkedAccountCharges(
{required String billingMonth, String? accountId, int? maxResults, String? nextToken}) → Future< ListEnterpriseSupportLinkedAccountChargesResponse> - Returns Support-eligible spend broken down at linked account level.
-
listSourceViewsForBillingView(
{required String arn, int? maxResults, String? nextToken}) → Future< ListSourceViewsForBillingViewResponse> - Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceResponse> - Lists tags associated with the billing view resource.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redeemCredits(
{required String promoCode}) → Future< void> - Redeems an Amazon Web Services promotional credit code on behalf of the calling account. On success, a new credit is added to the account's credit ledger with the amount, validity period, and applicable products defined by the promotion. The credit is then automatically applied to subsequent bills according to the standard credit application order.
-
tagResource(
{required String resourceArn, required List< ResourceTag> resourceTags}) → Future<void> - An API operation for adding one or more tags (key-value pairs) to a resource.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> resourceTagKeys}) → Future<void> - Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
-
updateBillingPreferences(
{required List< BillingPreferenceForKey> billingPreferencesPerKey, required BillingFeature feature}) → Future<void> - Updates billing preferences for the specified feature. Each feature targets a distinct billing capability and has its own set of supported keys. The action sets the value for each provided key; keys not present in the request are unchanged.
-
updateBillingView(
{required String arn, Expression? dataFilterExpression, String? description, String? name}) → Future< UpdateBillingViewResponse> - An API to update the attributes of the billing view.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited