Class: AWS.CostExplorer
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.CostExplorer
- Identifier:
- costexplorer
- API Version:
- 2017-10-25
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
You can use the Cost Explorer API to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data. This might include the number of daily write operations for Amazon DynamoDB database tables in your production environment.
Service Endpoint
The Cost Explorer API provides the following endpoint:
For information about the costs that are associated with the Cost Explorer API, see Amazon Web Services Cost Management Pricing.
Sending a Request Using CostExplorer
var costexplorer = new AWS.CostExplorer();
costexplorer.createAnomalyMonitor(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 CostExplorer object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var costexplorer = new AWS.CostExplorer({apiVersion: '2017-10-25'});
You can also set the API version globally in AWS.config.apiVersions using
the costexplorer service identifier:
AWS.config.apiVersions = {
costexplorer: '2017-10-25',
// other service API versions
};
var costexplorer = new AWS.CostExplorer();
Constructor Summary collapse
-
new AWS.CostExplorer(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
createAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Creates a new cost anomaly detection monitor with the requested type and monitor specification.
-
createAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Adds an alert subscription to a cost anomaly detection monitor.
-
createCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Creates a new Cost Category with the requested name and rules.
.
-
deleteAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Deletes a cost anomaly monitor.
-
deleteAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Deletes a cost anomaly subscription.
-
deleteCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Deletes a Cost Category.
-
describeCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.
You have the option to use
EffectiveOnto return a Cost Category that's active on a specific date. -
getAnomalies(params = {}, callback) ⇒ AWS.Request
Retrieves all of the cost anomalies detected on your account during the time period that's specified by the
DateIntervalobject. -
getAnomalyMonitors(params = {}, callback) ⇒ AWS.Request
Retrieves the cost anomaly monitor definitions for your account.
-
getAnomalySubscriptions(params = {}, callback) ⇒ AWS.Request
Retrieves the cost anomaly subscription objects for your account.
-
getApproximateUsageRecords(params = {}, callback) ⇒ AWS.Request
Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
.
-
getCostAndUsage(params = {}, callback) ⇒ AWS.Request
Retrieves cost and usage metrics for your account.
-
getCostAndUsageWithResources(params = {}, callback) ⇒ AWS.Request
Retrieves cost and usage metrics with resources for your account.
-
getCostCategories(params = {}, callback) ⇒ AWS.Request
Retrieves an array of Cost Category names and values incurred cost.
Note: If some Cost Category names and values are not associated with any cost, they will not be returned by this API.- getCostForecast(params = {}, callback) ⇒ AWS.Request
Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
- getDimensionValues(params = {}, callback) ⇒ AWS.Request
Retrieves all available filter values for a specified filter over a period of time.
- getReservationCoverage(params = {}, callback) ⇒ AWS.Request
Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation.
- getReservationPurchaseRecommendation(params = {}, callback) ⇒ AWS.Request
Gets recommendations for reservation purchases.
- getReservationUtilization(params = {}, callback) ⇒ AWS.Request
Retrieves the reservation utilization for your account.
- getRightsizingRecommendation(params = {}, callback) ⇒ AWS.Request
Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics.
- getSavingsPlanPurchaseRecommendationDetails(params = {}, callback) ⇒ AWS.Request
Retrieves the details for a Savings Plan recommendation.
- getSavingsPlansCoverage(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans covered for your account.
- getSavingsPlansPurchaseRecommendation(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans recommendations for your account.
- getSavingsPlansUtilization(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity.
- getSavingsPlansUtilizationDetails(params = {}, callback) ⇒ AWS.Request
Retrieves attribute data along with aggregate utilization and savings data for a given time period.
- getTags(params = {}, callback) ⇒ AWS.Request
Queries for available tag keys and tag values for a specified period.
- getUsageForecast(params = {}, callback) ⇒ AWS.Request
Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
- listCostAllocationTagBackfillHistory(params = {}, callback) ⇒ AWS.Request
Retrieves a list of your historical cost allocation tag backfill requests.
- listCostAllocationTags(params = {}, callback) ⇒ AWS.Request
Get a list of cost allocation tags.
- listCostCategoryDefinitions(params = {}, callback) ⇒ AWS.Request
Returns the name, Amazon Resource Name (ARN),
NumberOfRulesand effective dates of all Cost Categories defined in the account.- listSavingsPlansPurchaseRecommendationGeneration(params = {}, callback) ⇒ AWS.Request
Retrieves a list of your historical recommendation generations within the past 30 days.
.
- listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
- provideAnomalyFeedback(params = {}, callback) ⇒ AWS.Request
Modifies the feedback property of a given cost anomaly.
- startCostAllocationTagBackfill(params = {}, callback) ⇒ AWS.Request
Request a cost allocation tag backfill.
- startSavingsPlansPurchaseRecommendationGeneration(params = {}, callback) ⇒ AWS.Request
Requests a Savings Plans recommendation generation.
- tagResource(params = {}, callback) ⇒ AWS.Request
An API operation for adding one or more tags (key-value pairs) to a resource.
You can use the
TagResourceoperation with a resource that already has tags.- untagResource(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from a resource.
- updateAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Updates an existing cost anomaly monitor.
- updateAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Updates an existing cost anomaly subscription.
- updateCostAllocationTagsStatus(params = {}, callback) ⇒ AWS.Request
Updates status for cost allocation tags in bulk, with maximum batch size of 20.
- updateCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Updates an existing Cost Category.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.CostExplorer(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
- getCostForecast(params = {}, callback) ⇒ AWS.Request