AWS.CUR — AWS SDK for JavaScript (original) (raw)
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Class: AWS.CUR
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
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:
- cur.us-east-1.amazonaws.com
Sending a Request Using CUR
var cur = new AWS.CUR();
cur.deleteReportDefinition(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the CUR object uses this specific API, you can construct the object by passing the apiVersion
option to the constructor:
var cur = new AWS.CUR({apiVersion: '2017-01-06'});
You can also set the API version globally in AWS.config.apiVersions
using the cur service identifier:
AWS.config.apiVersions = {
cur: '2017-01-06',
// other service API versions
};
var cur = new AWS.CUR();
Constructor Summarycollapse
- new AWS.CUR(options = {}) ⇒ Object constructor
Constructs a service object.
Property Summarycollapse
- endpoint ⇒ AWS.Endpoint readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summarycollapse
- deleteReportDefinition(params = {}, callback) ⇒ AWS.Request
Deletes the specified report. - describeReportDefinitions(params = {}, callback) ⇒ AWS.Request
Lists the Amazon Web Services Cost and Usage Report available to this account.
. - listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with the specified report definition.
. - modifyReportDefinition(params = {}, callback) ⇒ AWS.Request
Allows you to programmatically update your report preferences.
. - putReportDefinition(params = {}, callback) ⇒ AWS.Request
Creates a new report using the description that you provide.
. - tagResource(params = {}, callback) ⇒ AWS.Request
Associates a set of tags with a report definition.
. - untagResource(params = {}, callback) ⇒ AWS.Request
Disassociates a set of tags from a report definition.
.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.CUR(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
deleteReportDefinition(params = {}, callback) ⇒ AWS.Request
Deletes the specified report. Any tags associated with the report are also deleted.
describeReportDefinitions(params = {}, callback) ⇒ AWS.Request
Lists the Amazon Web Services Cost and Usage Report available to this account.
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with the specified report definition.
modifyReportDefinition(params = {}, callback) ⇒ AWS.Request
Allows you to programmatically update your report preferences.
putReportDefinition(params = {}, callback) ⇒ AWS.Request
Creates a new report using the description that you provide.
tagResource(params = {}, callback) ⇒ AWS.Request
Associates a set of tags with a report definition.
untagResource(params = {}, callback) ⇒ AWS.Request
Disassociates a set of tags from a report definition.