Class: Aws::Billing::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Billing::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-billing/client.rb,
sig/client.rbs
Overview
An API client for Billing. To construct a client, you need to configure a :region and :credentials.
client = Aws::Billing::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _AssociateSourceViewsResponseSuccess, _CreateBillingViewResponseSuccess, _DeleteBillingViewResponseSuccess, _DisassociateSourceViewsResponseSuccess, _GetBillingPreferencesResponseSuccess, _GetBillingViewResponseSuccess, _GetCreditAllocationHistoryResponseSuccess, _GetCreditsResponseSuccess, _GetResourcePolicyResponseSuccess, _ListBillingViewsResponseSuccess, _ListSourceViewsForBillingViewResponseSuccess, _ListTagsForResourceResponseSuccess, _RedeemCreditsResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateBillingPreferencesResponseSuccess, _UpdateBillingViewResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_source_views(params = {}) ⇒ Types::AssociateSourceViewsResponse
Associates one or more source billing views with an existing billing view.
-
#create_billing_view(params = {}) ⇒ Types::CreateBillingViewResponse
Creates a billing view with the specified billing view attributes.
-
#delete_billing_view(params = {}) ⇒ Types::DeleteBillingViewResponse
Deletes the specified billing view.
-
#disassociate_source_views(params = {}) ⇒ Types::DisassociateSourceViewsResponse
Removes the association between one or more source billing views and an existing billing view.
-
#get_billing_preferences(params = {}) ⇒ Types::GetBillingPreferencesResponse
Retrieves billing preferences for the specified feature.
-
#get_billing_view(params = {}) ⇒ Types::GetBillingViewResponse
Returns the metadata associated to the specified billing view ARN.
-
#get_credit_allocation_history(params = {}) ⇒ Types::GetCreditAllocationHistoryResponse
Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills.
-
#get_credits(params = {}) ⇒ Types::GetCreditsResponse
Returns the list of Amazon Web Services account credits for the specified account.
-
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Returns the resource-based policy document attached to the resource in
JSONformat. -
#list_billing_views(params = {}) ⇒ Types::ListBillingViewsResponse
Lists the billing views available for a given time period.
-
#list_source_views_for_billing_view(params = {}) ⇒ Types::ListSourceViewsForBillingViewResponse
Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists tags associated with the billing view resource.
-
#redeem_credits(params = {}) ⇒ Struct
Redeems an Amazon Web Services promotional credit code on behalf of the calling account.
-
#tag_resource(params = {}) ⇒ Struct
An API operation for adding one or more tags (key-value pairs) to a resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a resource.
-
#update_billing_preferences(params = {}) ⇒ Struct
Updates billing preferences for the specified feature.
-
#update_billing_view(params = {}) ⇒ Types::UpdateBillingViewResponse
An API to update the attributes of the billing view.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'lib/aws-sdk-billing/client.rb', line 478 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1596 1597 1598 |
# File 'lib/aws-sdk-billing/client.rb', line 1596 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1599 1600 1601 |
# File 'lib/aws-sdk-billing/client.rb', line 1599 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#associate_source_views(params = {}) ⇒ Types::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.
87 |
# File 'sig/client.rbs', line 87
def associate_source_views: (
|
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'lib/aws-sdk-billing/client.rb', line 1569 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Billing') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-billing' context[:gem_version] = '1.28.0' Seahorse::Client::Request.new(handlers, context) end |
#create_billing_view(params = {}) ⇒ Types::CreateBillingViewResponse
Creates a billing view with the specified billing view attributes.
99 |
# File 'sig/client.rbs', line 99
def create_billing_view: (
|
#delete_billing_view(params = {}) ⇒ Types::DeleteBillingViewResponse
Deletes the specified billing view.
119 |
# File 'sig/client.rbs', line 119
def delete_billing_view: (
|
#disassociate_source_views(params = {}) ⇒ Types::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.
130 |
# File 'sig/client.rbs', line 130
def disassociate_source_views: (
|
#get_billing_preferences(params = {}) ⇒ Types::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.
142 |
# File 'sig/client.rbs', line 142
def get_billing_preferences: (
|
#get_billing_view(params = {}) ⇒ Types::GetBillingViewResponse
Returns the metadata associated to the specified billing view ARN.
160 |
# File 'sig/client.rbs', line 160
def get_billing_view: (
|
#get_credit_allocation_history(params = {}) ⇒ Types::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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
173 |
# File 'sig/client.rbs', line 173
def get_credit_allocation_history: (
|
#get_credits(params = {}) ⇒ Types::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.
When the caller is the management account of a consolidated billing
family and payerAccountFlag is true, the response aggregates
credits across the entire family. Otherwise, the response includes
only credits owned by the account specified in accountId.
188 |
# File 'sig/client.rbs', line 188
def get_credits: (
|
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Returns the resource-based policy document attached to the resource in
JSON format.
202 |
# File 'sig/client.rbs', line 202
def get_resource_policy: (
|
#list_billing_views(params = {}) ⇒ Types::ListBillingViewsResponse
Lists the billing views available for a given time period.
Every Amazon Web Services account has a unique PRIMARY billing view
that represents the billing data available by default. Accounts that
use Billing Conductor also have BILLING_GROUP billing views
representing pro forma costs associated with each created billing
group.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
213 |
# File 'sig/client.rbs', line 213
def list_billing_views: (
|
#list_source_views_for_billing_view(params = {}) ⇒ Types::ListSourceViewsForBillingViewResponse
Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
239 |
# File 'sig/client.rbs', line 239
def list_source_views_for_billing_view: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists tags associated with the billing view resource.
251 |
# File 'sig/client.rbs', line 251
def list_tags_for_resource: (
|
#redeem_credits(params = {}) ⇒ Struct
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.
260 |
# File 'sig/client.rbs', line 260
def redeem_credits: (
|
#tag_resource(params = {}) ⇒ Struct
An API operation for adding one or more tags (key-value pairs) to a resource.
269 |
# File 'sig/client.rbs', line 269
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
284 |
# File 'sig/client.rbs', line 284
def untag_resource: (
|
#update_billing_preferences(params = {}) ⇒ Struct
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.
Sharing keys (RI_SHARING, CREDIT_SHARING, CREDIT_LEVEL_SHARING,
and sharing keys under CREDIT_PREFERENCE_OPTIONS) may only be set by
the management account of a consolidated billing family. The
credit/{creditId}/status key may be set by member accounts for
credits they own, or by the management account for any credit in the
family.
294 |
# File 'sig/client.rbs', line 294
def update_billing_preferences: (
|
#update_billing_view(params = {}) ⇒ Types::UpdateBillingViewResponse
An API to update the attributes of the billing view.
311 |
# File 'sig/client.rbs', line 311
def update_billing_view: (
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1589 1590 1591 |
# File 'lib/aws-sdk-billing/client.rb', line 1589 def waiter_names [] end |