Class: Aws::Billing::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Billing::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb
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.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
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_enterprise_support_charge_summary(params = {}) ⇒ Types::GetEnterpriseSupportChargeSummaryResponse
Returns a summary of Enterprise Support data aggregated across all accounts in the Enterprise Support profile.
-
#get_enterprise_support_contract_details(params = {}) ⇒ Types::GetEnterpriseSupportContractDetailsResponse
Returns Enterprise Support contract details.
-
#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_enterprise_support_linked_account_charges(params = {}) ⇒ Types::ListEnterpriseSupportLinkedAccountChargesResponse
Returns Support-eligible spend broken down at linked account level.
-
#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.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 478 def initialize(*args) super end |
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.
530 531 532 533 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 530 def associate_source_views(params = {}, = {}) req = build_request(:associate_source_views, params) req.send_request() end |
#create_billing_view(params = {}) ⇒ Types::CreateBillingViewResponse
Creates a billing view with the specified billing view attributes.
641 642 643 644 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 641 def create_billing_view(params = {}, = {}) req = build_request(:create_billing_view, params) req.send_request() end |
#delete_billing_view(params = {}) ⇒ Types::DeleteBillingViewResponse
Deletes the specified billing view.
688 689 690 691 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 688 def delete_billing_view(params = {}, = {}) req = build_request(:delete_billing_view, params) req.send_request() end |
#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.
739 740 741 742 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 739 def disassociate_source_views(params = {}, = {}) req = build_request(:disassociate_source_views, params) req.send_request() end |
#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.
803 804 805 806 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 803 def get_billing_preferences(params = {}, = {}) req = build_request(:get_billing_preferences, params) req.send_request() end |
#get_billing_view(params = {}) ⇒ Types::GetBillingViewResponse
Returns the metadata associated to the specified billing view ARN.
882 883 884 885 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 882 def get_billing_view(params = {}, = {}) req = build_request(:get_billing_view, params) req.send_request() end |
#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.
956 957 958 959 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 956 def get_credit_allocation_history(params = {}, = {}) req = build_request(:get_credit_allocation_history, params) req.send_request() end |
#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.
1036 1037 1038 1039 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1036 def get_credits(params = {}, = {}) req = build_request(:get_credits, params) req.send_request() end |
#get_enterprise_support_charge_summary(params = {}) ⇒ Types::GetEnterpriseSupportChargeSummaryResponse
Returns a summary of Enterprise Support data aggregated across all accounts in the Enterprise Support profile.
1110 1111 1112 1113 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1110 def get_enterprise_support_charge_summary(params = {}, = {}) req = build_request(:get_enterprise_support_charge_summary, params) req.send_request() end |
#get_enterprise_support_contract_details(params = {}) ⇒ Types::GetEnterpriseSupportContractDetailsResponse
Returns Enterprise Support contract details.
1188 1189 1190 1191 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1188 def get_enterprise_support_contract_details(params = {}, = {}) req = build_request(:get_enterprise_support_contract_details, params) req.send_request() end |
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Returns the resource-based policy document attached to the resource in
JSON format.
1233 1234 1235 1236 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1233 def get_resource_policy(params = {}, = {}) req = build_request(:get_resource_policy, params) req.send_request() end |
#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.
1355 1356 1357 1358 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1355 def list_billing_views(params = {}, = {}) req = build_request(:list_billing_views, params) req.send_request() end |
#list_enterprise_support_linked_account_charges(params = {}) ⇒ Types::ListEnterpriseSupportLinkedAccountChargesResponse
Returns Support-eligible spend broken down at linked account level.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1417 1418 1419 1420 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1417 def list_enterprise_support_linked_account_charges(params = {}, = {}) req = build_request(:list_enterprise_support_linked_account_charges, params) req.send_request() end |
#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.
1475 1476 1477 1478 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1475 def list_source_views_for_billing_view(params = {}, = {}) req = build_request(:list_source_views_for_billing_view, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists tags associated with the billing view resource.
1522 1523 1524 1525 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1522 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#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.
1549 1550 1551 1552 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1549 def redeem_credits(params = {}, = {}) req = build_request(:redeem_credits, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
An API operation for adding one or more tags (key-value pairs) to a resource.
1598 1599 1600 1601 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1598 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
1639 1640 1641 1642 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1639 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#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.
1686 1687 1688 1689 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1686 def update_billing_preferences(params = {}, = {}) req = build_request(:update_billing_preferences, params) req.send_request() end |
#update_billing_view(params = {}) ⇒ Types::UpdateBillingViewResponse
An API to update the attributes of the billing view.
1774 1775 1776 1777 |
# File 'gems/aws-sdk-billing/lib/aws-sdk-billing/client.rb', line 1774 def update_billing_view(params = {}, = {}) req = build_request(:update_billing_view, params) req.send_request() end |