You can use the Amazon Web Services Cost and Usage Report API to programmatically create, query, and delete Amazon Web Services Cost and Usage Report definitions.
Amazon Web Services Cost and Usage Report track the monthly Amazon Web Services costs and usage associated with your Amazon Web Services account. The report contains line items for each unique combination of Amazon Web Services product, usage type, and operation that your Amazon Web Services account uses. You can configure the Amazon Web Services Cost and Usage Report to show only the data that you want, using the Amazon Web Services Cost and Usage Report API.
Service Endpoint
The Amazon Web Services Cost and Usage Report API provides the following endpoint:
credentials: Optional 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.
endpoint: Optional shorthand for complete URL to use for the constructed client.
region: Optional shorthand for AWS Region used in instantiating the client.
Returns
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.
Lists the Amazon Web Services Cost and Usage Report available to this account
list_tags_for_resource
Lists the tags associated with the specified report definition
modify_report_definition
Allows you to programmatically update your report preferences
put_report_definition
Creates a new report using the description that you provide
tag_resource
Associates a set of tags with a report definition
untag_resource
Disassociates a set of tags from a report definition
Examples
## Not run:svc <- costandusagereportservice()# The following example deletes the AWS Cost and Usage report named# ExampleReport.svc$delete_report_definition( ReportName ="ExampleReport")## End(Not run)