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();
Version:
-
2017-10-25
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
EffectiveOn
to 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
DateInterval
object. -
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),
NumberOfRules
and 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
TagResource
operation 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.
Examples:
Constructing a CostExplorer object
var costexplorer = new AWS.CostExplorer({apiVersion: '2017-10-25'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String|AWS.Endpoint)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
or an Endpoint object. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.CostExplorer.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.CostExplorer.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.CostExplorer.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a
retry count and error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
-
useFipsEndpoint
(Boolean)
—
Enables FIPS compatible endpoints. Defaults to
false
. -
useDualstackEndpoint
(Boolean)
—
Enables IPv6 dualstack endpoint. Defaults to
false
.
Property Details
Method Details
createAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Creates a new cost anomaly detection monitor with the requested type and monitor specification.
Service Reference:
Examples:
Calling the createAnomalyMonitor operation
var params = { AnomalyMonitor: { /* required */ MonitorName: 'STRING_VALUE', /* required */ MonitorType: DIMENSIONAL | CUSTOM, /* required */ CreationDate: 'STRING_VALUE', DimensionalValueCount: 'NUMBER_VALUE', LastEvaluatedDate: 'STRING_VALUE', LastUpdatedDate: 'STRING_VALUE', MonitorArn: 'STRING_VALUE', MonitorDimension: SERVICE, MonitorSpecification: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } } }, ResourceTags: [ { Key: 'STRING_VALUE', /* required */ Value: 'STRING_VALUE' /* required */ }, /* more items */ ] }; costexplorer.createAnomalyMonitor(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
AnomalyMonitor
— (map
)The cost anomaly detection monitor object that you want to create.
MonitorArn
— (String
)The Amazon Resource Name (ARN) value.
MonitorName
— required — (String
)The name of the monitor.
CreationDate
— (String
)The date when the monitor was created.
LastUpdatedDate
— (String
)The date when the monitor was last updated.
LastEvaluatedDate
— (String
)The date when the monitor last evaluated for anomalies.
MonitorType
— required — (String
)The possible type values.
Possible values include:"DIMENSIONAL"
"CUSTOM"
MonitorDimension
— (String
)The dimensions to evaluate.
Possible values include:"SERVICE"
MonitorSpecification
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
DimensionalValueCount
— (Integer
)The value for evaluated dimensions.
ResourceTags
— (Array<map>
)An optional list of tags to associate with the specified
AnomalyMonitor
. You can use resource tags to control access to yourmonitor
using IAM policies.Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:
-
Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use
-
The maximum length of a key is 128 characters
-
The maximum length of a value is 256 characters
-
Keys and values can only contain alphanumeric characters, spaces, and any of the following:
_.:/=+@-
-
Keys and values are case sensitive
-
Keys and values are trimmed for any leading or trailing whitespaces
-
Don’t use
aws:
as a prefix for your keys. This prefix is reserved for Amazon Web Services use
Key
— required — (String
)The key that's associated with the tag.
Value
— required — (String
)The value that's associated with the tag.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:MonitorArn
— (String
)The unique identifier of your newly created cost anomaly detection monitor.
-
(AWS.Response)
—
Returns:
createAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time frequency for receiving notifications.
Service Reference:
Examples:
Calling the createAnomalySubscription operation
var params = { AnomalySubscription: { /* required */ Frequency: DAILY | IMMEDIATE | WEEKLY, /* required */ MonitorArnList: [ /* required */ 'STRING_VALUE', /* more items */ ], Subscribers: [ /* required */ { Address: 'STRING_VALUE', Status: CONFIRMED | DECLINED, Type: EMAIL | SNS }, /* more items */ ], SubscriptionName: 'STRING_VALUE', /* required */ AccountId: 'STRING_VALUE', SubscriptionArn: 'STRING_VALUE', Threshold: 'NUMBER_VALUE', ThresholdExpression: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } } }, ResourceTags: [ { Key: 'STRING_VALUE', /* required */ Value: 'STRING_VALUE' /* required */ }, /* more items */ ] }; costexplorer.createAnomalySubscription(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
AnomalySubscription
— (map
)The cost anomaly subscription object that you want to create.
SubscriptionArn
— (String
)The
AnomalySubscription
Amazon Resource Name (ARN).AccountId
— (String
)Your unique account identifier.
MonitorArnList
— required — (Array<String>
)A list of cost anomaly monitors.
Subscribers
— required — (Array<map>
)A list of subscribers to notify.
Address
— (String
)The email address or SNS Amazon Resource Name (ARN). This depends on the
Type
.Type
— (String
)The notification delivery channel.
Possible values include:"EMAIL"
"SNS"
Status
— (String
)Indicates if the subscriber accepts the notifications.
Possible values include:"CONFIRMED"
"DECLINED"
Threshold
— (Float
)(deprecated)
An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.
This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for this resource. You cannot specify both.
Frequency
— required — (String
)The frequency that anomaly notifications are sent. Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications.
Possible values include:"DAILY"
"IMMEDIATE"
"WEEKLY"
SubscriptionName
— required — (String
)The name for the subscription.
ThresholdExpression
— (map
)An Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.One of Threshold or ThresholdExpression is required for this resource. You cannot specify both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
ResourceTags
— (Array<map>
)An optional list of tags to associate with the specified
AnomalySubscription
. You can use resource tags to control access to yoursubscription
using IAM policies.Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:
-
Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use
-
The maximum length of a key is 128 characters
-
The maximum length of a value is 256 characters
-
Keys and values can only contain alphanumeric characters, spaces, and any of the following:
_.:/=+@-
-
Keys and values are case sensitive
-
Keys and values are trimmed for any leading or trailing whitespaces
-
Don’t use
aws:
as a prefix for your keys. This prefix is reserved for Amazon Web Services use
Key
— required — (String
)The key that's associated with the tag.
Value
— required — (String
)The value that's associated with the tag.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SubscriptionArn
— (String
)The unique identifier of your newly created cost anomaly subscription.
-
(AWS.Response)
—
Returns:
createCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Creates a new Cost Category with the requested name and rules.
Service Reference:
Examples:
Calling the createCostCategoryDefinition operation
var params = { Name: 'STRING_VALUE', /* required */ RuleVersion: CostCategoryExpression.v1, /* required */ Rules: [ /* required */ { InheritedValue: { DimensionKey: 'STRING_VALUE', DimensionName: LINKED_ACCOUNT_NAME | TAG }, Rule: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Type: REGULAR | INHERITED_VALUE, Value: 'STRING_VALUE' }, /* more items */ ], DefaultValue: 'STRING_VALUE', EffectiveStart: 'STRING_VALUE', ResourceTags: [ { Key: 'STRING_VALUE', /* required */ Value: 'STRING_VALUE' /* required */ }, /* more items */ ], SplitChargeRules: [ { Method: FIXED | PROPORTIONAL | EVEN, /* required */ Source: 'STRING_VALUE', /* required */ Targets: [ /* required */ 'STRING_VALUE', /* more items */ ], Parameters: [ { Type: ALLOCATION_PERCENTAGES, /* required */ Values: [ /* required */ 'STRING_VALUE', /* more items */ ] }, /* more items */ ] }, /* more items */ ] }; costexplorer.createCostCategoryDefinition(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The unique name of the Cost Category.
EffectiveStart
— (String
)The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future.
RuleVersion
— (String
)The rule schema version in this particular Cost Category.
Possible values include:"CostCategoryExpression.v1"
Rules
— (Array<map>
)The Cost Category rules used to categorize costs. For more information, see CostCategoryRule.
Value
— (String
)The default value for the cost category.
Rule
— (map
)An Expression object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently the only dimensions supported are
LINKED_ACCOUNT
,SERVICE_CODE
,RECORD_TYPE
,LINKED_ACCOUNT_NAME
,REGION
, andUSAGE_TYPE
.RECORD_TYPE
is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the Billing and Cost Management User Guide.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
InheritedValue
— (map
)The value the line item is categorized as if the line item contains the matched dimension.
DimensionName
— (String
)The name of the dimension that's used to group costs.
If you specify
Possible values include:LINKED_ACCOUNT_NAME
, the cost category value is based on account name. If you specifyTAG
, the cost category value is based on the value of the specified tag key."LINKED_ACCOUNT_NAME"
"TAG"
DimensionKey
— (String
)The key to extract cost category values.
Type
— (String
)You can define the
Possible values include:CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use."REGULAR"
"INHERITED_VALUE"
DefaultValue
— (String
)The default value for the cost category.
SplitChargeRules
— (Array<map>
)The split charge rules used to allocate your charges between your Cost Category values.
Source
— required — (String
)The Cost Category value that you want to split. That value can't be used as a source or a target in other split charge rules. To indicate uncategorized costs, you can use an empty string as the source.
Targets
— required — (Array<String>
)The Cost Category values that you want to split costs across. These values can't be used as a source in other split charge rules.
Method
— required — (String
)The method that's used to define how to split your source costs across your targets.
Proportional
- Allocates charges across your targets based on the proportional weighted cost of each target.Fixed
- Allocates charges across your targets based on your defined allocation percentage.>
Possible values include:Even
- Allocates costs evenly across all targets."FIXED"
"PROPORTIONAL"
"EVEN"
Parameters
— (Array<map>
)The parameters for a split charge method. This is only required for the
FIXED
method.Type
— required — (String
)The parameter type.
Possible values include:"ALLOCATION_PERCENTAGES"
Values
— required — (Array<String>
)The parameter values.
ResourceTags
— (Array<map>
)An optional list of tags to associate with the specified
CostCategory
. You can use resource tags to control access to yourcost category
using IAM policies.Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:
-
Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use
-
The maximum length of a key is 128 characters
-
The maximum length of a value is 256 characters
-
Keys and values can only contain alphanumeric characters, spaces, and any of the following:
_.:/=+@-
-
Keys and values are case sensitive
-
Keys and values are trimmed for any leading or trailing whitespaces
-
Don’t use
aws:
as a prefix for your keys. This prefix is reserved for Amazon Web Services use
Key
— required — (String
)The key that's associated with the tag.
Value
— required — (String
)The value that's associated with the tag.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostCategoryArn
— (String
)The unique identifier for your newly created Cost Category.
EffectiveStart
— (String
)The Cost Category's effective start date. It can only be a billing start date (first day of the month).
-
(AWS.Response)
—
Returns:
deleteAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Deletes a cost anomaly monitor.
Service Reference:
Examples:
Calling the deleteAnomalyMonitor operation
var params = { MonitorArn: 'STRING_VALUE' /* required */ }; costexplorer.deleteAnomalyMonitor(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
MonitorArn
— (String
)The unique identifier of the cost anomaly monitor that you want to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Deletes a cost anomaly subscription.
Service Reference:
Examples:
Calling the deleteAnomalySubscription operation
var params = { SubscriptionArn: 'STRING_VALUE' /* required */ }; costexplorer.deleteAnomalySubscription(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SubscriptionArn
— (String
)The unique identifier of the cost anomaly subscription that you want to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
Service Reference:
Examples:
Calling the deleteCostCategoryDefinition operation
var params = { CostCategoryArn: 'STRING_VALUE' /* required */ }; costexplorer.deleteCostCategoryDefinition(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CostCategoryArn
— (String
)The unique identifier for your Cost Category.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostCategoryArn
— (String
)The unique identifier for your Cost Category.
EffectiveEnd
— (String
)The effective end date of the Cost Category as a result of deleting it. No costs after this date is categorized by the deleted Cost Category.
-
(AWS.Response)
—
Returns:
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
EffectiveOn
to return a Cost Category that's active on a specific date. If there's noEffectiveOn
specified, you see a Cost Category that's effective on the current date. If Cost Category is still effective,EffectiveEnd
is omitted in the response.Service Reference:
Examples:
Calling the describeCostCategoryDefinition operation
var params = { CostCategoryArn: 'STRING_VALUE', /* required */ EffectiveOn: 'STRING_VALUE' }; costexplorer.describeCostCategoryDefinition(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CostCategoryArn
— (String
)The unique identifier for your Cost Category.
EffectiveOn
— (String
)The date when the Cost Category was effective.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostCategory
— (map
)The structure of Cost Categories. This includes detailed metadata and the set of rules for the
CostCategory
object.CostCategoryArn
— required — (String
)The unique identifier for your Cost Category.
EffectiveStart
— required — (String
)The effective start date of your Cost Category.
EffectiveEnd
— (String
)The effective end date of your Cost Category.
Name
— required — (String
)The unique name of the Cost Category.
RuleVersion
— required — (String
)The rule schema version in this particular Cost Category.
Possible values include:"CostCategoryExpression.v1"
Rules
— required — (Array<map>
)The rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
Value
— (String
)The default value for the cost category.
Rule
— (map
)An Expression object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently the only dimensions supported are
LINKED_ACCOUNT
,SERVICE_CODE
,RECORD_TYPE
,LINKED_ACCOUNT_NAME
,REGION
, andUSAGE_TYPE
.RECORD_TYPE
is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the Billing and Cost Management User Guide.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
InheritedValue
— (map
)The value the line item is categorized as if the line item contains the matched dimension.
DimensionName
— (String
)The name of the dimension that's used to group costs.
If you specify
Possible values include:LINKED_ACCOUNT_NAME
, the cost category value is based on account name. If you specifyTAG
, the cost category value is based on the value of the specified tag key."LINKED_ACCOUNT_NAME"
"TAG"
DimensionKey
— (String
)The key to extract cost category values.
Type
— (String
)You can define the
Possible values include:CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use."REGULAR"
"INHERITED_VALUE"
SplitChargeRules
— (Array<map>
)The split charge rules that are used to allocate your charges between your Cost Category values.
Source
— required — (String
)The Cost Category value that you want to split. That value can't be used as a source or a target in other split charge rules. To indicate uncategorized costs, you can use an empty string as the source.
Targets
— required — (Array<String>
)The Cost Category values that you want to split costs across. These values can't be used as a source in other split charge rules.
Method
— required — (String
)The method that's used to define how to split your source costs across your targets.
Proportional
- Allocates charges across your targets based on the proportional weighted cost of each target.Fixed
- Allocates charges across your targets based on your defined allocation percentage.>
Possible values include:Even
- Allocates costs evenly across all targets."FIXED"
"PROPORTIONAL"
"EVEN"
Parameters
— (Array<map>
)The parameters for a split charge method. This is only required for the
FIXED
method.Type
— required — (String
)The parameter type.
Possible values include:"ALLOCATION_PERCENTAGES"
Values
— required — (Array<String>
)The parameter values.
ProcessingStatus
— (Array<map>
)The list of processing statuses for Cost Management products for a specific cost category.
Component
— (String
)The Cost Management product name of the applied status.
Possible values include:"COST_EXPLORER"
Status
— (String
)The process status for a specific cost category.
Possible values include:"PROCESSING"
"APPLIED"
DefaultValue
— (String
)The default value for the cost category.
-
(AWS.Response)
—
Returns:
getAnomalies(params = {}, callback) ⇒ AWS.Request
Retrieves all of the cost anomalies detected on your account during the time period that's specified by the
DateInterval
object. Anomalies are available for up to 90 days.Service Reference:
Examples:
Calling the getAnomalies operation
var params = { DateInterval: { /* required */ StartDate: 'STRING_VALUE', /* required */ EndDate: 'STRING_VALUE' }, Feedback: YES | NO | PLANNED_ACTIVITY, MaxResults: 'NUMBER_VALUE', MonitorArn: 'STRING_VALUE', NextPageToken: 'STRING_VALUE', TotalImpact: { NumericOperator: EQUAL | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | GREATER_THAN | LESS_THAN | BETWEEN, /* required */ StartValue: 'NUMBER_VALUE', /* required */ EndValue: 'NUMBER_VALUE' } }; costexplorer.getAnomalies(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
MonitorArn
— (String
)Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN).
DateInterval
— (map
)Assigns the start and end dates for retrieving cost anomalies. The returned anomaly object will have an
AnomalyEndDate
in the specified time range.StartDate
— required — (String
)The first date an anomaly was observed.
EndDate
— (String
)The last date an anomaly was observed.
Feedback
— (String
)Filters anomaly results by the feedback field on the anomaly object.
Possible values include:"YES"
"NO"
"PLANNED_ACTIVITY"
TotalImpact
— (map
)Filters anomaly results by the total impact field on the anomaly object. For example, you can filter anomalies
GREATER_THAN 200.00
to retrieve anomalies, with an estimated dollar impact greater than 200.NumericOperator
— required — (String
)The comparing value that's used in the filter.
Possible values include:"EQUAL"
"GREATER_THAN_OR_EQUAL"
"LESS_THAN_OR_EQUAL"
"GREATER_THAN"
"LESS_THAN"
"BETWEEN"
StartValue
— required — (Float
)The lower bound dollar value that's used in the filter.
EndValue
— (Float
)The upper bound dollar value that's used in the filter.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of entries a paginated response contains.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Anomalies
— (Array<map>
)A list of cost anomalies.
AnomalyId
— required — (String
)The unique identifier for the anomaly.
AnomalyStartDate
— (String
)The first day the anomaly is detected.
AnomalyEndDate
— (String
)The last day the anomaly is detected.
DimensionValue
— (String
)The dimension for the anomaly (for example, an Amazon Web Service in a service monitor).
RootCauses
— (Array<map>
)The list of identified root causes for the anomaly.
Service
— (String
)The Amazon Web Service name that's associated with the cost anomaly.
Region
— (String
)The Amazon Web Services Region that's associated with the cost anomaly.
LinkedAccount
— (String
)The member account value that's associated with the cost anomaly.
UsageType
— (String
)The
UsageType
value that's associated with the cost anomaly.LinkedAccountName
— (String
)The member account name value that's associated with the cost anomaly.
AnomalyScore
— required — (map
)The latest and maximum score for the anomaly.
MaxScore
— required — (Float
)The maximum score that's observed during the
AnomalyDateInterval
.CurrentScore
— required — (Float
)The last observed score.
Impact
— required — (map
)The dollar impact for the anomaly.
MaxImpact
— required — (Float
)The maximum dollar value that's observed for an anomaly.
TotalImpact
— (Float
)The cumulative dollar difference between the total actual spend and total expected spend. It is calculated as
TotalActualSpend - TotalExpectedSpend
.TotalActualSpend
— (Float
)The cumulative dollar amount that was actually spent during the anomaly.
TotalExpectedSpend
— (Float
)The cumulative dollar amount that was expected to be spent during the anomaly. It is calculated using advanced machine learning models to determine the typical spending pattern based on historical data for a customer.
TotalImpactPercentage
— (Float
)The cumulative percentage difference between the total actual spend and total expected spend. It is calculated as
(TotalImpact / TotalExpectedSpend) * 100
. WhenTotalExpectedSpend
is zero, this field is omitted. Expected spend can be zero in situations such as when you start to use a service for the first time.
MonitorArn
— required — (String
)The Amazon Resource Name (ARN) for the cost monitor that generated this anomaly.
Feedback
— (String
)The feedback value.
Possible values include:"YES"
"NO"
"PLANNED_ACTIVITY"
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getAnomalyMonitors(params = {}, callback) ⇒ AWS.Request
Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
Service Reference:
Examples:
Calling the getAnomalyMonitors operation
var params = { MaxResults: 'NUMBER_VALUE', MonitorArnList: [ 'STRING_VALUE', /* more items */ ], NextPageToken: 'STRING_VALUE' }; costexplorer.getAnomalyMonitors(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
MonitorArnList
— (Array<String>
)A list of cost anomaly monitor ARNs.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of entries that a paginated response contains.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AnomalyMonitors
— (Array<map>
)A list of cost anomaly monitors that includes the detailed metadata for each monitor.
MonitorArn
— (String
)The Amazon Resource Name (ARN) value.
MonitorName
— required — (String
)The name of the monitor.
CreationDate
— (String
)The date when the monitor was created.
LastUpdatedDate
— (String
)The date when the monitor was last updated.
LastEvaluatedDate
— (String
)The date when the monitor last evaluated for anomalies.
MonitorType
— required — (String
)The possible type values.
Possible values include:"DIMENSIONAL"
"CUSTOM"
MonitorDimension
— (String
)The dimensions to evaluate.
Possible values include:"SERVICE"
MonitorSpecification
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
DimensionalValueCount
— (Integer
)The value for evaluated dimensions.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getAnomalySubscriptions(params = {}, callback) ⇒ AWS.Request
Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
Service Reference:
Examples:
Calling the getAnomalySubscriptions operation
var params = { MaxResults: 'NUMBER_VALUE', MonitorArn: 'STRING_VALUE', NextPageToken: 'STRING_VALUE', SubscriptionArnList: [ 'STRING_VALUE', /* more items */ ] }; costexplorer.getAnomalySubscriptions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SubscriptionArnList
— (Array<String>
)A list of cost anomaly subscription ARNs.
MonitorArn
— (String
)Cost anomaly monitor ARNs.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of entries a paginated response contains.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AnomalySubscriptions
— (Array<map>
)A list of cost anomaly subscriptions that includes the detailed metadata for each one.
SubscriptionArn
— (String
)The
AnomalySubscription
Amazon Resource Name (ARN).AccountId
— (String
)Your unique account identifier.
MonitorArnList
— required — (Array<String>
)A list of cost anomaly monitors.
Subscribers
— required — (Array<map>
)A list of subscribers to notify.
Address
— (String
)The email address or SNS Amazon Resource Name (ARN). This depends on the
Type
.Type
— (String
)The notification delivery channel.
Possible values include:"EMAIL"
"SNS"
Status
— (String
)Indicates if the subscriber accepts the notifications.
Possible values include:"CONFIRMED"
"DECLINED"
Threshold
— (Float
)(deprecated)
An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.
This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for this resource. You cannot specify both.
Frequency
— required — (String
)The frequency that anomaly notifications are sent. Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications.
Possible values include:"DAILY"
"IMMEDIATE"
"WEEKLY"
SubscriptionName
— required — (String
)The name for the subscription.
ThresholdExpression
— (map
)An Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.One of Threshold or ThresholdExpression is required for this resource. You cannot specify both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getApproximateUsageRecords(params = {}, callback) ⇒ AWS.Request
Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
Service Reference:
Examples:
Calling the getApproximateUsageRecords operation
var params = { ApproximationDimension: SERVICE | RESOURCE, /* required */ Granularity: DAILY | MONTHLY | HOURLY, /* required */ Services: [ 'STRING_VALUE', /* more items */ ] }; costexplorer.getApproximateUsageRecords(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Granularity
— (String
)How granular you want the data to be. You can enable data at hourly or daily granularity.
Possible values include:"DAILY"
"MONTHLY"
"HOURLY"
Services
— (Array<String>
)The service metadata for the service or services you want to query. If not specified, all elements are returned.
ApproximationDimension
— (String
)The service to evaluate for the usage records. You can choose resource-level data at daily granularity, or hourly granularity with or without resource-level data.
Possible values include:"SERVICE"
"RESOURCE"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Services
— (map<Integer>
)The service metadata for the service or services in the response.
TotalRecords
— (Integer
)The total number of usage records for all services in the services list.
LookbackPeriod
— (map
)The lookback period that's used for the estimation.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
-
(AWS.Response)
—
Returns:
getCostAndUsage(params = {}, callback) ⇒ AWS.Request
Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric that you want the request to return. For example, you can specify
BlendedCosts
orUsageQuantity
. You can also filter and group your data by various dimensions, such asSERVICE
orAZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
Service Reference:
Examples:
Calling the getCostAndUsage operation
var params = { Granularity: DAILY | MONTHLY | HOURLY, /* required */ Metrics: [ /* required */ 'STRING_VALUE', /* more items */ ], TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, GroupBy: [ { Key: 'STRING_VALUE', Type: DIMENSION | TAG | COST_CATEGORY }, /* more items */ ], NextPageToken: 'STRING_VALUE' }; costexplorer.getCostAndUsage(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)Sets the start date and end date for retrieving Amazon Web Services costs. The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Granularity
— (String
)Sets the Amazon Web Services cost granularity to
Possible values include:MONTHLY
orDAILY
, orHOURLY
. IfGranularity
isn't set, the response object doesn't include theGranularity
, eitherMONTHLY
orDAILY
, orHOURLY
."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters Amazon Web Services costs by different dimensions. For example, you can specify
SERVICE
andLINKED_ACCOUNT
and get the costs that are associated with that account's usage of that service. You can nestExpression
objects to define any combination of dimension filters. For more information, see Expression.Valid values for
MatchOptions
forDimensions
areEQUALS
andCASE_SENSITIVE
.Valid values for
MatchOptions
forCostCategories
andTags
areEQUALS
,ABSENT
, andCASE_SENSITIVE
. Default values areEQUALS
andCASE_SENSITIVE
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Metrics
— (Array<String>
)Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.
Valid values are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.Note: If you return theUsageQuantity
metric, the service aggregates all usage numbers without taking into account the units. For example, if you aggregateusageQuantity
across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours and GB). To get more meaningfulUsageQuantity
metrics, filter byUsageType
orUsageTypeGroups
.Metrics
is required forGetCostAndUsage
requests.GroupBy
— (Array<map>
)You can group Amazon Web Services costs using up to two different groups, either dimensions, tag keys, cost categories, or any two group by types.
Valid values for the
DIMENSION
type areAZ
,INSTANCE_TYPE
,LEGAL_ENTITY_NAME
,INVOICING_ENTITY
,LINKED_ACCOUNT
,OPERATION
,PLATFORM
,PURCHASE_TYPE
,SERVICE
,TENANCY
,RECORD_TYPE
, andUSAGE_TYPE
.When you group by the
TAG
type and include a valid tag key, you get all tag values, including empty strings.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
GroupDefinitions
— (Array<map>
)The groups that are specified by the
Filter
orGroupBy
parameters in the request.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
ResultsByTime
— (Array<map>
)The time period that's covered by the results in the response.
TimePeriod
— (map
)The time period that the result covers.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Total
— (map<map>
)The total amount of cost or usage accrued during the time period.
Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
Groups
— (Array<map>
)The groups that this time period includes.
Keys
— (Array<String>
)The keys that are included in this group.
Metrics
— (map<map>
)The metrics that are included in this group.
Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
Estimated
— (Boolean
)Determines whether the result is estimated.
DimensionValueAttributes
— (Array<map>
)The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.
Value
— (String
)The value of a dimension with a specific attribute.
Attributes
— (map<String>
)The attribute that applies to a specific
Dimension
.
-
(AWS.Response)
—
Returns:
getCostAndUsageWithResources(params = {}, callback) ⇒ AWS.Request
Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as
BlendedCosts
orUsageQuantity
, that you want the request to return. You can also filter and group your data by various dimensions, such asSERVICE
orAZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.
Note: This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.Service Reference:
Examples:
Calling the getCostAndUsageWithResources operation
var params = { Filter: { /* Expression */ /* required */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Granularity: DAILY | MONTHLY | HOURLY, /* required */ TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, GroupBy: [ { Key: 'STRING_VALUE', Type: DIMENSION | TAG | COST_CATEGORY }, /* more items */ ], Metrics: [ 'STRING_VALUE', /* more items */ ], NextPageToken: 'STRING_VALUE' }; costexplorer.getCostAndUsageWithResources(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)Sets the start and end dates for retrieving Amazon Web Services costs. The range must be within the last 14 days (the start date cannot be earlier than 14 days ago). The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Granularity
— (String
)Sets the Amazon Web Services cost granularity to
Possible values include:MONTHLY
,DAILY
, orHOURLY
. IfGranularity
isn't set, the response object doesn't include theGranularity
,MONTHLY
,DAILY
, orHOURLY
."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters Amazon Web Services costs by different dimensions. For example, you can specify
SERVICE
andLINKED_ACCOUNT
and get the costs that are associated with that account's usage of that service. You can nestExpression
objects to define any combination of dimension filters. For more information, see Expression.The
GetCostAndUsageWithResources
operation requires that you either group by or filter by aResourceId
. It requires the Expression"SERVICE = Amazon Elastic Compute Cloud - Compute"
in the filter.Valid values for
MatchOptions
forDimensions
areEQUALS
andCASE_SENSITIVE
.Valid values for
MatchOptions
forCostCategories
andTags
areEQUALS
,ABSENT
, andCASE_SENSITIVE
. Default values areEQUALS
andCASE_SENSITIVE
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Metrics
— (Array<String>
)Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.
Valid values are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.Note: If you return theUsageQuantity
metric, the service aggregates all usage numbers without taking the units into account. For example, if you aggregateusageQuantity
across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hour or GB). To get more meaningfulUsageQuantity
metrics, filter byUsageType
orUsageTypeGroups
.Metrics
is required forGetCostAndUsageWithResources
requests.GroupBy
— (Array<map>
)You can group Amazon Web Services costs using up to two different groups:
DIMENSION
,TAG
,COST_CATEGORY
.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
GroupDefinitions
— (Array<map>
)The groups that are specified by the
Filter
orGroupBy
parameters in the request.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
ResultsByTime
— (Array<map>
)The time period that's covered by the results in the response.
TimePeriod
— (map
)The time period that the result covers.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Total
— (map<map>
)The total amount of cost or usage accrued during the time period.
Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
Groups
— (Array<map>
)The groups that this time period includes.
Keys
— (Array<String>
)The keys that are included in this group.
Metrics
— (map<map>
)The metrics that are included in this group.
Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
Estimated
— (Boolean
)Determines whether the result is estimated.
DimensionValueAttributes
— (Array<map>
)The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.
Value
— (String
)The value of a dimension with a specific attribute.
Attributes
— (map<String>
)The attribute that applies to a specific
Dimension
.
-
(AWS.Response)
—
Returns:
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.Service Reference:
Examples:
Calling the getCostCategories operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, CostCategoryName: 'STRING_VALUE', Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, MaxResults: 'NUMBER_VALUE', NextPageToken: 'STRING_VALUE', SearchString: 'STRING_VALUE', SortBy: [ { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING }, /* more items */ ] }; costexplorer.getCostCategories(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SearchString
— (String
)The value that you want to search the filter values for.
If you don't specify a
CostCategoryName
,SearchString
is used to filter Cost Category names that match theSearchString
pattern. If you specify aCostCategoryName
,SearchString
is used to filter Cost Category values that match theSearchString
pattern.TimePeriod
— (map
)The time period of the request.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
CostCategoryName
— (String
)The unique name of the Cost Category.
Filter
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
SortBy
— (Array<map>
)The value that you sort the data by.
The key represents the cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
The supported key values for the
SortOrder
value areASCENDING
andDESCENDING
.When you use the
SortBy
value, theNextPageToken
andSearchString
key values aren't supported.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
MaxResults
— (Integer
)This field is only used when the
SortBy
value is provided in the request.The maximum number of objects that are returned for this request. If
MaxResults
isn't specified with theSortBy
value, the request returns 1000 results as the default value for this parameter.For
GetCostCategories
, MaxResults has an upper quota of 1000.NextPageToken
— (String
)If the number of objects that are still available for retrieval exceeds the quota, Amazon Web Services returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the NextPageToken from the previous call in your next request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextPageToken
— (String
)If the number of objects that are still available for retrieval exceeds the quota, Amazon Web Services returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
CostCategoryNames
— (Array<String>
)The names of the Cost Categories.
CostCategoryValues
— (Array<String>
)The Cost Category values.
If the
CostCategoryName
key isn't specified in the request, theCostCategoryValues
fields aren't returned.ReturnSize
— (Integer
)The number of objects that are returned.
TotalSize
— (Integer
)The total number of objects.
-
(AWS.Response)
—
Returns:
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.
Service Reference:
Examples:
Calling the getCostForecast operation
var params = { Granularity: DAILY | MONTHLY | HOURLY, /* required */ Metric: BLENDED_COST | UNBLENDED_COST | AMORTIZED_COST | NET_UNBLENDED_COST | NET_AMORTIZED_COST | USAGE_QUANTITY | NORMALIZED_USAGE_AMOUNT, /* required */ TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, PredictionIntervalLevel: 'NUMBER_VALUE' }; costexplorer.getCostForecast(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The period of time that you want the forecast to cover. The start date must be equal to or no later than the current date to avoid a validation error.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Metric
— (String
)Which metric Cost Explorer uses to create your forecast. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.
Valid values for a
GetCostForecast
call are the following:-
AMORTIZED_COST
-
BLENDED_COST
-
NET_AMORTIZED_COST
-
NET_UNBLENDED_COST
-
UNBLENDED_COST
"BLENDED_COST"
"UNBLENDED_COST"
"AMORTIZED_COST"
"NET_UNBLENDED_COST"
"NET_AMORTIZED_COST"
"USAGE_QUANTITY"
"NORMALIZED_USAGE_AMOUNT"
-
Granularity
— (String
)How granular you want the forecast to be. You can get 3 months of
DAILY
forecasts or 12 months ofMONTHLY
forecasts.The
Possible values include:GetCostForecast
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)The filters that you want to use to filter your forecast. The
GetCostForecast
API supports filtering by the following dimensions:-
AZ
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
LINKED_ACCOUNT_NAME
-
OPERATION
-
PURCHASE_TYPE
-
REGION
-
SERVICE
-
USAGE_TYPE
-
USAGE_TYPE_GROUP
-
RECORD_TYPE
-
OPERATING_SYSTEM
-
TENANCY
-
SCOPE
-
PLATFORM
-
SUBSCRIPTION_ID
-
LEGAL_ENTITY_NAME
-
DEPLOYMENT_OPTION
-
DATABASE_ENGINE
-
INSTANCE_TYPE_FAMILY
-
BILLING_ENTITY
-
RESERVATION_ID
-
SAVINGS_PLAN_ARN
Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
PredictionIntervalLevel
— (Integer
)Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Total
— (map
)How much you are forecasted to spend over the forecast period, in
USD
.Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
ForecastResultsByTime
— (Array<map>
)The forecasts for your query, in order. For
DAILY
forecasts, this is a list of days. ForMONTHLY
forecasts, this is a list of months.TimePeriod
— (map
)The period of time that the forecast covers.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
MeanValue
— (String
)The mean value of the forecast.
PredictionIntervalLowerBound
— (String
)The lower limit for the prediction interval.
PredictionIntervalUpperBound
— (String
)The upper limit for the prediction interval.
-
(AWS.Response)
—
Returns:
getDimensionValues(params = {}, callback) ⇒ AWS.Request
Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
Service Reference:
Examples:
Calling the getDimensionValues operation
var params = { Dimension: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, /* required */ TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Context: COST_AND_USAGE | RESERVATIONS | SAVINGS_PLANS, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, MaxResults: 'NUMBER_VALUE', NextPageToken: 'STRING_VALUE', SearchString: 'STRING_VALUE', SortBy: [ { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING }, /* more items */ ] }; costexplorer.getDimensionValues(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SearchString
— (String
)The value that you want to search the filter values for.
TimePeriod
— (map
)The start date and end date for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Dimension
— (String
)The name of the dimension. Each
Possible values include:Dimension
is available for a differentContext
. For more information, seeContext
.LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Context
— (String
)The context for the call to
GetDimensionValues
. This can beRESERVATIONS
orCOST_AND_USAGE
. The default value isCOST_AND_USAGE
. If the context is set toRESERVATIONS
, the resulting dimension values can be used in theGetReservationUtilization
operation. If the context is set toCOST_AND_USAGE
, the resulting dimension values can be used in theGetCostAndUsage
operation.If you set the context to
COST_AND_USAGE
, you can use the following dimensions for searching:-
AZ - The Availability Zone. An example is
us-east-1a
. -
BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible values are the following:
- Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services.
- AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting reseller for Amazon Web Services in India.
- Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on Amazon Web Services by third-party software providers.
-
CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.
-
DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are
SingleAZ
andMultiAZ
. -
DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.
-
INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
m4.xlarge
. -
INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use cases. Examples are
Compute Optimized
(for example,C4
,C5
,C6g
, andC7g
),Memory Optimization
(for example,R4
,R5n
,R5b
, andR6g
). -
INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services invoice.
-
LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.
-
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.
-
OPERATION - The action performed. Examples include
RunInstance
andCreateBucket
. -
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
PURCHASE_TYPE - The reservation type of the purchase that this usage is related to. Examples include On-Demand Instances and Standard Reserved Instances.
-
RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation Instance.
-
SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.
-
SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute).
-
SERVICE - The Amazon Web Services service such as Amazon DynamoDB.
-
TENANCY - The tenancy of a resource. Examples are shared or dedicated.
-
USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the
GetDimensionValues
operation includes a unit attribute. Examples include GB and Hrs. -
USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.
-
REGION - The Amazon Web Services Region.
-
RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees, usage costs, tax refunds, and credits.
-
RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in feature only available for last 14 days for EC2-Compute Service.
If you set the context to
RESERVATIONS
, you can use the following dimensions for searching:-
AZ - The Availability Zone. An example is
us-east-1a
. -
CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.
-
DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are
SingleAZ
andMultiAZ
. -
INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
m4.xlarge
. -
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
REGION - The Amazon Web Services Region.
-
SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are regional or a single Availability Zone.
-
TAG (Coverage only) - The tags that are associated with a Reserved Instance (RI).
-
TENANCY - The tenancy of a resource. Examples are shared or dedicated.
If you set the context to
SAVINGS_PLANS
, you can use the following dimensions for searching:-
SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)
-
PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All Upfront)
-
REGION - The Amazon Web Services Region.
-
INSTANCE_TYPE_FAMILY - The family of instances (For example,
m5
) -
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.
"COST_AND_USAGE"
"RESERVATIONS"
"SAVINGS_PLANS"
-
Filter
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
SortBy
— (Array<map>
)The value that you want to sort the data by.
The key represents cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
The supported values for the
SortOrder
key areASCENDING
orDESCENDING
.When you specify a
SortBy
paramater, the context must beCOST_AND_USAGE
. Further, when usingSortBy
,NextPageToken
andSearchString
aren't supported.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
MaxResults
— (Integer
)This field is only used when SortBy is provided in the request. The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter.
For
GetDimensionValues
, MaxResults has an upper limit of 1000.NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:DimensionValues
— (Array<map>
)The filters that you used to filter your request. Some dimensions are available only for a specific context.
If you set the context to
COST_AND_USAGE
, you can use the following dimensions for searching:-
AZ - The Availability Zone. An example is
us-east-1a
. -
DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL.
-
INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
m4.xlarge
. -
LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.
-
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.
-
OPERATION - The action performed. Examples include
RunInstance
andCreateBucket
. -
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
PURCHASE_TYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances.
-
SERVICE - The Amazon Web Services service such as Amazon DynamoDB.
-
USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the
GetDimensionValues
operation includes a unit attribute. Examples include GB and Hrs. -
USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.
-
RECORD_TYPE - The different types of charges such as RI fees, usage costs, tax refunds, and credits.
-
RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in feature only available for last 14 days for EC2-Compute Service. You can opt-in by enabling
Hourly
andResource Level Data
in Cost Management Console preferences.
If you set the context to
RESERVATIONS
, you can use the following dimensions for searching:-
AZ - The Availability Zone. An example is
us-east-1a
. -
CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are Windows or Linux.
-
DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Valid values are
SingleAZ
andMultiAZ
. -
INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
m4.xlarge
. -
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
REGION - The Amazon Web Services Region.
-
SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are regional or a single Availability Zone.
-
TAG (Coverage only) - The tags that are associated with a Reserved Instance (RI).
-
TENANCY - The tenancy of a resource. Examples are shared or dedicated.
If you set the context to
SAVINGS_PLANS
, you can use the following dimensions for searching:-
SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)
-
PAYMENT_OPTION - Payment option for the given Savings Plans (for example, All Upfront)
-
REGION - The Amazon Web Services Region.
-
INSTANCE_TYPE_FAMILY - The family of instances (For example,
m5
) -
LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.
-
SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan
Value
— (String
)The value of a dimension with a specific attribute.
Attributes
— (map<String>
)The attribute that applies to a specific
Dimension
.
-
ReturnSize
— (Integer
)The number of results that Amazon Web Services returned at one time.
TotalSize
— (Integer
)The total number of search results.
NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
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. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
-
TAG
-
TENANCY
To determine valid values for a dimension, use the
GetDimensionValues
operation.Service Reference:
Examples:
Calling the getReservationCoverage operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Granularity: DAILY | MONTHLY | HOURLY, GroupBy: [ { Key: 'STRING_VALUE', Type: DIMENSION | TAG | COST_CATEGORY }, /* more items */ ], MaxResults: 'NUMBER_VALUE', Metrics: [ 'STRING_VALUE', /* more items */ ], NextPageToken: 'STRING_VALUE', SortBy: { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING } }; costexplorer.getReservationCoverage(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The start and end dates of the period that you want to retrieve data about reservation coverage for. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
GroupBy
— (Array<map>
)You can group the data by the following attributes:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
INVOICING_ENTITY
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
TENANCY
Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
-
Granularity
— (String
)The granularity of the Amazon Web Services cost data for the reservation. Valid values are
MONTHLY
andDAILY
.If
GroupBy
is set,Granularity
can't be set. IfGranularity
isn't set, the response object doesn't includeGranularity
, eitherMONTHLY
orDAILY
.The
Possible values include:GetReservationCoverage
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters utilization data by dimensions. You can filter by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
-
TAG
-
TENANCY
GetReservationCoverage
uses the same Expression object as the other operations, but onlyAND
is supported among each dimension. You can nest only one level deep. If there are multiple values for a dimension, they are OR'd together.If you don't provide a
SERVICE
filter, Cost Explorer defaults to EC2.Cost category is also supported.
Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
Metrics
— (Array<String>
)The measurement that you want your reservation coverage reported in.
Valid values are
Hour
,Unit
, andCost
. You can use multiple values in a request.NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
SortBy
— (map
)The value by which you want to sort the data.
The following values are supported for
Key
:-
OnDemandCost
-
CoverageHoursPercentage
-
OnDemandHours
-
ReservedHours
-
TotalRunningHours
-
CoverageNormalizedUnitsPercentage
-
OnDemandNormalizedUnits
-
ReservedNormalizedUnits
-
TotalRunningNormalizedUnits
-
Time
Supported values for
SortOrder
areASCENDING
orDESCENDING
.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
MaxResults
— (Integer
)The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CoveragesByTime
— (Array<map>
)The amount of time that your reservations covered.
TimePeriod
— (map
)The period that this coverage was used over.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Groups
— (Array<map>
)The groups of instances that the reservation covered.
Attributes
— (map<String>
)The attributes for this group of reservations.
Coverage
— (map
)How much instance usage this group of reservations covered.
CoverageHours
— (map
)The amount of instance usage that the reservation covered, in hours.
OnDemandHours
— (String
)The number of instance running hours that On-Demand Instances covered.
ReservedHours
— (String
)The number of instance running hours that reservations covered.
TotalRunningHours
— (String
)The total instance usage, in hours.
CoverageHoursPercentage
— (String
)The percentage of instance hours that a reservation covered.
CoverageNormalizedUnits
— (map
)The amount of instance usage that the reservation covered, in normalized units.
OnDemandNormalizedUnits
— (String
)The number of normalized units that are covered by On-Demand Instances instead of a reservation.
ReservedNormalizedUnits
— (String
)The number of normalized units that a reservation covers.
TotalRunningNormalizedUnits
— (String
)The total number of normalized units that you used.
CoverageNormalizedUnitsPercentage
— (String
)The percentage of your used instance normalized units that a reservation covers.
CoverageCost
— (map
)The amount of cost that the reservation covered.
OnDemandCost
— (String
)How much an On-Demand Instance costs.
Total
— (map
)The total reservation coverage, in hours.
CoverageHours
— (map
)The amount of instance usage that the reservation covered, in hours.
OnDemandHours
— (String
)The number of instance running hours that On-Demand Instances covered.
ReservedHours
— (String
)The number of instance running hours that reservations covered.
TotalRunningHours
— (String
)The total instance usage, in hours.
CoverageHoursPercentage
— (String
)The percentage of instance hours that a reservation covered.
CoverageNormalizedUnits
— (map
)The amount of instance usage that the reservation covered, in normalized units.
OnDemandNormalizedUnits
— (String
)The number of normalized units that are covered by On-Demand Instances instead of a reservation.
ReservedNormalizedUnits
— (String
)The number of normalized units that a reservation covers.
TotalRunningNormalizedUnits
— (String
)The total number of normalized units that you used.
CoverageNormalizedUnitsPercentage
— (String
)The percentage of your used instance normalized units that a reservation covers.
CoverageCost
— (map
)The amount of cost that the reservation covered.
OnDemandCost
— (String
)How much an On-Demand Instance costs.
Total
— (map
)The total amount of instance usage that a reservation covered.
CoverageHours
— (map
)The amount of instance usage that the reservation covered, in hours.
OnDemandHours
— (String
)The number of instance running hours that On-Demand Instances covered.
ReservedHours
— (String
)The number of instance running hours that reservations covered.
TotalRunningHours
— (String
)The total instance usage, in hours.
CoverageHoursPercentage
— (String
)The percentage of instance hours that a reservation covered.
CoverageNormalizedUnits
— (map
)The amount of instance usage that the reservation covered, in normalized units.
OnDemandNormalizedUnits
— (String
)The number of normalized units that are covered by On-Demand Instances instead of a reservation.
ReservedNormalizedUnits
— (String
)The number of normalized units that a reservation covers.
TotalRunningNormalizedUnits
— (String
)The total number of normalized units that you used.
CoverageNormalizedUnitsPercentage
— (String
)The percentage of your used instance normalized units that a reservation covers.
CoverageCost
— (map
)The amount of cost that the reservation covered.
OnDemandCost
— (String
)How much an On-Demand Instance costs.
NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getReservationPurchaseRecommendation(params = {}, callback) ⇒ AWS.Request
Gets recommendations for reservation purchases. These recommendations might help you to reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing.
Amazon Web Services generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After Amazon Web Services has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of Reserved Instance (RI) to purchase to maximize your estimated savings.
For example, Amazon Web Services automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. Amazon Web Services recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible Reserved Instance (RI). Amazon Web Services also shows the equal number of normalized units. This way, you can purchase any instance size that you want. For this example, your RI recommendation is for
c4.large
because that is the smallest size instance in the c4 instance family.Service Reference:
Examples:
Calling the getReservationPurchaseRecommendation operation
var params = { Service: 'STRING_VALUE', /* required */ AccountId: 'STRING_VALUE', AccountScope: PAYER | LINKED, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, LookbackPeriodInDays: SEVEN_DAYS | THIRTY_DAYS | SIXTY_DAYS, NextPageToken: 'STRING_VALUE', PageSize: 'NUMBER_VALUE', PaymentOption: NO_UPFRONT | PARTIAL_UPFRONT | ALL_UPFRONT | LIGHT_UTILIZATION | MEDIUM_UTILIZATION | HEAVY_UTILIZATION, ServiceSpecification: { EC2Specification: { OfferingClass: STANDARD | CONVERTIBLE } }, TermInYears: ONE_YEAR | THREE_YEARS }; costexplorer.getReservationPurchaseRecommendation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
AccountId
— (String
)The account ID that's associated with the recommendation.
Service
— (String
)The specific service that you want recommendations for.
Filter
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
AccountScope
— (String
)The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to
Possible values include:PAYER
. If the value isLINKED
, recommendations are calculated for individual member accounts only."PAYER"
"LINKED"
LookbackPeriodInDays
— (String
)The number of previous days that you want Amazon Web Services to consider when it calculates your recommendations.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
TermInYears
— (String
)The reservation term that you want recommendations for.
Possible values include:"ONE_YEAR"
"THREE_YEARS"
PaymentOption
— (String
)The reservation purchase option that you want recommendations for.
Possible values include:"NO_UPFRONT"
"PARTIAL_UPFRONT"
"ALL_UPFRONT"
"LIGHT_UTILIZATION"
"MEDIUM_UTILIZATION"
"HEAVY_UTILIZATION"
ServiceSpecification
— (map
)The hardware specifications for the service instances that you want recommendations for, such as standard or convertible Amazon EC2 instances.
EC2Specification
— (map
)The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.
OfferingClass
— (String
)Indicates whether you want a recommendation for standard or convertible reservations.
Possible values include:"STANDARD"
"CONVERTIBLE"
PageSize
— (Integer
)The number of recommendations that you want returned in a single response object.
NextPageToken
— (String
)The pagination token that indicates the next set of results that you want to retrieve.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Metadata
— (map
)Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.
RecommendationId
— (String
)The ID for the recommendation.
GenerationTimestamp
— (String
)The timestamp for when Amazon Web Services made the recommendation.
AdditionalMetadata
— (String
)Additional metadata that might be applicable to the recommendation.
Recommendations
— (Array<map>
)Recommendations for reservations to purchase.
AccountScope
— (String
)The account scope that Amazon Web Services recommends that you purchase this instance for. For example, you can purchase this reservation for an entire organization in Amazon Web Services Organizations.
Possible values include:"PAYER"
"LINKED"
LookbackPeriodInDays
— (String
)How many days of previous usage that Amazon Web Services considers when making this recommendation.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
TermInYears
— (String
)The term of the reservation that you want recommendations for, in years.
Possible values include:"ONE_YEAR"
"THREE_YEARS"
PaymentOption
— (String
)The payment option for the reservation (for example,
Possible values include:AllUpfront
orNoUpfront
)."NO_UPFRONT"
"PARTIAL_UPFRONT"
"ALL_UPFRONT"
"LIGHT_UTILIZATION"
"MEDIUM_UTILIZATION"
"HEAVY_UTILIZATION"
ServiceSpecification
— (map
)Hardware specifications for the service that you want recommendations for.
EC2Specification
— (map
)The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.
OfferingClass
— (String
)Indicates whether you want a recommendation for standard or convertible reservations.
Possible values include:"STANDARD"
"CONVERTIBLE"
RecommendationDetails
— (Array<map>
)Details about the recommended purchases.
AccountId
— (String
)The account that this Reserved Instance (RI) recommendation is for.
InstanceDetails
— (map
)Details about the reservations that Amazon Web Services recommends that you purchase.
EC2InstanceDetails
— (map
)The Amazon EC2 reservations that Amazon Web Services recommends that you purchase.
Family
— (String
)The instance family of the recommended reservation.
InstanceType
— (String
)The type of instance that Amazon Web Services recommends.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
AvailabilityZone
— (String
)The Availability Zone of the recommended reservation.
Platform
— (String
)The platform of the recommended reservation. The platform is the specific combination of operating system, license model, and software on an instance.
Tenancy
— (String
)Determines whether the recommended reservation is dedicated or shared.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current-generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
RDSInstanceDetails
— (map
)The Amazon RDS reservations that Amazon Web Services recommends that you purchase.
Family
— (String
)The instance family of the recommended reservation.
InstanceType
— (String
)The type of instance that Amazon Web Services recommends.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
DatabaseEngine
— (String
)The database engine that the recommended reservation supports.
DatabaseEdition
— (String
)The database edition that the recommended reservation supports.
DeploymentOption
— (String
)Determines whether the recommendation is for a reservation in a single Availability Zone or a reservation with a backup in a second Availability Zone.
LicenseModel
— (String
)The license model that the recommended reservation supports.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current-generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
RedshiftInstanceDetails
— (map
)The Amazon Redshift reservations that Amazon Web Services recommends that you purchase.
Family
— (String
)The instance family of the recommended reservation.
NodeType
— (String
)The type of node that Amazon Web Services recommends.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current-generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
ElastiCacheInstanceDetails
— (map
)The ElastiCache reservations that Amazon Web Services recommends that you purchase.
Family
— (String
)The instance family of the recommended reservation.
NodeType
— (String
)The type of node that Amazon Web Services recommends.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
ProductDescription
— (String
)The description of the recommended reservation.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
ESInstanceDetails
— (map
)The Amazon OpenSearch Service reservations that Amazon Web Services recommends that you purchase.
InstanceClass
— (String
)The class of instance that Amazon Web Services recommends.
InstanceSize
— (String
)The size of instance that Amazon Web Services recommends.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current-generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
MemoryDBInstanceDetails
— (map
)The MemoryDB reservations that Amazon Web Services recommends that you purchase.
Family
— (String
)The instance family of the recommended reservation.
NodeType
— (String
)The node type of the recommended reservation.
Region
— (String
)The Amazon Web Services Region of the recommended reservation.
CurrentGeneration
— (Boolean
)Determines whether the recommendation is for a current generation instance.
SizeFlexEligible
— (Boolean
)Determines whether the recommended reservation is size flexible.
RecommendedNumberOfInstancesToPurchase
— (String
)The number of instances that Amazon Web Services recommends that you purchase.
RecommendedNormalizedUnitsToPurchase
— (String
)The number of normalized units that Amazon Web Services recommends that you purchase.
MinimumNumberOfInstancesUsedPerHour
— (String
)The minimum number of instances that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
MinimumNormalizedUnitsUsedPerHour
— (String
)The minimum number of normalized units that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
MaximumNumberOfInstancesUsedPerHour
— (String
)The maximum number of instances that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
MaximumNormalizedUnitsUsedPerHour
— (String
)The maximum number of normalized units that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
AverageNumberOfInstancesUsedPerHour
— (String
)The average number of instances that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
AverageNormalizedUnitsUsedPerHour
— (String
)The average number of normalized units that you used in an hour during the historical period. Amazon Web Services uses this to calculate your recommended reservation purchases.
AverageUtilization
— (String
)The average utilization of your instances. Amazon Web Services uses this to calculate your recommended reservation purchases.
EstimatedBreakEvenInMonths
— (String
)How long Amazon Web Services estimates that it takes for this instance to start saving you money, in months.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to calculate the costs for this instance.
EstimatedMonthlySavingsAmount
— (String
)How much Amazon Web Services estimates that this specific recommendation might save you in a month.
EstimatedMonthlySavingsPercentage
— (String
)How much Amazon Web Services estimates that this specific recommendation might save you in a month, as a percentage of your overall costs.
EstimatedMonthlyOnDemandCost
— (String
)How much Amazon Web Services estimates that you spend on On-Demand Instances in a month.
EstimatedReservationCostForLookbackPeriod
— (String
)How much Amazon Web Services estimates that you might spend for all usage during the specified historical period if you had a reservation.
UpfrontCost
— (String
)How much purchasing this instance costs you upfront.
RecurringStandardMonthlyCost
— (String
)How much purchasing this instance costs you on a monthly basis.
RecommendationSummary
— (map
)A summary about the recommended purchase.
TotalEstimatedMonthlySavingsAmount
— (String
)The total amount that Amazon Web Services estimates that this recommendation could save you in a month.
TotalEstimatedMonthlySavingsPercentage
— (String
)The total amount that Amazon Web Services estimates that this recommendation could save you in a month, as a percentage of your costs.
CurrencyCode
— (String
)The currency code used for this recommendation.
NextPageToken
— (String
)The pagination token for the next set of retrievable results.
-
(AWS.Response)
—
Returns:
getReservationUtilization(params = {}, callback) ⇒ AWS.Request
Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use
GetDimensionValues
to determine the possible dimension values. Currently, you can group only bySUBSCRIPTION_ID
.Service Reference:
Examples:
Calling the getReservationUtilization operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Granularity: DAILY | MONTHLY | HOURLY, GroupBy: [ { Key: 'STRING_VALUE', Type: DIMENSION | TAG | COST_CATEGORY }, /* more items */ ], MaxResults: 'NUMBER_VALUE', NextPageToken: 'STRING_VALUE', SortBy: { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING } }; costexplorer.getReservationUtilization(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)Sets the start and end dates for retrieving Reserved Instance (RI) utilization. The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
GroupBy
— (Array<map>
)Groups only by
SUBSCRIPTION_ID
. Metadata is included.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
Granularity
— (String
)If
GroupBy
is set,Granularity
can't be set. IfGranularity
isn't set, the response object doesn't includeGranularity
, eitherMONTHLY
orDAILY
. If bothGroupBy
andGranularity
aren't set,GetReservationUtilization
defaults toDAILY
.The
Possible values include:GetReservationUtilization
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters utilization data by dimensions. You can filter by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
-
SCOPE
-
TENANCY
GetReservationUtilization
uses the same Expression object as the other operations, but onlyAND
is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
SortBy
— (map
)The value that you want to sort the data by.
The following values are supported for
Key
:-
UtilizationPercentage
-
UtilizationPercentageInUnits
-
PurchasedHours
-
PurchasedUnits
-
TotalActualHours
-
TotalActualUnits
-
UnusedHours
-
UnusedUnits
-
OnDemandCostOfRIHoursUsed
-
NetRISavings
-
TotalPotentialRISavings
-
AmortizedUpfrontFee
-
AmortizedRecurringFee
-
TotalAmortizedFee
-
RICostForUnusedHours
-
RealizedSavings
-
UnrealizedSavings
The supported values for
SortOrder
areASCENDING
andDESCENDING
.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:UtilizationsByTime
— (Array<map>
)The amount of time that you used your Reserved Instances (RIs).
TimePeriod
— (map
)The period of time that this utilization was used for.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Groups
— (Array<map>
)The groups that this utilization result uses.
Key
— (String
)The key for a specific reservation attribute.
Value
— (String
)The value of a specific reservation attribute.
Attributes
— (map<String>
)The attributes for this group of reservations.
Utilization
— (map
)How much you used this group of reservations.
UtilizationPercentage
— (String
)The percentage of reservation time that you used.
UtilizationPercentageInUnits
— (String
)The percentage of Amazon EC2 reservation time that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
PurchasedHours
— (String
)How many reservation hours that you purchased.
PurchasedUnits
— (String
)The number of Amazon EC2 reservation hours that you purchased. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
TotalActualHours
— (String
)The total number of reservation hours that you used.
TotalActualUnits
— (String
)The total number of Amazon EC2 reservation hours that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
UnusedHours
— (String
)The number of reservation hours that you didn't use.
UnusedUnits
— (String
)The number of Amazon EC2 reservation hours that you didn't use. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
OnDemandCostOfRIHoursUsed
— (String
)How much your reservation costs if charged On-Demand rates.
NetRISavings
— (String
)How much you saved due to purchasing and utilizing reservation. Amazon Web Services calculates this by subtracting
TotalAmortizedFee
fromOnDemandCostOfRIHoursUsed
.TotalPotentialRISavings
— (String
)How much you might save if you use your entire reservation.
AmortizedUpfrontFee
— (String
)The upfront cost of your reservation. It's amortized over the reservation period.
AmortizedRecurringFee
— (String
)The monthly cost of your reservation. It's amortized over the reservation period.
TotalAmortizedFee
— (String
)The total cost of your reservation. It's amortized over the reservation period.
RICostForUnusedHours
— (String
)The cost of unused hours for your reservation.
RealizedSavings
— (String
)The realized savings because of purchasing and using a reservation.
UnrealizedSavings
— (String
)The unrealized savings because of purchasing and using a reservation.
Total
— (map
)The total number of reservation hours that were used.
UtilizationPercentage
— (String
)The percentage of reservation time that you used.
UtilizationPercentageInUnits
— (String
)The percentage of Amazon EC2 reservation time that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
PurchasedHours
— (String
)How many reservation hours that you purchased.
PurchasedUnits
— (String
)The number of Amazon EC2 reservation hours that you purchased. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
TotalActualHours
— (String
)The total number of reservation hours that you used.
TotalActualUnits
— (String
)The total number of Amazon EC2 reservation hours that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
UnusedHours
— (String
)The number of reservation hours that you didn't use.
UnusedUnits
— (String
)The number of Amazon EC2 reservation hours that you didn't use. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
OnDemandCostOfRIHoursUsed
— (String
)How much your reservation costs if charged On-Demand rates.
NetRISavings
— (String
)How much you saved due to purchasing and utilizing reservation. Amazon Web Services calculates this by subtracting
TotalAmortizedFee
fromOnDemandCostOfRIHoursUsed
.TotalPotentialRISavings
— (String
)How much you might save if you use your entire reservation.
AmortizedUpfrontFee
— (String
)The upfront cost of your reservation. It's amortized over the reservation period.
AmortizedRecurringFee
— (String
)The monthly cost of your reservation. It's amortized over the reservation period.
TotalAmortizedFee
— (String
)The total cost of your reservation. It's amortized over the reservation period.
RICostForUnusedHours
— (String
)The cost of unused hours for your reservation.
RealizedSavings
— (String
)The realized savings because of purchasing and using a reservation.
UnrealizedSavings
— (String
)The unrealized savings because of purchasing and using a reservation.
Total
— (map
)The total amount of time that you used your Reserved Instances (RIs).
UtilizationPercentage
— (String
)The percentage of reservation time that you used.
UtilizationPercentageInUnits
— (String
)The percentage of Amazon EC2 reservation time that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
PurchasedHours
— (String
)How many reservation hours that you purchased.
PurchasedUnits
— (String
)The number of Amazon EC2 reservation hours that you purchased. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
TotalActualHours
— (String
)The total number of reservation hours that you used.
TotalActualUnits
— (String
)The total number of Amazon EC2 reservation hours that you used. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
UnusedHours
— (String
)The number of reservation hours that you didn't use.
UnusedUnits
— (String
)The number of Amazon EC2 reservation hours that you didn't use. It's converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
OnDemandCostOfRIHoursUsed
— (String
)How much your reservation costs if charged On-Demand rates.
NetRISavings
— (String
)How much you saved due to purchasing and utilizing reservation. Amazon Web Services calculates this by subtracting
TotalAmortizedFee
fromOnDemandCostOfRIHoursUsed
.TotalPotentialRISavings
— (String
)How much you might save if you use your entire reservation.
AmortizedUpfrontFee
— (String
)The upfront cost of your reservation. It's amortized over the reservation period.
AmortizedRecurringFee
— (String
)The monthly cost of your reservation. It's amortized over the reservation period.
TotalAmortizedFee
— (String
)The total cost of your reservation. It's amortized over the reservation period.
RICostForUnusedHours
— (String
)The cost of unused hours for your reservation.
RealizedSavings
— (String
)The realized savings because of purchasing and using a reservation.
UnrealizedSavings
— (String
)The unrealized savings because of purchasing and using a reservation.
NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
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. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
Service Reference:
Examples:
Calling the getRightsizingRecommendation operation
var params = { Service: 'STRING_VALUE', /* required */ Configuration: { BenefitsConsidered: true || false, /* required */ RecommendationTarget: SAME_INSTANCE_FAMILY | CROSS_INSTANCE_FAMILY /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, NextPageToken: 'STRING_VALUE', PageSize: 'NUMBER_VALUE' }; costexplorer.getRightsizingRecommendation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Filter
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
Configuration
— (map
)You can use Configuration to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings that are associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
RecommendationTarget
— required — (String
)The option to see recommendations within the same instance family or recommendations for instances across other families. The default value is
Possible values include:SAME_INSTANCE_FAMILY
."SAME_INSTANCE_FAMILY"
"CROSS_INSTANCE_FAMILY"
BenefitsConsidered
— required — (Boolean
)The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
TRUE
.
Service
— (String
)The specific service that you want recommendations for. The only valid value for
GetRightsizingRecommendation
is "AmazonEC2
".PageSize
— (Integer
)The number of recommendations that you want returned in a single response object.
NextPageToken
— (String
)The pagination token that indicates the next set of results that you want to retrieve.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Metadata
— (map
)Information regarding this specific recommendation set.
RecommendationId
— (String
)The ID for the recommendation.
GenerationTimestamp
— (String
)The timestamp for when Amazon Web Services made the recommendation.
LookbackPeriodInDays
— (String
)The number of days of previous usage that Amazon Web Services considers when making the recommendation.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
AdditionalMetadata
— (String
)Additional metadata that might be applicable to the recommendation.
Summary
— (map
)Summary of this recommendation set.
TotalRecommendationCount
— (String
)The total number of instance recommendations.
EstimatedTotalMonthlySavingsAmount
— (String
)The estimated total savings resulting from modifications, on a monthly basis.
SavingsCurrencyCode
— (String
)The currency code that Amazon Web Services used to calculate the savings.
SavingsPercentage
— (String
)The savings percentage based on the recommended modifications. It's relative to the total On-Demand costs that are associated with these instances.
RightsizingRecommendations
— (Array<map>
)Recommendations to rightsize resources.
AccountId
— (String
)The account that this recommendation is for.
CurrentInstance
— (map
)Context regarding the current instance.
ResourceId
— (String
)Resource ID of the current instance.
InstanceName
— (String
)The name that you given an instance. This field shows as blank if you haven't given the instance a name.
Tags
— (Array<map>
)Cost allocation resource tags that are applied to the instance.
Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
ResourceDetails
— (map
)Details about the resource and utilization.
EC2ResourceDetails
— (map
)Details for the Amazon EC2 resource.
HourlyOnDemandRate
— (String
)The hourly public On-Demand rate for the instance type.
InstanceType
— (String
)The type of Amazon Web Services instance.
Platform
— (String
)The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, license model, and software on an instance.
Region
— (String
)The Amazon Web Services Region of the instance.
Sku
— (String
)The SKU of the product.
Memory
— (String
)The memory capacity of the Amazon Web Services instance.
NetworkPerformance
— (String
)The network performance capacity of the Amazon Web Services instance.
Storage
— (String
)The disk storage of the Amazon Web Services instance. This doesn't include EBS storage.
Vcpu
— (String
)The number of VCPU cores in the Amazon Web Services instance type.
ResourceUtilization
— (map
)Utilization information of the current instance during the lookback period.
EC2ResourceUtilization
— (map
)The utilization of current Amazon EC2 instance.
MaxCpuUtilizationPercentage
— (String
)The maximum observed or expected CPU utilization of the instance.
MaxMemoryUtilizationPercentage
— (String
)The maximum observed or expected memory utilization of the instance.
MaxStorageUtilizationPercentage
— (String
)The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage.
EBSResourceUtilization
— (map
)The EBS field that contains a list of EBS metrics that are associated with the current instance.
EbsReadOpsPerSecond
— (String
)The maximum number of read operations per second.
EbsWriteOpsPerSecond
— (String
)The maximum number of write operations per second.
EbsReadBytesPerSecond
— (String
)The maximum size of read operations per second
EbsWriteBytesPerSecond
— (String
)The maximum size of write operations per second.
DiskResourceUtilization
— (map
)The field that contains a list of disk (local storage) metrics that are associated with the current instance.
DiskReadOpsPerSecond
— (String
)The maximum number of read operations per second.
DiskWriteOpsPerSecond
— (String
)The maximum number of write operations per second.
DiskReadBytesPerSecond
— (String
)The maximum read throughput operations per second.
DiskWriteBytesPerSecond
— (String
)The maximum write throughput operations per second.
NetworkResourceUtilization
— (map
)The network field that contains a list of network metrics that are associated with the current instance.
NetworkInBytesPerSecond
— (String
)The network inbound throughput utilization measured in Bytes per second (Bps).
NetworkOutBytesPerSecond
— (String
)The network outbound throughput utilization measured in Bytes per second (Bps).
NetworkPacketsInPerSecond
— (String
)The network inbound packets that are measured in packets per second.
NetworkPacketsOutPerSecond
— (String
)The network outbound packets that are measured in packets per second.
ReservationCoveredHoursInLookbackPeriod
— (String
)The number of hours during the lookback period that's covered by reservations.
SavingsPlansCoveredHoursInLookbackPeriod
— (String
)The number of hours during the lookback period that's covered by Savings Plans.
OnDemandHoursInLookbackPeriod
— (String
)The number of hours during the lookback period that's billed at On-Demand rates.
TotalRunningHoursInLookbackPeriod
— (String
)The total number of hours that the instance ran during the lookback period.
MonthlyCost
— (String
)The current On-Demand cost of operating this instance on a monthly basis.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to calculate the costs for this instance.
RightsizingType
— (String
)A recommendation to either terminate or modify the resource.
Possible values include:"TERMINATE"
"MODIFY"
ModifyRecommendationDetail
— (map
)The details for the modification recommendations.
TargetInstances
— (Array<map>
)Determines whether this instance type is the Amazon Web Services default recommendation.
EstimatedMonthlyCost
— (String
)The expected cost to operate this instance type on a monthly basis.
EstimatedMonthlySavings
— (String
)The estimated savings that result from modification, on a monthly basis.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to calculate the costs for this instance.
DefaultTargetInstance
— (Boolean
)Determines whether this recommendation is the defaulted Amazon Web Services recommendation.
ResourceDetails
— (map
)Details on the target instance type.
EC2ResourceDetails
— (map
)Details for the Amazon EC2 resource.
HourlyOnDemandRate
— (String
)The hourly public On-Demand rate for the instance type.
InstanceType
— (String
)The type of Amazon Web Services instance.
Platform
— (String
)The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, license model, and software on an instance.
Region
— (String
)The Amazon Web Services Region of the instance.
Sku
— (String
)The SKU of the product.
Memory
— (String
)The memory capacity of the Amazon Web Services instance.
NetworkPerformance
— (String
)The network performance capacity of the Amazon Web Services instance.
Storage
— (String
)The disk storage of the Amazon Web Services instance. This doesn't include EBS storage.
Vcpu
— (String
)The number of VCPU cores in the Amazon Web Services instance type.
ExpectedResourceUtilization
— (map
)The expected utilization metrics for target instance type.
EC2ResourceUtilization
— (map
)The utilization of current Amazon EC2 instance.
MaxCpuUtilizationPercentage
— (String
)The maximum observed or expected CPU utilization of the instance.
MaxMemoryUtilizationPercentage
— (String
)The maximum observed or expected memory utilization of the instance.
MaxStorageUtilizationPercentage
— (String
)The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage.
EBSResourceUtilization
— (map
)The EBS field that contains a list of EBS metrics that are associated with the current instance.
EbsReadOpsPerSecond
— (String
)The maximum number of read operations per second.
EbsWriteOpsPerSecond
— (String
)The maximum number of write operations per second.
EbsReadBytesPerSecond
— (String
)The maximum size of read operations per second
EbsWriteBytesPerSecond
— (String
)The maximum size of write operations per second.
DiskResourceUtilization
— (map
)The field that contains a list of disk (local storage) metrics that are associated with the current instance.
DiskReadOpsPerSecond
— (String
)The maximum number of read operations per second.
DiskWriteOpsPerSecond
— (String
)The maximum number of write operations per second.
DiskReadBytesPerSecond
— (String
)The maximum read throughput operations per second.
DiskWriteBytesPerSecond
— (String
)The maximum write throughput operations per second.
NetworkResourceUtilization
— (map
)The network field that contains a list of network metrics that are associated with the current instance.
NetworkInBytesPerSecond
— (String
)The network inbound throughput utilization measured in Bytes per second (Bps).
NetworkOutBytesPerSecond
— (String
)The network outbound throughput utilization measured in Bytes per second (Bps).
NetworkPacketsInPerSecond
— (String
)The network inbound packets that are measured in packets per second.
NetworkPacketsOutPerSecond
— (String
)The network outbound packets that are measured in packets per second.
PlatformDifferences
— (Array<String>
)Explains the actions that you might need to take to successfully migrate your workloads from the current instance type to the recommended instance type.
TerminateRecommendationDetail
— (map
)The details for termination recommendations.
EstimatedMonthlySavings
— (String
)The estimated savings that result from modification, on a monthly basis.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to calculate the costs for this instance.
FindingReasonCodes
— (Array<String>
)The list of possible reasons why the recommendation is generated, such as under- or over-utilization of specific metrics (for example, CPU, Memory, Network).
NextPageToken
— (String
)The token to retrieve the next set of results.
Configuration
— (map
)You can use Configuration to customize recommendations across two attributes. You can choose to view recommendations for instances within the same instance families or across different instance families. You can also choose to view your estimated savings that are associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
RecommendationTarget
— required — (String
)The option to see recommendations within the same instance family or recommendations for instances across other families. The default value is
Possible values include:SAME_INSTANCE_FAMILY
."SAME_INSTANCE_FAMILY"
"CROSS_INSTANCE_FAMILY"
BenefitsConsidered
— required — (Boolean
)The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
TRUE
.
-
(AWS.Response)
—
Returns:
getSavingsPlanPurchaseRecommendationDetails(params = {}, callback) ⇒ AWS.Request
Retrieves the details for a Savings Plan recommendation. These details include the hourly data-points that construct the cost, coverage, and utilization charts.
Service Reference:
Examples:
Calling the getSavingsPlanPurchaseRecommendationDetails operation
var params = { RecommendationDetailId: 'STRING_VALUE' /* required */ }; costexplorer.getSavingsPlanPurchaseRecommendationDetails(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
RecommendationDetailId
— (String
)The ID that is associated with the Savings Plan recommendation.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:RecommendationDetailId
— (String
)The ID that is associated with the Savings Plan recommendation.
RecommendationDetailData
— (map
)Contains detailed information about a specific Savings Plan recommendation.
AccountScope
— (String
)The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to PAYER. If the value is LINKED, recommendations are calculated for individual member accounts only.
Possible values include:"PAYER"
"LINKED"
LookbackPeriodInDays
— (String
)How many days of previous usage that Amazon Web Services considers when making this recommendation.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
SavingsPlansType
— (String
)The requested Savings Plan recommendation type.
Possible values include:"COMPUTE_SP"
"EC2_INSTANCE_SP"
"SAGEMAKER_SP"
TermInYears
— (String
)The term of the commitment in years.
Possible values include:"ONE_YEAR"
"THREE_YEARS"
PaymentOption
— (String
)The payment option for the commitment (for example, All Upfront or No Upfront).
Possible values include:"NO_UPFRONT"
"PARTIAL_UPFRONT"
"ALL_UPFRONT"
"LIGHT_UTILIZATION"
"MEDIUM_UTILIZATION"
"HEAVY_UTILIZATION"
AccountId
— (String
)The AccountID that the recommendation is generated for.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to generate the recommendation and present potential savings.
InstanceFamily
— (String
)The instance family of the recommended Savings Plan.
Region
— (String
)The region the recommendation is generated for.
OfferingId
— (String
)The unique ID that's used to distinguish Savings Plans from one another.
GenerationTimestamp
— (String
)The period of time that you want the usage and costs for.
LatestUsageTimestamp
— (String
)The period of time that you want the usage and costs for.
CurrentAverageHourlyOnDemandSpend
— (String
)The average value of hourly On-Demand spend over the lookback period of the applicable usage type.
CurrentMaximumHourlyOnDemandSpend
— (String
)The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.
CurrentMinimumHourlyOnDemandSpend
— (String
)The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.
EstimatedAverageUtilization
— (String
)The estimated utilization of the recommended Savings Plan.
EstimatedMonthlySavingsAmount
— (String
)The estimated monthly savings amount based on the recommended Savings Plan.
EstimatedOnDemandCost
— (String
)The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the length of the lookback period.
EstimatedOnDemandCostWithCurrentCommitment
— (String
)The estimated On-Demand costs you expect with no additional commitment, based on your usage of the selected time period and the Savings Plan you own.
EstimatedROI
— (String
)The estimated return on investment that's based on the recommended Savings Plan that you purchased. This is calculated as estimatedSavingsAmount/estimatedSPCost*100.
EstimatedSPCost
— (String
)The cost of the recommended Savings Plan over the length of the lookback period.
EstimatedSavingsAmount
— (String
)The estimated savings amount that's based on the recommended Savings Plan over the length of the lookback period.
EstimatedSavingsPercentage
— (String
)The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.
ExistingHourlyCommitment
— (String
)The existing hourly commitment for the Savings Plan type.
HourlyCommitmentToPurchase
— (String
)The recommended hourly commitment level for the Savings Plan type and the configuration that's based on the usage during the lookback period.
UpfrontCost
— (String
)The upfront cost of the recommended Savings Plan, based on the selected payment option.
CurrentAverageCoverage
— (String
)The average value of hourly coverage over the lookback period.
EstimatedAverageCoverage
— (String
)The estimated coverage of the recommended Savings Plan.
MetricsOverLookbackPeriod
— (Array<map>
)The related hourly cost, coverage, and utilization metrics over the lookback period.
StartTime
— (String
)The period of time that you want the usage and costs for.
EstimatedOnDemandCost
— (String
)The remaining On-Demand cost estimated to not be covered by the recommended Savings Plan, over the length of the lookback period.
CurrentCoverage
— (String
)The current amount of Savings Plans eligible usage that the Savings Plan covered.
EstimatedCoverage
— (String
)The estimated coverage amount based on the recommended Savings Plan.
EstimatedNewCommitmentUtilization
— (String
)The estimated utilization for the recommended Savings Plan.
-
(AWS.Response)
—
Returns:
getSavingsPlansCoverage(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT
-
REGION
-
SERVICE
-
INSTANCE_FAMILY
To determine valid values for a dimension, use the
GetDimensionValues
operation.Service Reference:
Examples:
Calling the getSavingsPlansCoverage operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Granularity: DAILY | MONTHLY | HOURLY, GroupBy: [ { Key: 'STRING_VALUE', Type: DIMENSION | TAG | COST_CATEGORY }, /* more items */ ], MaxResults: 'NUMBER_VALUE', Metrics: [ 'STRING_VALUE', /* more items */ ], NextToken: 'STRING_VALUE', SortBy: { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING } }; costexplorer.getSavingsPlansCoverage(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The time period that you want the usage and costs for. The
Start
date must be within 13 months. TheEnd
date must be after theStart
date, and before the current date. Future dates can't be used as anEnd
date.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
GroupBy
— (Array<map>
)You can group the data using the attributes
INSTANCE_FAMILY
,REGION
, orSERVICE
.Type
— (String
)The string that represents the type of group.
Possible values include:"DIMENSION"
"TAG"
"COST_CATEGORY"
Key
— (String
)The string that represents a key for a specified group.
Granularity
— (String
)The granularity of the Amazon Web Services cost data for your Savings Plans.
Granularity
can't be set ifGroupBy
is set.The
Possible values include:GetSavingsPlansCoverage
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters Savings Plans coverage data by dimensions. You can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT
-
REGION
-
SERVICE
-
INSTANCE_FAMILY
GetSavingsPlansCoverage
uses the same Expression object as the other operations, but onlyAND
is supported among each dimension. If there are multiple values for a dimension, they are OR'd together.Cost category is also supported.
Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
Metrics
— (Array<String>
)The measurement that you want your Savings Plans coverage reported in. The only valid value is
SpendCoveredBySavingsPlans
.NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of items to be returned in a response. The default is
20
, with a minimum value of1
.SortBy
— (map
)The value that you want to sort the data by.
The following values are supported for
Key
:-
SpendCoveredBySavingsPlan
-
OnDemandCost
-
CoveragePercentage
-
TotalCost
-
InstanceFamily
-
Region
-
Service
The supported values for
SortOrder
areASCENDING
andDESCENDING
.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SavingsPlansCoverages
— (Array<map>
)The amount of spend that your Savings Plans covered.
Attributes
— (map<String>
)The attribute that applies to a specific
Dimension
.Coverage
— (map
)The amount of Savings Plans eligible usage that the Savings Plans covered.
SpendCoveredBySavingsPlans
— (String
)The amount of your Amazon Web Services usage that's covered by a Savings Plans.
OnDemandCost
— (String
)The cost of your Amazon Web Services usage at the public On-Demand rate.
TotalCost
— (String
)The total cost of your Amazon Web Services usage, regardless of your purchase option.
CoveragePercentage
— (String
)The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage in an account (or set of accounts).
TimePeriod
— (map
)The time period of the request.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getSavingsPlansPurchaseRecommendation(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans recommendations for your account. First use
StartSavingsPlansPurchaseRecommendationGeneration
to generate a new set of recommendations, and then useGetSavingsPlansPurchaseRecommendation
to retrieve them.Service Reference:
Examples:
Calling the getSavingsPlansPurchaseRecommendation operation
var params = { LookbackPeriodInDays: SEVEN_DAYS | THIRTY_DAYS | SIXTY_DAYS, /* required */ PaymentOption: NO_UPFRONT | PARTIAL_UPFRONT | ALL_UPFRONT | LIGHT_UTILIZATION | MEDIUM_UTILIZATION | HEAVY_UTILIZATION, /* required */ SavingsPlansType: COMPUTE_SP | EC2_INSTANCE_SP | SAGEMAKER_SP, /* required */ TermInYears: ONE_YEAR | THREE_YEARS, /* required */ AccountScope: PAYER | LINKED, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, NextPageToken: 'STRING_VALUE', PageSize: 'NUMBER_VALUE' }; costexplorer.getSavingsPlansPurchaseRecommendation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SavingsPlansType
— (String
)The Savings Plans recommendation type that's requested.
Possible values include:"COMPUTE_SP"
"EC2_INSTANCE_SP"
"SAGEMAKER_SP"
TermInYears
— (String
)The savings plan recommendation term that's used to generate these recommendations.
Possible values include:"ONE_YEAR"
"THREE_YEARS"
PaymentOption
— (String
)The payment option that's used to generate these recommendations.
Possible values include:"NO_UPFRONT"
"PARTIAL_UPFRONT"
"ALL_UPFRONT"
"LIGHT_UTILIZATION"
"MEDIUM_UTILIZATION"
"HEAVY_UTILIZATION"
AccountScope
— (String
)The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to
Possible values include:PAYER
. If the value isLINKED
, recommendations are calculated for individual member accounts only."PAYER"
"LINKED"
NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
PageSize
— (Integer
)The number of recommendations that you want returned in a single response object.
LookbackPeriodInDays
— (String
)The lookback period that's used to generate the recommendation.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
Filter
— (map
)You can filter your recommendations by Account ID with the
LINKED_ACCOUNT
dimension. To filter your recommendations by Account ID, specifyKey
asLINKED_ACCOUNT
andValue
as the comma-separated Acount ID(s) that you want to see Savings Plans purchase recommendations for.For GetSavingsPlansPurchaseRecommendation, the
Filter
doesn't includeCostCategories
orTags
. It only includesDimensions
. WithDimensions
,Key
must beLINKED_ACCOUNT
andValue
can be a single Account ID or multiple comma-separated Account IDs that you want to see Savings Plans Purchase Recommendations for.AND
andOR
operators are not supported.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Metadata
— (map
)Information that regards this specific recommendation set.
RecommendationId
— (String
)The unique identifier for the recommendation set.
GenerationTimestamp
— (String
)The timestamp that shows when the recommendations were generated.
AdditionalMetadata
— (String
)Additional metadata that might be applicable to the recommendation.
SavingsPlansPurchaseRecommendation
— (map
)Contains your request parameters, Savings Plan Recommendations Summary, and Details.
AccountScope
— (String
)The account scope that you want your recommendations for. Amazon Web Services calculates recommendations that include the management account and member accounts if the value is set to
Possible values include:PAYER
. If the value isLINKED
, recommendations are calculated for individual member accounts only."PAYER"
"LINKED"
SavingsPlansType
— (String
)The requested Savings Plans recommendation type.
Possible values include:"COMPUTE_SP"
"EC2_INSTANCE_SP"
"SAGEMAKER_SP"
TermInYears
— (String
)The Savings Plans recommendation term in years. It's used to generate the recommendation.
Possible values include:"ONE_YEAR"
"THREE_YEARS"
PaymentOption
— (String
)The payment option that's used to generate the recommendation.
Possible values include:"NO_UPFRONT"
"PARTIAL_UPFRONT"
"ALL_UPFRONT"
"LIGHT_UTILIZATION"
"MEDIUM_UTILIZATION"
"HEAVY_UTILIZATION"
LookbackPeriodInDays
— (String
)The lookback period in days that's used to generate the recommendation.
Possible values include:"SEVEN_DAYS"
"THIRTY_DAYS"
"SIXTY_DAYS"
SavingsPlansPurchaseRecommendationDetails
— (Array<map>
)Details for the Savings Plans that we recommend that you purchase to cover existing Savings Plans eligible workloads.
SavingsPlansDetails
— (map
)Details for your recommended Savings Plans.
Region
— (String
)A collection of Amazon Web Services resources in a geographic area. Each Amazon Web Services Region is isolated and independent of the other Regions.
InstanceFamily
— (String
)A group of instance types that Savings Plans applies to.
OfferingId
— (String
)The unique ID that's used to distinguish Savings Plans from one another.
AccountId
— (String
)The
AccountID
the recommendation is generated for.UpfrontCost
— (String
)The upfront cost of the recommended Savings Plans, based on the selected payment option.
EstimatedROI
— (String
)The estimated return on investment that's based on the recommended Savings Plans that you purchased. This is calculated as
estimatedSavingsAmount
/estimatedSPCost
*100.CurrencyCode
— (String
)The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
EstimatedSPCost
— (String
)The cost of the recommended Savings Plans over the length of the lookback period.
EstimatedOnDemandCost
— (String
)The remaining On-Demand cost estimated to not be covered by the recommended Savings Plans, over the length of the lookback period.
EstimatedOnDemandCostWithCurrentCommitment
— (String
)The estimated On-Demand costs you expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.
EstimatedSavingsAmount
— (String
)The estimated savings amount that's based on the recommended Savings Plans over the length of the lookback period.
EstimatedSavingsPercentage
— (String
)The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.
HourlyCommitmentToPurchase
— (String
)The recommended hourly commitment level for the Savings Plans type and the configuration that's based on the usage during the lookback period.
EstimatedAverageUtilization
— (String
)The estimated utilization of the recommended Savings Plans.
EstimatedMonthlySavingsAmount
— (String
)The estimated monthly savings amount based on the recommended Savings Plans.
CurrentMinimumHourlyOnDemandSpend
— (String
)The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.
CurrentMaximumHourlyOnDemandSpend
— (String
)The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.
CurrentAverageHourlyOnDemandSpend
— (String
)The average value of hourly On-Demand spend over the lookback period of the applicable usage type.
RecommendationDetailId
— (String
)Contains detailed information about a specific Savings Plan recommendation.
SavingsPlansPurchaseRecommendationSummary
— (map
)Summary metrics for your Savings Plans Recommendations.
EstimatedROI
— (String
)The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
CurrencyCode
— (String
)The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
EstimatedTotalCost
— (String
)The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost of Savings Plans during this term, and the remaining On-Demand usage.
CurrentOnDemandSpend
— (String
)The current total on demand spend of the applicable usage types over the lookback period.
EstimatedSavingsAmount
— (String
)The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
TotalRecommendationCount
— (String
)The aggregate number of Savings Plans recommendations that exist for your account.
DailyCommitmentToPurchase
— (String
)The recommended Savings Plans cost on a daily (24 hourly) basis.
HourlyCommitmentToPurchase
— (String
)The recommended hourly commitment that's based on the recommendation parameters.
EstimatedSavingsPercentage
— (String
)The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated as
estimatedSavingsAmount
/CurrentOnDemandSpend
*100.EstimatedMonthlySavingsAmount
— (String
)The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
EstimatedOnDemandCostWithCurrentCommitment
— (String
)The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the selected time period and the Savings Plans you own.
NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getSavingsPlansUtilization(params = {}, callback) ⇒ AWS.Request
Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use
GetDimensionValues
inSAVINGS_PLANS
to determine the possible dimension values.Note: You can't group by any dimension values forGetSavingsPlansUtilization
.Service Reference:
Examples:
Calling the getSavingsPlansUtilization operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Granularity: DAILY | MONTHLY | HOURLY, SortBy: { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING } }; costexplorer.getSavingsPlansUtilization(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The time period that you want the usage and costs for. The
Start
date must be within 13 months. TheEnd
date must be after theStart
date, and before the current date. Future dates can't be used as anEnd
date.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Granularity
— (String
)The granularity of the Amazon Web Services utillization data for your Savings Plans.
The
Possible values include:GetSavingsPlansUtilization
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:
-
LINKED_ACCOUNT
-
SAVINGS_PLAN_ARN
-
SAVINGS_PLANS_TYPE
-
REGION
-
PAYMENT_OPTION
-
INSTANCE_TYPE_FAMILY
GetSavingsPlansUtilization
uses the same Expression object as the other operations, but onlyAND
is supported among each dimension.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
SortBy
— (map
)The value that you want to sort the data by.
The following values are supported for
Key
:-
UtilizationPercentage
-
TotalCommitment
-
UsedCommitment
-
UnusedCommitment
-
NetSavings
The supported values for
SortOrder
areASCENDING
andDESCENDING
.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SavingsPlansUtilizationsByTime
— (Array<map>
)The amount of cost/commitment that you used your Savings Plans. You can use it to specify date ranges.
TimePeriod
— required — (map
)The time period of the request.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Utilization
— required — (map
)A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
TotalCommitment
— (String
)The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).
UsedCommitment
— (String
)The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.
UnusedCommitment
— (String
)The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.
UtilizationPercentage
— (String
)The amount of
UsedCommitment
divided by theTotalCommitment
for your Savings Plans.
Savings
— (map
)The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and also the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate.NetSavings
— (String
)The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
OnDemandCostEquivalent
— (String
)How much the amount that the usage would have cost if it was accrued at the On-Demand rate.
AmortizedCommitment
— (map
)The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.
AmortizedRecurringCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with either a
Partial
or aNoUpfront
.AmortizedUpfrontCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with an
Upfront
orPartialUpfront
Savings Plans.TotalAmortizedCommitment
— (String
)The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
Total
— (map
)The total amount of cost/commitment that you used your Savings Plans, regardless of date ranges.
Utilization
— required — (map
)A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
TotalCommitment
— (String
)The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).
UsedCommitment
— (String
)The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.
UnusedCommitment
— (String
)The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.
UtilizationPercentage
— (String
)The amount of
UsedCommitment
divided by theTotalCommitment
for your Savings Plans.
Savings
— (map
)The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and also the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate.NetSavings
— (String
)The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
OnDemandCostEquivalent
— (String
)How much the amount that the usage would have cost if it was accrued at the On-Demand rate.
AmortizedCommitment
— (map
)The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.
AmortizedRecurringCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with either a
Partial
or aNoUpfront
.AmortizedUpfrontCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with an
Upfront
orPartialUpfront
Savings Plans.TotalAmortizedCommitment
— (String
)The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
-
(AWS.Response)
—
Returns:
getSavingsPlansUtilizationDetails(params = {}, callback) ⇒ AWS.Request
Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to
GetSavingsPlanUtilization
, but you have the option to make multiple calls toGetSavingsPlanUtilizationDetails
by providing individual dates. You can useGetDimensionValues
inSAVINGS_PLANS
to determine the possible dimension values.Note:GetSavingsPlanUtilizationDetails
internally groups data bySavingsPlansArn
.Service Reference:
Examples:
Calling the getSavingsPlansUtilizationDetails operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, DataType: [ ATTRIBUTES | UTILIZATION | AMORTIZED_COMMITMENT | SAVINGS, /* more items */ ], Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', SortBy: { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING } }; costexplorer.getSavingsPlansUtilizationDetails(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The time period that you want the usage and costs for. The
Start
date must be within 13 months. TheEnd
date must be after theStart
date, and before the current date. Future dates can't be used as anEnd
date.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Filter
— (map
)Filters Savings Plans utilization coverage data for active Savings Plans dimensions. You can filter data with the following dimensions:
-
LINKED_ACCOUNT
-
SAVINGS_PLAN_ARN
-
REGION
-
PAYMENT_OPTION
-
INSTANCE_TYPE_FAMILY
GetSavingsPlansUtilizationDetails
uses the same Expression object as the other operations, but onlyAND
is supported among each dimension.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
DataType
— (Array<String>
)The data type.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of items to be returned in a response. The default is
20
, with a minimum value of1
.SortBy
— (map
)The value that you want to sort the data by.
The following values are supported for
Key
:-
UtilizationPercentage
-
TotalCommitment
-
UsedCommitment
-
UnusedCommitment
-
NetSavings
-
AmortizedRecurringCommitment
-
AmortizedUpfrontCommitment
The supported values for
SortOrder
areASCENDING
andDESCENDING
.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SavingsPlansUtilizationDetails
— (Array<map>
)Retrieves a single daily or monthly Savings Plans utilization rate and details for your account.
SavingsPlanArn
— (String
)The unique Amazon Resource Name (ARN) for a particular Savings Plan.
Attributes
— (map<String>
)The attribute that applies to a specific
Dimension
.Utilization
— (map
)A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
TotalCommitment
— (String
)The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).
UsedCommitment
— (String
)The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.
UnusedCommitment
— (String
)The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.
UtilizationPercentage
— (String
)The amount of
UsedCommitment
divided by theTotalCommitment
for your Savings Plans.
Savings
— (map
)The amount saved by using existing Savings Plans. Savings returns both net savings from savings plans and also the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate.NetSavings
— (String
)The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
OnDemandCostEquivalent
— (String
)How much the amount that the usage would have cost if it was accrued at the On-Demand rate.
AmortizedCommitment
— (map
)The total amortized commitment for a Savings Plans. Includes the sum of the upfront and recurring Savings Plans fees.
AmortizedRecurringCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with either a
Partial
or aNoUpfront
.AmortizedUpfrontCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with an
Upfront
orPartialUpfront
Savings Plans.TotalAmortizedCommitment
— (String
)The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
Total
— (map
)The total Savings Plans utilization, regardless of time period.
Utilization
— required — (map
)A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
TotalCommitment
— (String
)The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).
UsedCommitment
— (String
)The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.
UnusedCommitment
— (String
)The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.
UtilizationPercentage
— (String
)The amount of
UsedCommitment
divided by theTotalCommitment
for your Savings Plans.
Savings
— (map
)The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and also the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate.NetSavings
— (String
)The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
OnDemandCostEquivalent
— (String
)How much the amount that the usage would have cost if it was accrued at the On-Demand rate.
AmortizedCommitment
— (map
)The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.
AmortizedRecurringCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with either a
Partial
or aNoUpfront
.AmortizedUpfrontCommitment
— (String
)The amortized amount of your Savings Plans commitment that was purchased with an
Upfront
orPartialUpfront
Savings Plans.TotalAmortizedCommitment
— (String
)The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
TimePeriod
— (map
)The time period of the request.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
getTags(params = {}, callback) ⇒ AWS.Request
Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
Service Reference:
Examples:
Calling the getTags operation
var params = { TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, MaxResults: 'NUMBER_VALUE', NextPageToken: 'STRING_VALUE', SearchString: 'STRING_VALUE', SortBy: [ { Key: 'STRING_VALUE', /* required */ SortOrder: ASCENDING | DESCENDING }, /* more items */ ], TagKey: 'STRING_VALUE' }; costexplorer.getTags(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SearchString
— (String
)The value that you want to search for.
TimePeriod
— (map
)The start and end dates for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
TagKey
— (String
)The key of the tag that you want to return values for.
Filter
— (map
)Use
Expression
to filter in various Cost Explorer APIs.Not all
Expression
types are supported in each API. Refer to the documentation for each specific API to see what is supported.There are two patterns:
-
Simple dimension values.
-
There are three types of simple dimension values:
CostCategories
,Tags
, andDimensions
.-
Specify the
CostCategories
field to define a filter that acts on Cost Categories. -
Specify the
Tags
field to define a filter that acts on Cost Allocation Tags. -
Specify the
Dimensions
field to define a filter that acts on theDimensionValues
.
-
-
For each filter type, you can set the dimension name and values for the filters that you plan to use.
-
For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. -
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } }
-
As shown in the previous example, lists of dimension values are combined with
OR
when applying the filter.
-
-
You can also set different match options to further control how the filter behaves. Not all APIs support match options. Refer to the documentation for each specific API to see what is supported.
-
For example, you can filter for linked account names that start with "a".
-
The corresponding
Expression
for this example is as follows:{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] } }
-
-
-
Compound
Expression
types with logical operations.-
You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. By doing this, you can filter by more advanced options. -
For example, you can filter by
((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. -
The corresponding
Expression
for this example is as follows:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note: Because eachExpression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error:{ "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
The following is an example of the corresponding error message:"Expression has more than one roots. Only one root operator is allowed for each expression: And, Or, Not, Dimensions, Tags, CostCategories"
-
Note: For theGetRightsizingRecommendation
action, a combination of OR and NOT isn't supported. OR isn't supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
. For theGetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR aren't supported. Dimensions are limited toLINKED_ACCOUNT
.Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
SortBy
— (Array<map>
)The value that you want to sort the data by.
The key represents cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
The supported values for
SortOrder
areASCENDING
andDESCENDING
.When you use
SortBy
,NextPageToken
andSearchString
aren't supported.Key
— required — (String
)The key that's used to sort the data.
SortOrder
— (String
)The order that's used to sort the data.
Possible values include:"ASCENDING"
"DESCENDING"
-
MaxResults
— (Integer
)This field is only used when SortBy is provided in the request. The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter.
For
GetTags
, MaxResults has an upper quota of 1000.NextPageToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextPageToken
— (String
)The token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
Tags
— (Array<String>
)The tags that match your request.
ReturnSize
— (Integer
)The number of query results that Amazon Web Services returns at a time.
TotalSize
— (Integer
)The total number of query results.
-
(AWS.Response)
—
Returns:
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.
Service Reference:
Examples:
Calling the getUsageForecast operation
var params = { Granularity: DAILY | MONTHLY | HOURLY, /* required */ Metric: BLENDED_COST | UNBLENDED_COST | AMORTIZED_COST | NET_UNBLENDED_COST | NET_AMORTIZED_COST | USAGE_QUANTITY | NORMALIZED_USAGE_AMOUNT, /* required */ TimePeriod: { /* required */ End: 'STRING_VALUE', /* required */ Start: 'STRING_VALUE' /* required */ }, Filter: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, PredictionIntervalLevel: 'NUMBER_VALUE' }; costexplorer.getUsageForecast(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TimePeriod
— (map
)The start and end dates of the period that you want to retrieve usage forecast for. The start date is included in the period, but the end date isn't included in the period. For example, if
start
is2017-01-01
andend
is2017-05-01
, then the cost and usage data is retrieved from2017-01-01
up to and including2017-04-30
but not including2017-05-01
. The start date must be equal to or later than the current date to avoid a validation error.Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
Metric
— (String
)Which metric Cost Explorer uses to create your forecast.
Valid values for a
GetUsageForecast
call are the following:-
USAGE_QUANTITY
-
NORMALIZED_USAGE_AMOUNT
"BLENDED_COST"
"UNBLENDED_COST"
"AMORTIZED_COST"
"NET_UNBLENDED_COST"
"NET_AMORTIZED_COST"
"USAGE_QUANTITY"
"NORMALIZED_USAGE_AMOUNT"
-
Granularity
— (String
)How granular you want the forecast to be. You can get 3 months of
DAILY
forecasts or 12 months ofMONTHLY
forecasts.The
Possible values include:GetUsageForecast
operation supports onlyDAILY
andMONTHLY
granularities."DAILY"
"MONTHLY"
"HOURLY"
Filter
— (map
)The filters that you want to use to filter your forecast. The
GetUsageForecast
API supports filtering by the following dimensions:-
AZ
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
LINKED_ACCOUNT_NAME
-
OPERATION
-
PURCHASE_TYPE
-
REGION
-
SERVICE
-
USAGE_TYPE
-
USAGE_TYPE_GROUP
-
RECORD_TYPE
-
OPERATING_SYSTEM
-
TENANCY
-
SCOPE
-
PLATFORM
-
SUBSCRIPTION_ID
-
LEGAL_ENTITY_NAME
-
DEPLOYMENT_OPTION
-
DATABASE_ENGINE
-
INSTANCE_TYPE_FAMILY
-
BILLING_ENTITY
-
RESERVATION_ID
-
SAVINGS_PLAN_ARN
Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
PredictionIntervalLevel
— (Integer
)Amazon Web Services Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Total
— (map
)How much you're forecasted to use over the forecast period.
Amount
— (String
)The actual number that represents the metric.
Unit
— (String
)The unit that the metric is given in.
ForecastResultsByTime
— (Array<map>
)The forecasts for your query, in order. For
DAILY
forecasts, this is a list of days. ForMONTHLY
forecasts, this is a list of months.TimePeriod
— (map
)The period of time that the forecast covers.
Start
— required — (String
)The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, Amazon Web Services retrieves cost and usage data starting at2017-01-01
up to the end date. The start date must be equal to or no later than the current date to avoid a validation error.End
— required — (String
)The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, Amazon Web Services retrieves cost and usage data from the start date up to, but not including,2017-05-01
.
MeanValue
— (String
)The mean value of the forecast.
PredictionIntervalLowerBound
— (String
)The lower limit for the prediction interval.
PredictionIntervalUpperBound
— (String
)The upper limit for the prediction interval.
-
(AWS.Response)
—
Returns:
listCostAllocationTagBackfillHistory(params = {}, callback) ⇒ AWS.Request
Retrieves a list of your historical cost allocation tag backfill requests.
Service Reference:
Examples:
Calling the listCostAllocationTagBackfillHistory operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; costexplorer.listCostAllocationTagBackfillHistory(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The maximum number of objects that are returned for this request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:BackfillRequests
— (Array<map>
)The list of historical cost allocation tag backfill requests.
BackfillFrom
— (String
)The date the backfill starts from.
RequestedAt
— (String
)The time when the backfill was requested.
CompletedAt
— (String
)The backfill completion time.
BackfillStatus
— (String
)The status of the cost allocation tag backfill request.
Possible values include:"SUCCEEDED"
"PROCESSING"
"FAILED"
LastUpdatedAt
— (String
)The time when the backfill status was last updated.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
listCostAllocationTags(params = {}, callback) ⇒ AWS.Request
Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
Service Reference:
Examples:
Calling the listCostAllocationTags operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', Status: Active | Inactive, TagKeys: [ 'STRING_VALUE', /* more items */ ], Type: AWSGenerated | UserDefined }; costexplorer.listCostAllocationTags(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Status
— (String
)The status of cost allocation tag keys that are returned for this request.
Possible values include:"Active"
"Inactive"
TagKeys
— (Array<String>
)The list of cost allocation tag keys that are returned for this request.
Type
— (String
)The type of
Possible values include:CostAllocationTag
object that are returned for this request. TheAWSGenerated
type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes. TheUserDefined
type tags are tags that you define, create, and apply to resources."AWSGenerated"
"UserDefined"
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The maximum number of objects that are returned for this request. By default, the request returns 100 results.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostAllocationTags
— (Array<map>
)A list of cost allocation tags that includes the detailed metadata for each one.
TagKey
— required — (String
)The key for the cost allocation tag.
Type
— required — (String
)The type of cost allocation tag. You can use
Possible values include:AWSGenerated
orUserDefined
type tags.AWSGenerated
type tags are tags that Amazon Web Services defines and applies to support Amazon Web Services resources for cost allocation purposes.UserDefined
type tags are tags that you define, create, and apply to resources."AWSGenerated"
"UserDefined"
Status
— required — (String
)The status of a cost allocation tag.
Possible values include:"Active"
"Inactive"
LastUpdatedDate
— (String
)The last date that the tag was either activated or deactivated.
LastUsedDate
— (String
)The last month that the tag was used on an Amazon Web Services resource.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
listCostCategoryDefinitions(params = {}, callback) ⇒ AWS.Request
Returns the name, Amazon Resource Name (ARN),
NumberOfRules
and effective dates of all Cost Categories defined in the account. You have the option to useEffectiveOn
to return a list of Cost Categories that were active on a specific date. If there is noEffectiveOn
specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective,EffectiveEnd
is omitted in the response.ListCostCategoryDefinitions
supports pagination. The request can have aMaxResults
range up to 100.Service Reference:
Examples:
Calling the listCostCategoryDefinitions operation
var params = { EffectiveOn: 'STRING_VALUE', MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; costexplorer.listCostCategoryDefinitions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
EffectiveOn
— (String
)The date when the Cost Category was effective.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
MaxResults
— (Integer
)The number of entries a paginated response contains.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostCategoryReferences
— (Array<map>
)A reference to a Cost Category that contains enough information to identify the Cost Category.
CostCategoryArn
— (String
)The unique identifier for your Cost Category.
Name
— (String
)The unique name of the Cost Category.
EffectiveStart
— (String
)The Cost Category's effective start date.
EffectiveEnd
— (String
)The Cost Category's effective end date.
NumberOfRules
— (Integer
)The number of rules that are associated with a specific Cost Category.
ProcessingStatus
— (Array<map>
)The list of processing statuses for Cost Management products for a specific cost category.
Component
— (String
)The Cost Management product name of the applied status.
Possible values include:"COST_EXPLORER"
Status
— (String
)The process status for a specific cost category.
Possible values include:"PROCESSING"
"APPLIED"
Values
— (Array<String>
)A list of unique cost category values in a specific cost category.
DefaultValue
— (String
)The default value for the cost category.
NextToken
— (String
)The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
-
(AWS.Response)
—
Returns:
listSavingsPlansPurchaseRecommendationGeneration(params = {}, callback) ⇒ AWS.Request
Retrieves a list of your historical recommendation generations within the past 30 days.
Service Reference:
Examples:
Calling the listSavingsPlansPurchaseRecommendationGeneration operation
var params = { GenerationStatus: SUCCEEDED | PROCESSING | FAILED, NextPageToken: 'STRING_VALUE', PageSize: 'NUMBER_VALUE', RecommendationIds: [ 'STRING_VALUE', /* more items */ ] }; costexplorer.listSavingsPlansPurchaseRecommendationGeneration(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
GenerationStatus
— (String
)The status of the recommendation generation.
Possible values include:"SUCCEEDED"
"PROCESSING"
"FAILED"
RecommendationIds
— (Array<String>
)The IDs for each specific recommendation.
PageSize
— (Integer
)The number of recommendations that you want returned in a single response object.
NextPageToken
— (String
)The token to retrieve the next set of results.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:GenerationSummaryList
— (Array<map>
)The list of historical recommendation generations.
RecommendationId
— (String
)Indicates the ID for this specific recommendation.
GenerationStatus
— (String
)Indicates whether the recommendation generation succeeded, is processing, or failed.
Possible values include:"SUCCEEDED"
"PROCESSING"
"FAILED"
GenerationStartedTime
— (String
)Indicates the start time of the recommendation generation.
GenerationCompletionTime
— (String
)Indicates the completion time of the recommendation generation.
EstimatedCompletionTime
— (String
)Indicates the estimated time for when the recommendation generation will complete.
NextPageToken
— (String
)The token to retrieve the next set of results.
-
(AWS.Response)
—
Returns:
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
Service Reference:
Examples:
Calling the listTagsForResource operation
var params = { ResourceArn: 'STRING_VALUE' /* required */ }; costexplorer.listTagsForResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ResourceTags
— (Array<map>
)A list of tag key value pairs that are associated with the resource.
Key
— required — (String
)The key that's associated with the tag.
Value
— required — (String
)The value that's associated with the tag.
-
(AWS.Response)
—
Returns:
provideAnomalyFeedback(params = {}, callback) ⇒ AWS.Request
Modifies the feedback property of a given cost anomaly.
Service Reference:
Examples:
Calling the provideAnomalyFeedback operation
var params = { AnomalyId: 'STRING_VALUE', /* required */ Feedback: YES | NO | PLANNED_ACTIVITY /* required */ }; costexplorer.provideAnomalyFeedback(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
AnomalyId
— (String
)A cost anomaly ID.
Feedback
— (String
)Describes whether the cost anomaly was a planned activity or you considered it an anomaly.
Possible values include:"YES"
"NO"
"PLANNED_ACTIVITY"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AnomalyId
— (String
)The ID of the modified cost anomaly.
-
(AWS.Response)
—
Returns:
startCostAllocationTagBackfill(params = {}, callback) ⇒ AWS.Request
Request a cost allocation tag backfill. This will backfill the activation status (either
active
orinactive
) for all tag keys frompara:BackfillFrom
up to the when this request is made.You can request a backfill once every 24 hours.
Service Reference:
Examples:
Calling the startCostAllocationTagBackfill operation
var params = { BackfillFrom: 'STRING_VALUE' /* required */ }; costexplorer.startCostAllocationTagBackfill(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
BackfillFrom
— (String
)The date you want the backfill to start from. The date can only be a first day of the month (a billing start date). Dates can't precede the previous twelve months, or in the future.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:BackfillRequest
— (map
)An object containing detailed metadata of your new backfill request.
BackfillFrom
— (String
)The date the backfill starts from.
RequestedAt
— (String
)The time when the backfill was requested.
CompletedAt
— (String
)The backfill completion time.
BackfillStatus
— (String
)The status of the cost allocation tag backfill request.
Possible values include:"SUCCEEDED"
"PROCESSING"
"FAILED"
LastUpdatedAt
— (String
)The time when the backfill status was last updated.
-
(AWS.Response)
—
Returns:
startSavingsPlansPurchaseRecommendationGeneration(params = {}, callback) ⇒ AWS.Request
Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.
Note:StartSavingsPlansPurchaseRecommendationGeneration
has no request syntax because no input parameters are needed to support this operation.Service Reference:
Examples:
Calling the startSavingsPlansPurchaseRecommendationGeneration operation
var params = { }; costexplorer.startSavingsPlansPurchaseRecommendationGeneration(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
- params (Object) (defaults to: {})
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:RecommendationId
— (String
)The ID for this specific recommendation.
GenerationStartedTime
— (String
)The start time of the recommendation generation.
EstimatedCompletionTime
— (String
)The estimated time for when the recommendation generation will complete.
-
(AWS.Response)
—
Returns:
tagResource(params = {}, callback) ⇒ AWS.Request
An API operation for adding one or more tags (key-value pairs) to a resource.
You can use the
TagResource
operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag.Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
Service Reference:
Examples:
Calling the tagResource operation
var params = { ResourceArn: 'STRING_VALUE', /* required */ ResourceTags: [ /* required */ { Key: 'STRING_VALUE', /* required */ Value: 'STRING_VALUE' /* required */ }, /* more items */ ] }; costexplorer.tagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
ResourceTags
— (Array<map>
)A list of tag key-value pairs to be added to the resource.
Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:
-
Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use
-
The maximum length of a key is 128 characters
-
The maximum length of a value is 256 characters
-
Keys and values can only contain alphanumeric characters, spaces, and any of the following:
_.:/=+@-
-
Keys and values are case sensitive
-
Keys and values are trimmed for any leading or trailing whitespaces
-
Don’t use
aws:
as a prefix for your keys. This prefix is reserved for Amazon Web Services use
Key
— required — (String
)The key that's associated with the tag.
Value
— required — (String
)The value that's associated with the tag.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
untagResource(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
Service Reference:
Examples:
Calling the untagResource operation
var params = { ResourceArn: 'STRING_VALUE', /* required */ ResourceTagKeys: [ /* required */ 'STRING_VALUE', /* more items */ ] }; costexplorer.untagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
ResourceTagKeys
— (Array<String>
)A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that doesn't exist, it's ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateAnomalyMonitor(params = {}, callback) ⇒ AWS.Request
Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past.
Service Reference:
Examples:
Calling the updateAnomalyMonitor operation
var params = { MonitorArn: 'STRING_VALUE', /* required */ MonitorName: 'STRING_VALUE' }; costexplorer.updateAnomalyMonitor(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
MonitorArn
— (String
)Cost anomaly monitor Amazon Resource Names (ARNs).
MonitorName
— (String
)The new name for the cost anomaly monitor.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:MonitorArn
— (String
)A cost anomaly monitor ARN.
-
(AWS.Response)
—
Returns:
updateAnomalySubscription(params = {}, callback) ⇒ AWS.Request
Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.
Note: The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply toAnomalySubscription
.Service Reference:
Examples:
Calling the updateAnomalySubscription operation
var params = { SubscriptionArn: 'STRING_VALUE', /* required */ Frequency: DAILY | IMMEDIATE | WEEKLY, MonitorArnList: [ 'STRING_VALUE', /* more items */ ], Subscribers: [ { Address: 'STRING_VALUE', Status: CONFIRMED | DECLINED, Type: EMAIL | SNS }, /* more items */ ], SubscriptionName: 'STRING_VALUE', Threshold: 'NUMBER_VALUE', ThresholdExpression: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } } }; costexplorer.updateAnomalySubscription(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SubscriptionArn
— (String
)A cost anomaly subscription Amazon Resource Name (ARN).
Threshold
— (Float
)(deprecated)
The update to the threshold value for receiving notifications.
This field has been deprecated. To update a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
You can specify either Threshold or ThresholdExpression, but not both.
Frequency
— (String
)The update to the frequency value that subscribers receive notifications.
Possible values include:"DAILY"
"IMMEDIATE"
"WEEKLY"
MonitorArnList
— (Array<String>
)A list of cost anomaly monitor ARNs.
Subscribers
— (Array<map>
)The update to the subscriber list.
Address
— (String
)The email address or SNS Amazon Resource Name (ARN). This depends on the
Type
.Type
— (String
)The notification delivery channel.
Possible values include:"EMAIL"
"SNS"
Status
— (String
)Indicates if the subscriber accepts the notifications.
Possible values include:"CONFIRMED"
"DECLINED"
SubscriptionName
— (String
)The new name of the subscription.
ThresholdExpression
— (map
)The update to the Expression object used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions are
ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.You can specify either Threshold or ThresholdExpression, but not both.
The following are examples of valid ThresholdExpressions:
-
Absolute threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
Percentage threshold:
{ "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }
-
AND
two thresholds together:{ "And": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
-
OR
two thresholds together:{ "Or": [ { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } }, { "Dimensions": { "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] } } ] }
Or
— (Array<map>
)Return results that match either
Dimension
object.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Not
— (map
)Return results that don't match a
Dimension
object.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SubscriptionArn
— (String
)A cost anomaly subscription ARN.
-
(AWS.Response)
—
Returns:
updateCostAllocationTagsStatus(params = {}, callback) ⇒ AWS.Request
Updates status for cost allocation tags in bulk, with maximum batch size of 20. If the tag status that's updated is the same as the existing tag status, the request doesn't fail. Instead, it doesn't have any effect on the tag status (for example, activating the active tag).
Service Reference:
Examples:
Calling the updateCostAllocationTagsStatus operation
var params = { CostAllocationTagsStatus: [ /* required */ { Status: Active | Inactive, /* required */ TagKey: 'STRING_VALUE' /* required */ }, /* more items */ ] }; costexplorer.updateCostAllocationTagsStatus(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CostAllocationTagsStatus
— (Array<map>
)The list of
CostAllocationTagStatusEntry
objects that are used to update cost allocation tags status for this request.TagKey
— required — (String
)The key for the cost allocation tag.
Status
— required — (String
)The status of a cost allocation tag.
Possible values include:"Active"
"Inactive"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Errors
— (Array<map>
)A list of
UpdateCostAllocationTagsStatusError
objects with error details about each cost allocation tag that can't be updated. If there's no failure, an empty array returns.TagKey
— (String
)The key for the cost allocation tag.
Code
— (String
)An error code representing why the action failed on this entry.
Message
— (String
)A message explaining why the action failed on this entry.
-
(AWS.Response)
—
Returns:
updateCostCategoryDefinition(params = {}, callback) ⇒ AWS.Request
Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
Service Reference:
Examples:
Calling the updateCostCategoryDefinition operation
var params = { CostCategoryArn: 'STRING_VALUE', /* required */ RuleVersion: CostCategoryExpression.v1, /* required */ Rules: [ /* required */ { InheritedValue: { DimensionKey: 'STRING_VALUE', DimensionName: LINKED_ACCOUNT_NAME | TAG }, Rule: { /* Expression */ And: [ /* recursive Expression */, /* more items */ ], CostCategories: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Dimensions: { Key: AZ | INSTANCE_TYPE | LINKED_ACCOUNT | LINKED_ACCOUNT_NAME | OPERATION | PURCHASE_TYPE | REGION | SERVICE | SERVICE_CODE | USAGE_TYPE | USAGE_TYPE_GROUP | RECORD_TYPE | OPERATING_SYSTEM | TENANCY | SCOPE | PLATFORM | SUBSCRIPTION_ID | LEGAL_ENTITY_NAME | DEPLOYMENT_OPTION | DATABASE_ENGINE | CACHE_ENGINE | INSTANCE_TYPE_FAMILY | BILLING_ENTITY | RESERVATION_ID | RESOURCE_ID | RIGHTSIZING_TYPE | SAVINGS_PLANS_TYPE | SAVINGS_PLAN_ARN | PAYMENT_OPTION | AGREEMENT_END_DATE_TIME_AFTER | AGREEMENT_END_DATE_TIME_BEFORE | INVOICING_ENTITY | ANOMALY_TOTAL_IMPACT_ABSOLUTE | ANOMALY_TOTAL_IMPACT_PERCENTAGE, MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] }, Not: /* recursive Expression */, Or: [ /* recursive Expression */, /* more items */ ], Tags: { Key: 'STRING_VALUE', MatchOptions: [ EQUALS | ABSENT | STARTS_WITH | ENDS_WITH | CONTAINS | CASE_SENSITIVE | CASE_INSENSITIVE | GREATER_THAN_OR_EQUAL, /* more items */ ], Values: [ 'STRING_VALUE', /* more items */ ] } }, Type: REGULAR | INHERITED_VALUE, Value: 'STRING_VALUE' }, /* more items */ ], DefaultValue: 'STRING_VALUE', EffectiveStart: 'STRING_VALUE', SplitChargeRules: [ { Method: FIXED | PROPORTIONAL | EVEN, /* required */ Source: 'STRING_VALUE', /* required */ Targets: [ /* required */ 'STRING_VALUE', /* more items */ ], Parameters: [ { Type: ALLOCATION_PERCENTAGES, /* required */ Values: [ /* required */ 'STRING_VALUE', /* more items */ ] }, /* more items */ ] }, /* more items */ ] }; costexplorer.updateCostCategoryDefinition(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CostCategoryArn
— (String
)The unique identifier for your Cost Category.
EffectiveStart
— (String
)The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future.
RuleVersion
— (String
)The rule schema version in this particular Cost Category.
Possible values include:"CostCategoryExpression.v1"
Rules
— (Array<map>
)The
Expression
object used to categorize costs. For more information, see CostCategoryRule .Value
— (String
)The default value for the cost category.
Rule
— (map
)An Expression object used to categorize costs. This supports dimensions, tags, and nested expressions. Currently the only dimensions supported are
LINKED_ACCOUNT
,SERVICE_CODE
,RECORD_TYPE
,LINKED_ACCOUNT_NAME
,REGION
, andUSAGE_TYPE
.RECORD_TYPE
is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the Billing and Cost Management User Guide.Or
— (Array<map>
)Return results that match either
Dimension
object.And
— (Array<map>
)Return results that match both
Dimension
objects.Dimensions
— (map
)The specific
Dimension
to use forExpression
.Key
— (String
)The names of the metadata types that you can use to filter and group your results. For example,
AZ
returns a list of Availability Zones.Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.
LINK_ACCOUNT_NAME
andSERVICE_CODE
can only be used in CostCategoryRule.ANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
can only be used in AnomalySubscriptions."AZ"
"INSTANCE_TYPE"
"LINKED_ACCOUNT"
"LINKED_ACCOUNT_NAME"
"OPERATION"
"PURCHASE_TYPE"
"REGION"
"SERVICE"
"SERVICE_CODE"
"USAGE_TYPE"
"USAGE_TYPE_GROUP"
"RECORD_TYPE"
"OPERATING_SYSTEM"
"TENANCY"
"SCOPE"
"PLATFORM"
"SUBSCRIPTION_ID"
"LEGAL_ENTITY_NAME"
"DEPLOYMENT_OPTION"
"DATABASE_ENGINE"
"CACHE_ENGINE"
"INSTANCE_TYPE_FAMILY"
"BILLING_ENTITY"
"RESERVATION_ID"
"RESOURCE_ID"
"RIGHTSIZING_TYPE"
"SAVINGS_PLANS_TYPE"
"SAVINGS_PLAN_ARN"
"PAYMENT_OPTION"
"AGREEMENT_END_DATE_TIME_AFTER"
"AGREEMENT_END_DATE_TIME_BEFORE"
"INVOICING_ENTITY"
"ANOMALY_TOTAL_IMPACT_ABSOLUTE"
"ANOMALY_TOTAL_IMPACT_PERCENTAGE"
Values
— (Array<String>
)The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category and Anomaly Subscriptions. Refer to the documentation for each specific API to see what is supported.The default values for
MatchOptions
areEQUALS
andCASE_SENSITIVE
.
Tags
— (map
)The specific
Tag
to use forExpression
.Key
— (String
)The key for the tag.
Values
— (Array<String>
)The specific value of the tag.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.
CostCategories
— (map
)The filter that's based on
CostCategory
values.Key
— (String
)The unique name of the Cost Category.
Values
— (Array<String>
)The specific value of the Cost Category.
MatchOptions
— (Array<String>
)The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for
MatchOptions
isEQUALS
andCASE_SENSITIVE
.
InheritedValue
— (map
)The value the line item is categorized as if the line item contains the matched dimension.
DimensionName
— (String
)The name of the dimension that's used to group costs.
If you specify
Possible values include:LINKED_ACCOUNT_NAME
, the cost category value is based on account name. If you specifyTAG
, the cost category value is based on the value of the specified tag key."LINKED_ACCOUNT_NAME"
"TAG"
DimensionKey
— (String
)The key to extract cost category values.
Type
— (String
)You can define the
Possible values include:CostCategoryRule
rule type as eitherREGULAR
orINHERITED_VALUE
. TheINHERITED_VALUE
rule type adds the flexibility to define a rule that dynamically inherits the cost category value. This value is from the dimension value that's defined byCostCategoryInheritedValueDimension
. For example, suppose that you want to costs to be dynamically grouped based on the value of a specific tag key. First, choose an inherited value rule type, and then choose the tag dimension and specify the tag key to use."REGULAR"
"INHERITED_VALUE"
DefaultValue
— (String
)The default value for the cost category.
SplitChargeRules
— (Array<map>
)The split charge rules used to allocate your charges between your Cost Category values.
Source
— required — (String
)The Cost Category value that you want to split. That value can't be used as a source or a target in other split charge rules. To indicate uncategorized costs, you can use an empty string as the source.
Targets
— required — (Array<String>
)The Cost Category values that you want to split costs across. These values can't be used as a source in other split charge rules.
Method
— required — (String
)The method that's used to define how to split your source costs across your targets.
Proportional
- Allocates charges across your targets based on the proportional weighted cost of each target.Fixed
- Allocates charges across your targets based on your defined allocation percentage.>
Possible values include:Even
- Allocates costs evenly across all targets."FIXED"
"PROPORTIONAL"
"EVEN"
Parameters
— (Array<map>
)The parameters for a split charge method. This is only required for the
FIXED
method.Type
— required — (String
)The parameter type.
Possible values include:"ALLOCATION_PERCENTAGES"
Values
— required — (Array<String>
)The parameter values.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CostCategoryArn
— (String
)The unique identifier for your Cost Category.
EffectiveStart
— (String
)The Cost Category's effective start date. It can only be a billing start date (first day of the month).
-
(AWS.Response)
—
Returns:
Generated on Thu Aug 22 18:44:00 2024 by yard 0.9.36 (ruby-2.5.1). - getCostForecast(params = {}, callback) ⇒ AWS.Request