AWS Billing¶
Description¶
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:
https://billing.us-east-1.api.aws
Usage¶
Arguments¶
-
configOptional configuration of credentials, endpoint, and/or region.
- credentials:
- creds:
- access_key_id: AWS access key ID
- secret_access_key: AWS secret access key
- session_token: AWS temporary session token
- profile: The name of a profile to use. If not given, then the default profile is used.
- anonymous: Set anonymous credentials.
- creds:
- endpoint: The complete URL to use for the constructed client.
- region: The AWS Region used in instantiating the client.
- close_connection: Immediately close all HTTP connections.
- timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
- s3_force_path_style: Set this to
trueto force the request to use path-style addressing, i.e.http://s3.amazonaws.com/BUCKET/KEY. - sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
- use_dual_stack: Set this to
trueto use the dualstack (IPv4 and IPv6) endpoint for a service, where available, falling back to the regular endpoint when it isn't. Defaults to theAWS_USE_DUALSTACK_ENDPOINTenvironment variable when unset.
- credentials:
-
credentialsOptional credentials shorthand for the config parameter
- creds:
- access_key_id: AWS access key ID
- secret_access_key: AWS secret access key
- session_token: AWS temporary session token
- profile: The name of a profile to use. If not given, then the default profile is used.
- anonymous: Set anonymous credentials.
- creds:
-
endpointOptional shorthand for complete URL to use for the constructed client.
-
regionOptional shorthand for AWS Region used in instantiating the client.
Value¶
A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.
Service syntax¶
svc <- billing(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical",
sts_regional_endpoint = "string",
use_dual_stack = "logical"
),
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string"
)
Operations¶
associate_source_views |
Associates one or more source billing views with an existing billing view |
|---|---|
create_billing_view |
Creates a billing view with the specified billing view attributes |
delete_billing_view |
Deletes the specified billing view |
disassociate_source_views |
Removes the association between one or more source billing views and an existing billing view |
get_billing_preferences |
Retrieves billing preferences for the specified feature |
get_billing_view |
Returns the metadata associated to the specified billing view ARN |
get_credit_allocation_history |
Returns the per-billing-month allocation history for credits applied to an Amazon Web Services account's bills |
get_credits |
Returns the list of Amazon Web Services account credits for the specified account |
get_enterprise_support_charge_summary |
Returns a summary of Enterprise Support data aggregated across all accounts in the Enterprise Support profile |
get_enterprise_support_contract_details |
Returns Enterprise Support contract details |
get_resource_policy |
Returns the resource-based policy document attached to the resource in JSON format |
list_billing_views |
Lists the billing views available for a given time period |
list_billing_view_segments |
Lists the segments of a billing view over a given time period |
list_business_support_account_charges |
Returns Business Support charges broken down at the linked account level for a given billing month |
list_business_support_subscription_history |
Returns the history of Business Support subscription contracts across accounts |
list_enterprise_support_linked_account_charges |
Returns Support-eligible spend broken down at linked account level |
list_source_views_for_billing_view |
Lists the source views (managed Amazon Web Services billing views) associated with the billing view |
list_tags_for_resource |
Lists tags associated with the billing view resource |
redeem_credits |
Redeems an Amazon Web Services promotional credit code on behalf of the calling account |
tag_resource |
An API operation for adding one or more tags (key-value pairs) to a resource |
untag_resource |
Removes one or more tags from a resource |
update_billing_preferences |
Updates billing preferences for the specified feature |
update_billing_view |
An API to update the attributes of the billing view |