AWS Cost Explorer Service 2017-10-25
- Client: Aws\CostExplorer\CostExplorerClient
- Service ID: ce
- Version: 2017-10-25
This page describes the parameters and results for the operations of the AWS Cost Explorer Service (2017-10-25), and shows how to use the Aws\CostExplorer\CostExplorerClient object to call the described operations. This documentation is specific to the 2017-10-25 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CreateAnomalyMonitor ( array $params = [] )
Creates a new cost anomaly detection monitor with the requested type and monitor specification.
- CreateAnomalySubscription ( array $params = [] )
Adds a subscription to a cost anomaly detection monitor.
- CreateCostCategoryDefinition ( array $params = [] )
Creates a new Cost Category with the requested name and rules.
- DeleteAnomalyMonitor ( array $params = [] )
Deletes a cost anomaly monitor.
- DeleteAnomalySubscription ( array $params = [] )
Deletes a cost anomaly subscription.
- DeleteCostCategoryDefinition ( array $params = [] )
Deletes a Cost Category.
- DescribeCostCategoryDefinition ( array $params = [] )
Returns the name, ARN, rules, definition, and effective dates of a Cost Category that's defined in the account.
- GetAnomalies ( array $params = [] )
Retrieves all of the cost anomalies detected on your account, during the time period specified by the DateInterval object.
- GetAnomalyMonitors ( array $params = [] )
Retrieves the cost anomaly monitor definitions for your account.
- GetAnomalySubscriptions ( array $params = [] )
Retrieves the cost anomaly subscription objects for your account.
- GetCostAndUsage ( array $params = [] )
Retrieves cost and usage metrics for your account.
- GetCostAndUsageWithResources ( array $params = [] )
Retrieves cost and usage metrics with resources for your account.
- GetCostCategories ( array $params = [] )
Retrieves an array of Cost Category names and values incurred cost.
- GetCostForecast ( array $params = [] )
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 ( array $params = [] )
Retrieves all available filter values for a specified filter over a period of time.
- GetReservationCoverage ( array $params = [] )
Retrieves the reservation coverage for your account.
- GetReservationPurchaseRecommendation ( array $params = [] )
Gets recommendations for which reservations to purchase.
- GetReservationUtilization ( array $params = [] )
Retrieves the reservation utilization for your account.
- GetRightsizingRecommendation ( array $params = [] )
Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
- GetSavingsPlansCoverage ( array $params = [] )
Retrieves the Savings Plans covered for your account.
- GetSavingsPlansPurchaseRecommendation ( array $params = [] )
Retrieves your request parameters, Savings Plan Recommendations Summary and Details.
- GetSavingsPlansUtilization ( array $params = [] )
Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity.
- GetSavingsPlansUtilizationDetails ( array $params = [] )
Retrieves attribute data along with aggregate utilization and savings data for a given time period.
- GetTags ( array $params = [] )
Queries for available tag keys and tag values for a specified period.
- GetUsageForecast ( array $params = [] )
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.
- ListCostCategoryDefinitions ( array $params = [] )
Returns the name, ARN, NumberOfRules and effective dates of all Cost Categories defined in the account.
- ProvideAnomalyFeedback ( array $params = [] )
Modifies the feedback property of a given cost anomaly.
- UpdateAnomalyMonitor ( array $params = [] )
Updates an existing cost anomaly monitor.
- UpdateAnomalySubscription ( array $params = [] )
Updates an existing cost anomaly monitor subscription.
- UpdateCostCategoryDefinition ( array $params = [] )
Updates an existing Cost Category.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
CreateAnomalyMonitor
$result = $client->createAnomalyMonitor
([/* ... */]); $promise = $client->createAnomalyMonitorAsync
([/* ... */]);
Creates a new cost anomaly detection monitor with the requested type and monitor specification.
Parameter Syntax
$result = $client->createAnomalyMonitor([ 'AnomalyMonitor' => [ // REQUIRED 'CreationDate' => '<string>', 'DimensionalValueCount' => <integer>, 'LastEvaluatedDate' => '<string>', 'LastUpdatedDate' => '<string>', 'MonitorArn' => '<string>', 'MonitorDimension' => 'SERVICE', 'MonitorName' => '<string>', // REQUIRED 'MonitorSpecification' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MonitorType' => 'DIMENSIONAL|CUSTOM', // REQUIRED ], ]);
Parameter Details
Members
- AnomalyMonitor
-
- Required: Yes
- Type: AnomalyMonitor structure
The cost anomaly detection monitor object that you want to create.
Result Syntax
[ 'MonitorArn' => '<string>', ]
Result Details
Members
Errors
-
You made too many calls in a short period of time. Try again later.
CreateAnomalySubscription
$result = $client->createAnomalySubscription
([/* ... */]); $promise = $client->createAnomalySubscriptionAsync
([/* ... */]);
Adds a subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set a dollar threshold and a time frequency for receiving notifications.
Parameter Syntax
$result = $client->createAnomalySubscription([ 'AnomalySubscription' => [ // REQUIRED 'AccountId' => '<string>', 'Frequency' => 'DAILY|IMMEDIATE|WEEKLY', // REQUIRED 'MonitorArnList' => ['<string>', ...], // REQUIRED 'Subscribers' => [ // REQUIRED [ 'Address' => '<string>', 'Status' => 'CONFIRMED|DECLINED', 'Type' => 'EMAIL|SNS', ], // ... ], 'SubscriptionArn' => '<string>', 'SubscriptionName' => '<string>', // REQUIRED 'Threshold' => <float>, // REQUIRED ], ]);
Parameter Details
Members
- AnomalySubscription
-
- Required: Yes
- Type: AnomalySubscription structure
The cost anomaly subscription object that you want to create.
Result Syntax
[ 'SubscriptionArn' => '<string>', ]
Result Details
Members
Errors
-
The cost anomaly monitor does not exist for the account.
-
You made too many calls in a short period of time. Try again later.
CreateCostCategoryDefinition
$result = $client->createCostCategoryDefinition
([/* ... */]); $promise = $client->createCostCategoryDefinitionAsync
([/* ... */]);
Creates a new Cost Category with the requested name and rules.
Parameter Syntax
$result = $client->createCostCategoryDefinition([ 'Name' => '<string>', // REQUIRED 'RuleVersion' => 'CostCategoryExpression.v1', // REQUIRED 'Rules' => [ // REQUIRED [ 'Rule' => [ // REQUIRED 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- Name
-
- Required: Yes
- Type: string
The unique name of the Cost Category.
- RuleVersion
-
- Required: Yes
- Type: string
The rule schema version in this particular Cost Category.
- Rules
-
- Required: Yes
- Type: Array of CostCategoryRule structures
The Cost Category rules used to categorize costs. For more information, see CostCategoryRule.
Result Syntax
[ 'CostCategoryArn' => '<string>', 'EffectiveStart' => '<string>', ]
Result Details
Members
Errors
-
ServiceQuotaExceededException:
You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
-
You made too many calls in a short period of time. Try again later.
DeleteAnomalyMonitor
$result = $client->deleteAnomalyMonitor
([/* ... */]); $promise = $client->deleteAnomalyMonitorAsync
([/* ... */]);
Deletes a cost anomaly monitor.
Parameter Syntax
$result = $client->deleteAnomalyMonitor([ 'MonitorArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly monitor does not exist for the account.
DeleteAnomalySubscription
$result = $client->deleteAnomalySubscription
([/* ... */]); $promise = $client->deleteAnomalySubscriptionAsync
([/* ... */]);
Deletes a cost anomaly subscription.
Parameter Syntax
$result = $client->deleteAnomalySubscription([ 'SubscriptionArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly subscription does not exist for the account.
DeleteCostCategoryDefinition
$result = $client->deleteCostCategoryDefinition
([/* ... */]); $promise = $client->deleteCostCategoryDefinitionAsync
([/* ... */]);
Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
Parameter Syntax
$result = $client->deleteCostCategoryDefinition([ 'CostCategoryArn' => '<string>', // REQUIRED ]);
Parameter Details
Result Syntax
[ 'CostCategoryArn' => '<string>', 'EffectiveEnd' => '<string>', ]
Result Details
Members
Errors
-
The specified ARN in the request doesn't exist.
-
You made too many calls in a short period of time. Try again later.
DescribeCostCategoryDefinition
$result = $client->describeCostCategoryDefinition
([/* ... */]); $promise = $client->describeCostCategoryDefinitionAsync
([/* ... */]);
Returns the 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 is active on a specific date. If there is no EffectiveOn
specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
Parameter Syntax
$result = $client->describeCostCategoryDefinition([ 'CostCategoryArn' => '<string>', // REQUIRED 'EffectiveOn' => '<string>', ]);
Parameter Details
Members
Result Syntax
[ 'CostCategory' => [ 'CostCategoryArn' => '<string>', 'EffectiveEnd' => '<string>', 'EffectiveStart' => '<string>', 'Name' => '<string>', 'ProcessingStatus' => [ [ 'Component' => 'COST_EXPLORER', 'Status' => 'PROCESSING|APPLIED', ], // ... ], 'RuleVersion' => 'CostCategoryExpression.v1', 'Rules' => [ [ 'Rule' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- CostCategory
-
- Type: CostCategory structure
The structure of Cost Categories. This includes detailed metadata and the set of rules for the
CostCategory
object.
Errors
-
The specified ARN in the request doesn't exist.
-
You made too many calls in a short period of time. Try again later.
GetAnomalies
$result = $client->getAnomalies
([/* ... */]); $promise = $client->getAnomaliesAsync
([/* ... */]);
Retrieves all of the cost anomalies detected on your account, during the time period specified by the DateInterval
object.
Parameter Syntax
$result = $client->getAnomalies([ 'DateInterval' => [ // REQUIRED 'EndDate' => '<string>', 'StartDate' => '<string>', // REQUIRED ], 'Feedback' => 'YES|NO|PLANNED_ACTIVITY', 'MaxResults' => <integer>, 'MonitorArn' => '<string>', 'NextPageToken' => '<string>', 'TotalImpact' => [ 'EndValue' => <float>, 'NumericOperator' => 'EQUAL|GREATER_THAN_OR_EQUAL|LESS_THAN_OR_EQUAL|GREATER_THAN|LESS_THAN|BETWEEN', // REQUIRED 'StartValue' => <float>, // REQUIRED ], ]);
Parameter Details
Members
- DateInterval
-
- Required: Yes
- Type: AnomalyDateInterval structure
Assigns the start and end dates for retrieving cost anomalies. The returned anomaly object will have an
AnomalyEndDate
in the specified time range. - Feedback
-
- Type: string
Filters anomaly results by the feedback field on the anomaly object.
- MaxResults
-
- Type: int
The number of entries a paginated response contains.
- MonitorArn
-
- Type: string
Retrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN).
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- TotalImpact
-
- Type: TotalImpactFilter structure
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.
Result Syntax
[ 'Anomalies' => [ [ 'AnomalyEndDate' => '<string>', 'AnomalyId' => '<string>', 'AnomalyScore' => [ 'CurrentScore' => <float>, 'MaxScore' => <float>, ], 'AnomalyStartDate' => '<string>', 'DimensionValue' => '<string>', 'Feedback' => 'YES|NO|PLANNED_ACTIVITY', 'Impact' => [ 'MaxImpact' => <float>, 'TotalImpact' => <float>, ], 'MonitorArn' => '<string>', 'RootCauses' => [ [ 'LinkedAccount' => '<string>', 'Region' => '<string>', 'Service' => '<string>', 'UsageType' => '<string>', ], // ... ], ], // ... ], 'NextPageToken' => '<string>', ]
Result Details
Members
- Anomalies
-
- Required: Yes
- Type: Array of Anomaly structures
A list of cost anomalies.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The pagination token is invalid. Try again without a pagination token.
GetAnomalyMonitors
$result = $client->getAnomalyMonitors
([/* ... */]); $promise = $client->getAnomalyMonitorsAsync
([/* ... */]);
Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
Parameter Syntax
$result = $client->getAnomalyMonitors([ 'MaxResults' => <integer>, 'MonitorArnList' => ['<string>', ...], 'NextPageToken' => '<string>', ]);
Parameter Details
Members
- MaxResults
-
- Type: int
The number of entries a paginated response contains.
- MonitorArnList
-
- Type: Array of strings
A list of cost anomaly monitor ARNs.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
Result Syntax
[ 'AnomalyMonitors' => [ [ 'CreationDate' => '<string>', 'DimensionalValueCount' => <integer>, 'LastEvaluatedDate' => '<string>', 'LastUpdatedDate' => '<string>', 'MonitorArn' => '<string>', 'MonitorDimension' => 'SERVICE', 'MonitorName' => '<string>', 'MonitorSpecification' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MonitorType' => 'DIMENSIONAL|CUSTOM', ], // ... ], 'NextPageToken' => '<string>', ]
Result Details
Members
- AnomalyMonitors
-
- Required: Yes
- Type: Array of AnomalyMonitor structures
A list of cost anomaly monitors that includes the detailed metadata for each monitor.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly monitor does not exist for the account.
-
The pagination token is invalid. Try again without a pagination token.
GetAnomalySubscriptions
$result = $client->getAnomalySubscriptions
([/* ... */]); $promise = $client->getAnomalySubscriptionsAsync
([/* ... */]);
Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
Parameter Syntax
$result = $client->getAnomalySubscriptions([ 'MaxResults' => <integer>, 'MonitorArn' => '<string>', 'NextPageToken' => '<string>', 'SubscriptionArnList' => ['<string>', ...], ]);
Parameter Details
Members
- MaxResults
-
- Type: int
The number of entries a paginated response contains.
- MonitorArn
-
- Type: string
Cost anomaly monitor ARNs.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SubscriptionArnList
-
- Type: Array of strings
A list of cost anomaly subscription ARNs.
Result Syntax
[ 'AnomalySubscriptions' => [ [ 'AccountId' => '<string>', 'Frequency' => 'DAILY|IMMEDIATE|WEEKLY', 'MonitorArnList' => ['<string>', ...], 'Subscribers' => [ [ 'Address' => '<string>', 'Status' => 'CONFIRMED|DECLINED', 'Type' => 'EMAIL|SNS', ], // ... ], 'SubscriptionArn' => '<string>', 'SubscriptionName' => '<string>', 'Threshold' => <float>, ], // ... ], 'NextPageToken' => '<string>', ]
Result Details
Members
- AnomalySubscriptions
-
- Required: Yes
- Type: Array of AnomalySubscription structures
A list of cost anomaly subscriptions that includes the detailed metadata for each one.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly subscription does not exist for the account.
-
The pagination token is invalid. Try again without a pagination token.
GetCostAndUsage
$result = $client->getCostAndUsage
([/* ... */]); $promise = $client->getCostAndUsageAsync
([/* ... */]);
Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric, such as BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE
or AZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in AWS Organizations have access to all member accounts.
For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
Parameter Syntax
$result = $client->getCostAndUsage([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'GroupBy' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'Metrics' => ['<string>', ...], // REQUIRED 'NextPageToken' => '<string>', 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
Filters AWS 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. - Granularity
-
- Type: string
Sets the AWS cost granularity to
MONTHLY
orDAILY
, orHOURLY
. IfGranularity
isn't set, the response object doesn't include theGranularity
, eitherMONTHLY
orDAILY
, orHOURLY
. - GroupBy
-
- Type: Array of GroupDefinition structures
You can group AWS costs using up to two different groups, either dimensions, tag keys, cost categories, or any two group by types.
When you group by tag key, you get all tag values, including empty strings.
Valid values are
AZ
,INSTANCE_TYPE
,LEGAL_ENTITY_NAME
,LINKED_ACCOUNT
,OPERATION
,PLATFORM
,PURCHASE_TYPE
,SERVICE
,TAGS
,TENANCY
,RECORD_TYPE
, andUSAGE_TYPE
. - Metrics
-
- Required: Yes
- Type: Array of strings
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
.If you return the
UsageQuantity
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 vs. GB). To get more meaningfulUsageQuantity
metrics, filter byUsageType
orUsageTypeGroups
.Metrics
is required forGetCostAndUsage
requests. - NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
Sets the start and end dates for retrieving AWS 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
.
Result Syntax
[ 'DimensionValueAttributes' => [ [ 'Attributes' => ['<string>', ...], 'Value' => '<string>', ], // ... ], 'GroupDefinitions' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'NextPageToken' => '<string>', 'ResultsByTime' => [ [ 'Estimated' => true || false, 'Groups' => [ [ 'Keys' => ['<string>', ...], 'Metrics' => [ '<MetricName>' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], // ... ], ], // ... ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Total' => [ '<MetricName>' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- DimensionValueAttributes
-
- Type: Array of DimensionValuesWithAttributes structures
The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.
- GroupDefinitions
-
- Type: Array of GroupDefinition structures
The groups that are specified by the
Filter
orGroupBy
parameters in the request. - NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- ResultsByTime
-
- Type: Array of ResultByTime structures
The time period that is covered by the results in the response.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested report expired. Update the date interval and try again.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
-
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
GetCostAndUsageWithResources
$result = $client->getCostAndUsageWithResources
([/* ... */]); $promise = $client->getCostAndUsageWithResourcesAsync
([/* ... */]);
Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE
or AZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in AWS Organizations have access to all member accounts. This API is currently available for the Amazon Elastic Compute Cloud – Compute service only.
This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information on how to access the Settings page, see Controlling Access for Cost Explorer in the AWS Billing and Cost Management User Guide.
Parameter Syntax
$result = $client->getCostAndUsageWithResources([ 'Filter' => [ // REQUIRED 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'GroupBy' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'Metrics' => ['<string>', ...], 'NextPageToken' => '<string>', 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Required: Yes
- Type: Expression structure
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. - Granularity
-
- Type: string
Sets the AWS cost granularity to
MONTHLY
,DAILY
, orHOURLY
. IfGranularity
isn't set, the response object doesn't include theGranularity
,MONTHLY
,DAILY
, orHOURLY
. - GroupBy
-
- Type: Array of GroupDefinition structures
You can group Amazon Web Services costs using up to two different groups:
DIMENSION
,TAG
,COST_CATEGORY
. - Metrics
-
- Type: Array of strings
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
.If you return the
UsageQuantity
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, hours vs. GB). To get more meaningfulUsageQuantity
metrics, filter byUsageType
orUsageTypeGroups
.Metrics
is required forGetCostAndUsageWithResources
requests. - NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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
.
Result Syntax
[ 'DimensionValueAttributes' => [ [ 'Attributes' => ['<string>', ...], 'Value' => '<string>', ], // ... ], 'GroupDefinitions' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'NextPageToken' => '<string>', 'ResultsByTime' => [ [ 'Estimated' => true || false, 'Groups' => [ [ 'Keys' => ['<string>', ...], 'Metrics' => [ '<MetricName>' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], // ... ], ], // ... ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Total' => [ '<MetricName>' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], // ... ], ], // ... ], ]
Result Details
Members
- DimensionValueAttributes
-
- Type: Array of DimensionValuesWithAttributes structures
The attributes that apply to a specific dimension value. For example, if the value is a linked account, the attribute is that account name.
- GroupDefinitions
-
- Type: Array of GroupDefinition structures
The groups that are specified by the
Filter
orGroupBy
parameters in the request. - NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- ResultsByTime
-
- Type: Array of ResultByTime structures
The time period that is covered by the results in the response.
Errors
-
The requested data is unavailable.
-
You made too many calls in a short period of time. Try again later.
-
The requested report expired. Update the date interval and try again.
-
The pagination token is invalid. Try again without a pagination token.
-
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
GetCostCategories
$result = $client->getCostCategories
([/* ... */]); $promise = $client->getCostCategoriesAsync
([/* ... */]);
Retrieves an array of Cost Category names and values incurred cost.
If some Cost Category names and values are not associated with any cost, they will not be returned by this API.
Parameter Syntax
$result = $client->getCostCategories([ 'CostCategoryName' => '<string>', 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MaxResults' => <integer>, 'NextPageToken' => '<string>', 'SearchString' => '<string>', 'SortBy' => [ [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], // ... ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- CostCategoryName
-
- Type: string
The unique name of the Cost Category.
- Filter
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - MaxResults
-
- Type: int
This field is only used when
SortBy
is provided in the request.The maximum number of objects that to be returned for this request. If
MaxResults
is not specified withSortBy
, the request will return 1000 results as the default value for this parameter.For
GetCostCategories
, MaxResults has an upper limit of 1000. - NextPageToken
-
- Type: string
If the number of objects that are still available for retrieval exceeds the limit, AWS returns a NextPageToken value in the response. To retrieve the next batch of objects, provide the NextPageToken from the prior call in your next request.
- SearchString
-
- Type: string
The value that you want to search the filter values for.
If you do not specify a
CostCategoryName
,SearchString
will be used to filter Cost Category names that match theSearchString
pattern. If you do specifiy aCostCategoryName
,SearchString
will be used to filter Cost Category values that match theSearchString
pattern. - SortBy
-
- Type: Array of SortDefinition structures
The value by which you want to sort the data.
The key represents cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
Supported values for
SortOrder
areASCENDING
orDESCENDING
.When using
SortBy
,NextPageToken
andSearchString
are not supported. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
The time period of the request.
Result Syntax
[ 'CostCategoryNames' => ['<string>', ...], 'CostCategoryValues' => ['<string>', ...], 'NextPageToken' => '<string>', 'ReturnSize' => <integer>, 'TotalSize' => <integer>, ]
Result Details
Members
- CostCategoryNames
-
- Type: Array of strings
The names of the Cost Categories.
- CostCategoryValues
-
- Type: Array of strings
The Cost Category values.
CostCategoryValues
are not returned ifCostCategoryName
is not specified in the request. - NextPageToken
-
- Type: string
If the number of objects that are still available for retrieval exceeds the limit, AWS 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.
- ReturnSize
-
- Required: Yes
- Type: int
The number of objects returned.
- TotalSize
-
- Required: Yes
- Type: int
The total number of objects.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested report expired. Update the date interval and try again.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
-
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
GetCostForecast
$result = $client->getCostForecast
([/* ... */]); $promise = $client->getCostForecastAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->getCostForecast([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', // REQUIRED 'Metric' => 'BLENDED_COST|UNBLENDED_COST|AMORTIZED_COST|NET_UNBLENDED_COST|NET_AMORTIZED_COST|USAGE_QUANTITY|NORMALIZED_USAGE_AMOUNT', // REQUIRED 'PredictionIntervalLevel' => <integer>, 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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
- Granularity
-
- Required: Yes
- Type: string
How granular you want the forecast to be. You can get 3 months of
DAILY
forecasts or 12 months ofMONTHLY
forecasts.The
GetCostForecast
operation supports onlyDAILY
andMONTHLY
granularities. - Metric
-
- Required: Yes
- Type: 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
- PredictionIntervalLevel
-
- Type: int
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.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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.
Result Syntax
[ 'ForecastResultsByTime' => [ [ 'MeanValue' => '<string>', 'PredictionIntervalLowerBound' => '<string>', 'PredictionIntervalUpperBound' => '<string>', 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], ], // ... ], 'Total' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], ]
Result Details
Members
- ForecastResultsByTime
-
- Type: Array of ForecastResult structures
The forecasts for your query, in order. For
DAILY
forecasts, this is a list of days. ForMONTHLY
forecasts, this is a list of months. - Total
-
- Type: MetricValue structure
How much you are forecasted to spend over the forecast period, in
USD
.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
GetDimensionValues
$result = $client->getDimensionValues
([/* ... */]); $promise = $client->getDimensionValuesAsync
([/* ... */]);
Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
Parameter Syntax
$result = $client->getDimensionValues([ 'Context' => 'COST_AND_USAGE|RESERVATIONS|SAVINGS_PLANS', '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', // REQUIRED 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MaxResults' => <integer>, 'NextPageToken' => '<string>', 'SearchString' => '<string>', 'SortBy' => [ [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], // ... ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Context
-
- Type: 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
. -
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 AWS 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 AWS 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 AWS 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.
-
REGION - The AWS Region.
-
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.
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 AWS ID of the member account.
-
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
REGION - The AWS 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 AWS 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 AWS ID of the member account.
-
SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan
- Dimension
-
- Required: Yes
- Type: string
The name of the dimension. Each
Dimension
is available for a differentContext
. For more information, seeContext
. - Filter
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - MaxResults
-
- Type: int
This field is only used when SortBy is provided in the request. The maximum number of objects that to be returned for this request. If MaxResults is not specified with SortBy, the request will return 1000 results as the default value for this parameter.
For
GetDimensionValues
, MaxResults has an upper limit of 1000. - NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SearchString
-
- Type: string
The value that you want to search the filter values for.
- SortBy
-
- Type: Array of SortDefinition structures
The value by which you want to sort the data.
The key represents cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
Supported values for
SortOrder
areASCENDING
orDESCENDING
.When you specify a
SortBy
paramater, the context must beCOST_AND_USAGE
. Further, when usingSortBy
,NextPageToken
andSearchString
are not supported. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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
.
Result Syntax
[ 'DimensionValues' => [ [ 'Attributes' => ['<string>', ...], 'Value' => '<string>', ], // ... ], 'NextPageToken' => '<string>', 'ReturnSize' => <integer>, 'TotalSize' => <integer>, ]
Result Details
Members
- DimensionValues
-
- Required: Yes
- Type: Array of DimensionValuesWithAttributes structures
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 AWS 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 AWS 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 AWS 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.
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 AWS ID of the member account.
-
PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux.
-
REGION - The AWS 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 AWS 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 AWS ID of the member account.
-
SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan
- NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- ReturnSize
-
- Required: Yes
- Type: int
The number of results that AWS returned at one time.
- TotalSize
-
- Required: Yes
- Type: int
The total number of search results.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested report expired. Update the date interval and try again.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
-
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
GetReservationCoverage
$result = $client->getReservationCoverage
([/* ... */]); $promise = $client->getReservationCoverageAsync
([/* ... */]);
Retrieves the reservation coverage for your account. This enables you 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.
Parameter Syntax
$result = $client->getReservationCoverage([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'GroupBy' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'MaxResults' => <integer>, 'Metrics' => ['<string>', ...], 'NextPageToken' => '<string>', 'SortBy' => [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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.
- Granularity
-
- Type: string
The granularity of the AWS 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
GetReservationCoverage
operation supports onlyDAILY
andMONTHLY
granularities. - GroupBy
-
- Type: Array of GroupDefinition structures
You can group the data by the following attributes:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
TENANCY
- MaxResults
-
- Type: int
The maximum number of objects that you returned for this request. If more objects are available, in the response, AWS provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
- Metrics
-
- Type: Array of strings
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
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SortBy
-
- Type: SortDefinition structure
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
. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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
.
Result Syntax
[ 'CoveragesByTime' => [ [ 'Groups' => [ [ 'Attributes' => ['<string>', ...], 'Coverage' => [ 'CoverageCost' => [ 'OnDemandCost' => '<string>', ], 'CoverageHours' => [ 'CoverageHoursPercentage' => '<string>', 'OnDemandHours' => '<string>', 'ReservedHours' => '<string>', 'TotalRunningHours' => '<string>', ], 'CoverageNormalizedUnits' => [ 'CoverageNormalizedUnitsPercentage' => '<string>', 'OnDemandNormalizedUnits' => '<string>', 'ReservedNormalizedUnits' => '<string>', 'TotalRunningNormalizedUnits' => '<string>', ], ], ], // ... ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Total' => [ 'CoverageCost' => [ 'OnDemandCost' => '<string>', ], 'CoverageHours' => [ 'CoverageHoursPercentage' => '<string>', 'OnDemandHours' => '<string>', 'ReservedHours' => '<string>', 'TotalRunningHours' => '<string>', ], 'CoverageNormalizedUnits' => [ 'CoverageNormalizedUnitsPercentage' => '<string>', 'OnDemandNormalizedUnits' => '<string>', 'ReservedNormalizedUnits' => '<string>', 'TotalRunningNormalizedUnits' => '<string>', ], ], ], // ... ], 'NextPageToken' => '<string>', 'Total' => [ 'CoverageCost' => [ 'OnDemandCost' => '<string>', ], 'CoverageHours' => [ 'CoverageHoursPercentage' => '<string>', 'OnDemandHours' => '<string>', 'ReservedHours' => '<string>', 'TotalRunningHours' => '<string>', ], 'CoverageNormalizedUnits' => [ 'CoverageNormalizedUnitsPercentage' => '<string>', 'OnDemandNormalizedUnits' => '<string>', 'ReservedNormalizedUnits' => '<string>', 'TotalRunningNormalizedUnits' => '<string>', ], ], ]
Result Details
Members
- CoveragesByTime
-
- Required: Yes
- Type: Array of CoverageByTime structures
The amount of time that your reservations covered.
- NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- Total
-
- Type: Coverage structure
The total amount of instance usage that a reservation covered.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
GetReservationPurchaseRecommendation
$result = $client->getReservationPurchaseRecommendation
([/* ... */]); $promise = $client->getReservationPurchaseRecommendationAsync
([/* ... */]);
Gets recommendations for which reservations to purchase. These recommendations could help you reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing.
AWS 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 AWS has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of RI to purchase to maximize your estimated savings.
For example, AWS 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. AWS recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible RI. AWS also shows the equal number of normalized units so that you can purchase any instance size that you want. For this example, your RI recommendation would be for c4.large
because that is the smallest size instance in the c4 instance family.
Parameter Syntax
$result = $client->getReservationPurchaseRecommendation([ 'AccountId' => '<string>', 'AccountScope' => 'PAYER|LINKED', 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'LookbackPeriodInDays' => 'SEVEN_DAYS|THIRTY_DAYS|SIXTY_DAYS', 'NextPageToken' => '<string>', 'PageSize' => <integer>, 'PaymentOption' => 'NO_UPFRONT|PARTIAL_UPFRONT|ALL_UPFRONT|LIGHT_UTILIZATION|MEDIUM_UTILIZATION|HEAVY_UTILIZATION', 'Service' => '<string>', // REQUIRED 'ServiceSpecification' => [ 'EC2Specification' => [ 'OfferingClass' => 'STANDARD|CONVERTIBLE', ], ], 'TermInYears' => 'ONE_YEAR|THREE_YEARS', ]);
Parameter Details
Members
- AccountId
-
- Type: string
The account ID that is associated with the recommendation.
- AccountScope
-
- Type: 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 isLINKED
, recommendations are calculated for individual member accounts only. - Filter
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - LookbackPeriodInDays
-
- Type: string
The number of previous days that you want AWS to consider when it calculates your recommendations.
- NextPageToken
-
- Type: string
The pagination token that indicates the next set of results that you want to retrieve.
- PageSize
-
- Type: int
The number of recommendations that you want returned in a single response object.
- PaymentOption
-
- Type: string
The reservation purchase option that you want recommendations for.
- Service
-
- Required: Yes
- Type: string
The specific service that you want recommendations for.
- ServiceSpecification
-
- Type: ServiceSpecification structure
The hardware specifications for the service instances that you want recommendations for, such as standard or convertible Amazon EC2 instances.
- TermInYears
-
- Type: string
The reservation term that you want recommendations for.
Result Syntax
[ 'Metadata' => [ 'GenerationTimestamp' => '<string>', 'RecommendationId' => '<string>', ], 'NextPageToken' => '<string>', 'Recommendations' => [ [ 'AccountScope' => 'PAYER|LINKED', 'LookbackPeriodInDays' => 'SEVEN_DAYS|THIRTY_DAYS|SIXTY_DAYS', 'PaymentOption' => 'NO_UPFRONT|PARTIAL_UPFRONT|ALL_UPFRONT|LIGHT_UTILIZATION|MEDIUM_UTILIZATION|HEAVY_UTILIZATION', 'RecommendationDetails' => [ [ 'AccountId' => '<string>', 'AverageNormalizedUnitsUsedPerHour' => '<string>', 'AverageNumberOfInstancesUsedPerHour' => '<string>', 'AverageUtilization' => '<string>', 'CurrencyCode' => '<string>', 'EstimatedBreakEvenInMonths' => '<string>', 'EstimatedMonthlyOnDemandCost' => '<string>', 'EstimatedMonthlySavingsAmount' => '<string>', 'EstimatedMonthlySavingsPercentage' => '<string>', 'EstimatedReservationCostForLookbackPeriod' => '<string>', 'InstanceDetails' => [ 'EC2InstanceDetails' => [ 'AvailabilityZone' => '<string>', 'CurrentGeneration' => true || false, 'Family' => '<string>', 'InstanceType' => '<string>', 'Platform' => '<string>', 'Region' => '<string>', 'SizeFlexEligible' => true || false, 'Tenancy' => '<string>', ], 'ESInstanceDetails' => [ 'CurrentGeneration' => true || false, 'InstanceClass' => '<string>', 'InstanceSize' => '<string>', 'Region' => '<string>', 'SizeFlexEligible' => true || false, ], 'ElastiCacheInstanceDetails' => [ 'CurrentGeneration' => true || false, 'Family' => '<string>', 'NodeType' => '<string>', 'ProductDescription' => '<string>', 'Region' => '<string>', 'SizeFlexEligible' => true || false, ], 'RDSInstanceDetails' => [ 'CurrentGeneration' => true || false, 'DatabaseEdition' => '<string>', 'DatabaseEngine' => '<string>', 'DeploymentOption' => '<string>', 'Family' => '<string>', 'InstanceType' => '<string>', 'LicenseModel' => '<string>', 'Region' => '<string>', 'SizeFlexEligible' => true || false, ], 'RedshiftInstanceDetails' => [ 'CurrentGeneration' => true || false, 'Family' => '<string>', 'NodeType' => '<string>', 'Region' => '<string>', 'SizeFlexEligible' => true || false, ], ], 'MaximumNormalizedUnitsUsedPerHour' => '<string>', 'MaximumNumberOfInstancesUsedPerHour' => '<string>', 'MinimumNormalizedUnitsUsedPerHour' => '<string>', 'MinimumNumberOfInstancesUsedPerHour' => '<string>', 'RecommendedNormalizedUnitsToPurchase' => '<string>', 'RecommendedNumberOfInstancesToPurchase' => '<string>', 'RecurringStandardMonthlyCost' => '<string>', 'UpfrontCost' => '<string>', ], // ... ], 'RecommendationSummary' => [ 'CurrencyCode' => '<string>', 'TotalEstimatedMonthlySavingsAmount' => '<string>', 'TotalEstimatedMonthlySavingsPercentage' => '<string>', ], 'ServiceSpecification' => [ 'EC2Specification' => [ 'OfferingClass' => 'STANDARD|CONVERTIBLE', ], ], 'TermInYears' => 'ONE_YEAR|THREE_YEARS', ], // ... ], ]
Result Details
Members
- Metadata
-
- Type: ReservationPurchaseRecommendationMetadata structure
Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.
- NextPageToken
-
- Type: string
The pagination token for the next set of retrievable results.
- Recommendations
-
- Type: Array of ReservationPurchaseRecommendation structures
Recommendations for reservations to purchase.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
GetReservationUtilization
$result = $client->getReservationUtilization
([/* ... */]); $promise = $client->getReservationUtilizationAsync
([/* ... */]);
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 by SUBSCRIPTION_ID
.
Parameter Syntax
$result = $client->getReservationUtilization([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'GroupBy' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'MaxResults' => <integer>, 'NextPageToken' => '<string>', 'SortBy' => [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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. - Granularity
-
- Type: 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
GetReservationUtilization
operation supports onlyDAILY
andMONTHLY
granularities. - GroupBy
-
- Type: Array of GroupDefinition structures
Groups only by
SUBSCRIPTION_ID
. Metadata is included. - MaxResults
-
- Type: int
The maximum number of objects that you returned for this request. If more objects are available, in the response, AWS provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SortBy
-
- Type: SortDefinition structure
The value by which you want to sort the data.
The following values are supported for
Key
:-
UtilizationPercentage
-
UtilizationPercentageInUnits
-
PurchasedHours
-
PurchasedUnits
-
TotalActualHours
-
TotalActualUnits
-
UnusedHours
-
UnusedUnits
-
OnDemandCostOfRIHoursUsed
-
NetRISavings
-
TotalPotentialRISavings
-
AmortizedUpfrontFee
-
AmortizedRecurringFee
-
TotalAmortizedFee
-
RICostForUnusedHours
-
RealizedSavings
-
UnrealizedSavings
Supported values for
SortOrder
areASCENDING
orDESCENDING
. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
Sets the start and end dates for retrieving 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
.
Result Syntax
[ 'NextPageToken' => '<string>', 'Total' => [ 'AmortizedRecurringFee' => '<string>', 'AmortizedUpfrontFee' => '<string>', 'NetRISavings' => '<string>', 'OnDemandCostOfRIHoursUsed' => '<string>', 'PurchasedHours' => '<string>', 'PurchasedUnits' => '<string>', 'RICostForUnusedHours' => '<string>', 'RealizedSavings' => '<string>', 'TotalActualHours' => '<string>', 'TotalActualUnits' => '<string>', 'TotalAmortizedFee' => '<string>', 'TotalPotentialRISavings' => '<string>', 'UnrealizedSavings' => '<string>', 'UnusedHours' => '<string>', 'UnusedUnits' => '<string>', 'UtilizationPercentage' => '<string>', 'UtilizationPercentageInUnits' => '<string>', ], 'UtilizationsByTime' => [ [ 'Groups' => [ [ 'Attributes' => ['<string>', ...], 'Key' => '<string>', 'Utilization' => [ 'AmortizedRecurringFee' => '<string>', 'AmortizedUpfrontFee' => '<string>', 'NetRISavings' => '<string>', 'OnDemandCostOfRIHoursUsed' => '<string>', 'PurchasedHours' => '<string>', 'PurchasedUnits' => '<string>', 'RICostForUnusedHours' => '<string>', 'RealizedSavings' => '<string>', 'TotalActualHours' => '<string>', 'TotalActualUnits' => '<string>', 'TotalAmortizedFee' => '<string>', 'TotalPotentialRISavings' => '<string>', 'UnrealizedSavings' => '<string>', 'UnusedHours' => '<string>', 'UnusedUnits' => '<string>', 'UtilizationPercentage' => '<string>', 'UtilizationPercentageInUnits' => '<string>', ], 'Value' => '<string>', ], // ... ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Total' => [ 'AmortizedRecurringFee' => '<string>', 'AmortizedUpfrontFee' => '<string>', 'NetRISavings' => '<string>', 'OnDemandCostOfRIHoursUsed' => '<string>', 'PurchasedHours' => '<string>', 'PurchasedUnits' => '<string>', 'RICostForUnusedHours' => '<string>', 'RealizedSavings' => '<string>', 'TotalActualHours' => '<string>', 'TotalActualUnits' => '<string>', 'TotalAmortizedFee' => '<string>', 'TotalPotentialRISavings' => '<string>', 'UnrealizedSavings' => '<string>', 'UnusedHours' => '<string>', 'UnusedUnits' => '<string>', 'UtilizationPercentage' => '<string>', 'UtilizationPercentageInUnits' => '<string>', ], ], // ... ], ]
Result Details
Members
- NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- Total
-
- Type: ReservationAggregates structure
The total amount of time that you used your RIs.
- UtilizationsByTime
-
- Required: Yes
- Type: Array of UtilizationByTime structures
The amount of time that you used your RIs.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
GetRightsizingRecommendation
$result = $client->getRightsizingRecommendation
([/* ... */]); $promise = $client->getRightsizingRecommendationAsync
([/* ... */]);
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 details on calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the AWS Billing and Cost Management User Guide.
Parameter Syntax
$result = $client->getRightsizingRecommendation([ 'Configuration' => [ 'BenefitsConsidered' => true || false, // REQUIRED 'RecommendationTarget' => 'SAME_INSTANCE_FAMILY|CROSS_INSTANCE_FAMILY', // REQUIRED ], 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'NextPageToken' => '<string>', 'PageSize' => <integer>, 'Service' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Configuration
-
- Type: RightsizingRecommendationConfiguration structure
Enables you 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 associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
- Filter
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - NextPageToken
-
- Type: string
The pagination token that indicates the next set of results that you want to retrieve.
- PageSize
-
- Type: int
The number of recommendations that you want returned in a single response object.
- Service
-
- Required: Yes
- Type: string
The specific service that you want recommendations for. The only valid value for
GetRightsizingRecommendation
is "AmazonEC2
".
Result Syntax
[ 'Configuration' => [ 'BenefitsConsidered' => true || false, 'RecommendationTarget' => 'SAME_INSTANCE_FAMILY|CROSS_INSTANCE_FAMILY', ], 'Metadata' => [ 'AdditionalMetadata' => '<string>', 'GenerationTimestamp' => '<string>', 'LookbackPeriodInDays' => 'SEVEN_DAYS|THIRTY_DAYS|SIXTY_DAYS', 'RecommendationId' => '<string>', ], 'NextPageToken' => '<string>', 'RightsizingRecommendations' => [ [ 'AccountId' => '<string>', 'CurrentInstance' => [ 'CurrencyCode' => '<string>', 'InstanceName' => '<string>', 'MonthlyCost' => '<string>', 'OnDemandHoursInLookbackPeriod' => '<string>', 'ReservationCoveredHoursInLookbackPeriod' => '<string>', 'ResourceDetails' => [ 'EC2ResourceDetails' => [ 'HourlyOnDemandRate' => '<string>', 'InstanceType' => '<string>', 'Memory' => '<string>', 'NetworkPerformance' => '<string>', 'Platform' => '<string>', 'Region' => '<string>', 'Sku' => '<string>', 'Storage' => '<string>', 'Vcpu' => '<string>', ], ], 'ResourceId' => '<string>', 'ResourceUtilization' => [ 'EC2ResourceUtilization' => [ 'EBSResourceUtilization' => [ 'EbsReadBytesPerSecond' => '<string>', 'EbsReadOpsPerSecond' => '<string>', 'EbsWriteBytesPerSecond' => '<string>', 'EbsWriteOpsPerSecond' => '<string>', ], 'MaxCpuUtilizationPercentage' => '<string>', 'MaxMemoryUtilizationPercentage' => '<string>', 'MaxStorageUtilizationPercentage' => '<string>', ], ], 'SavingsPlansCoveredHoursInLookbackPeriod' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], // ... ], 'TotalRunningHoursInLookbackPeriod' => '<string>', ], 'ModifyRecommendationDetail' => [ 'TargetInstances' => [ [ 'CurrencyCode' => '<string>', 'DefaultTargetInstance' => true || false, 'EstimatedMonthlyCost' => '<string>', 'EstimatedMonthlySavings' => '<string>', 'ExpectedResourceUtilization' => [ 'EC2ResourceUtilization' => [ 'EBSResourceUtilization' => [ 'EbsReadBytesPerSecond' => '<string>', 'EbsReadOpsPerSecond' => '<string>', 'EbsWriteBytesPerSecond' => '<string>', 'EbsWriteOpsPerSecond' => '<string>', ], 'MaxCpuUtilizationPercentage' => '<string>', 'MaxMemoryUtilizationPercentage' => '<string>', 'MaxStorageUtilizationPercentage' => '<string>', ], ], 'ResourceDetails' => [ 'EC2ResourceDetails' => [ 'HourlyOnDemandRate' => '<string>', 'InstanceType' => '<string>', 'Memory' => '<string>', 'NetworkPerformance' => '<string>', 'Platform' => '<string>', 'Region' => '<string>', 'Sku' => '<string>', 'Storage' => '<string>', 'Vcpu' => '<string>', ], ], ], // ... ], ], 'RightsizingType' => 'TERMINATE|MODIFY', 'TerminateRecommendationDetail' => [ 'CurrencyCode' => '<string>', 'EstimatedMonthlySavings' => '<string>', ], ], // ... ], 'Summary' => [ 'EstimatedTotalMonthlySavingsAmount' => '<string>', 'SavingsCurrencyCode' => '<string>', 'SavingsPercentage' => '<string>', 'TotalRecommendationCount' => '<string>', ], ]
Result Details
Members
- Configuration
-
- Type: RightsizingRecommendationConfiguration structure
Enables you 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 associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
- Metadata
-
- Type: RightsizingRecommendationMetadata structure
Information regarding this specific recommendation set.
- NextPageToken
-
- Type: string
The token to retrieve the next set of results.
- RightsizingRecommendations
-
- Type: Array of RightsizingRecommendation structures
Recommendations to rightsize resources.
- Summary
-
- Type: RightsizingRecommendationSummary structure
Summary of this recommendation set.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The pagination token is invalid. Try again without a pagination token.
GetSavingsPlansCoverage
$result = $client->getSavingsPlansCoverage
([/* ... */]); $promise = $client->getSavingsPlansCoverageAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->getSavingsPlansCoverage([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'GroupBy' => [ [ 'Key' => '<string>', 'Type' => 'DIMENSION|TAG|COST_CATEGORY', ], // ... ], 'MaxResults' => <integer>, 'Metrics' => ['<string>', ...], 'NextToken' => '<string>', 'SortBy' => [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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.
- Granularity
-
- Type: string
The granularity of the Amazon Web Services cost data for your Savings Plans.
Granularity
can't be set ifGroupBy
is set.The
GetSavingsPlansCoverage
operation supports onlyDAILY
andMONTHLY
granularities. - GroupBy
-
- Type: Array of GroupDefinition structures
You can group the data using the attributes
INSTANCE_FAMILY
,REGION
, orSERVICE
. - MaxResults
-
- Type: int
The number of items to be returned in a response. The default is
20
, with a minimum value of1
. - Metrics
-
- Type: Array of strings
The measurement that you want your Savings Plans coverage reported in. The only valid value is
SpendCoveredBySavingsPlans
. - NextToken
-
- Type: 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
-
- Type: SortDefinition structure
The value by which you want to sort the data.
The following values are supported for
Key
:-
SpendCoveredBySavingsPlan
-
OnDemandCost
-
CoveragePercentage
-
TotalCost
-
InstanceFamily
-
Region
-
Service
Supported values for
SortOrder
areASCENDING
orDESCENDING
. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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.
Result Syntax
[ 'NextToken' => '<string>', 'SavingsPlansCoverages' => [ [ 'Attributes' => ['<string>', ...], 'Coverage' => [ 'CoveragePercentage' => '<string>', 'OnDemandCost' => '<string>', 'SpendCoveredBySavingsPlans' => '<string>', 'TotalCost' => '<string>', ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], ], // ... ], ]
Result Details
Members
- NextToken
-
- Type: 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.
- SavingsPlansCoverages
-
- Required: Yes
- Type: Array of SavingsPlansCoverage structures
The amount of spend that your Savings Plans covered.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
GetSavingsPlansPurchaseRecommendation
$result = $client->getSavingsPlansPurchaseRecommendation
([/* ... */]); $promise = $client->getSavingsPlansPurchaseRecommendationAsync
([/* ... */]);
Retrieves your request parameters, Savings Plan Recommendations Summary and Details.
Parameter Syntax
$result = $client->getSavingsPlansPurchaseRecommendation([ 'AccountScope' => 'PAYER|LINKED', 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'LookbackPeriodInDays' => 'SEVEN_DAYS|THIRTY_DAYS|SIXTY_DAYS', // REQUIRED 'NextPageToken' => '<string>', 'PageSize' => <integer>, 'PaymentOption' => 'NO_UPFRONT|PARTIAL_UPFRONT|ALL_UPFRONT|LIGHT_UTILIZATION|MEDIUM_UTILIZATION|HEAVY_UTILIZATION', // REQUIRED 'SavingsPlansType' => 'COMPUTE_SP|EC2_INSTANCE_SP', // REQUIRED 'TermInYears' => 'ONE_YEAR|THREE_YEARS', // REQUIRED ]);
Parameter Details
Members
- AccountScope
-
- Type: 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 isLINKED
, recommendations are calculated for individual member accounts only. - Filter
-
- Type: Expression structure
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) for which you want to see Savings Plans purchase recommendations.For GetSavingsPlansPurchaseRecommendation, the
Filter
does not includeCostCategories
orTags
. It only includesDimensions
. WithDimensions
,Key
must beLINKED_ACCOUNT
andValue
can be a single Account ID or multiple comma-separated Account IDs for which you want to see Savings Plans Purchase Recommendations.AND
andOR
operators are not supported. - LookbackPeriodInDays
-
- Required: Yes
- Type: string
The lookback period used to generate the recommendation.
- NextPageToken
-
- Type: 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
-
- Type: int
The number of recommendations that you want returned in a single response object.
- PaymentOption
-
- Required: Yes
- Type: string
The payment option used to generate these recommendations.
- SavingsPlansType
-
- Required: Yes
- Type: string
The Savings Plans recommendation type requested.
- TermInYears
-
- Required: Yes
- Type: string
The savings plan recommendation term used to generate these recommendations.
Result Syntax
[ 'Metadata' => [ 'AdditionalMetadata' => '<string>', 'GenerationTimestamp' => '<string>', 'RecommendationId' => '<string>', ], 'NextPageToken' => '<string>', 'SavingsPlansPurchaseRecommendation' => [ 'AccountScope' => 'PAYER|LINKED', 'LookbackPeriodInDays' => 'SEVEN_DAYS|THIRTY_DAYS|SIXTY_DAYS', 'PaymentOption' => 'NO_UPFRONT|PARTIAL_UPFRONT|ALL_UPFRONT|LIGHT_UTILIZATION|MEDIUM_UTILIZATION|HEAVY_UTILIZATION', 'SavingsPlansPurchaseRecommendationDetails' => [ [ 'AccountId' => '<string>', 'CurrencyCode' => '<string>', 'CurrentAverageHourlyOnDemandSpend' => '<string>', 'CurrentMaximumHourlyOnDemandSpend' => '<string>', 'CurrentMinimumHourlyOnDemandSpend' => '<string>', 'EstimatedAverageUtilization' => '<string>', 'EstimatedMonthlySavingsAmount' => '<string>', 'EstimatedOnDemandCost' => '<string>', 'EstimatedOnDemandCostWithCurrentCommitment' => '<string>', 'EstimatedROI' => '<string>', 'EstimatedSPCost' => '<string>', 'EstimatedSavingsAmount' => '<string>', 'EstimatedSavingsPercentage' => '<string>', 'HourlyCommitmentToPurchase' => '<string>', 'SavingsPlansDetails' => [ 'InstanceFamily' => '<string>', 'OfferingId' => '<string>', 'Region' => '<string>', ], 'UpfrontCost' => '<string>', ], // ... ], 'SavingsPlansPurchaseRecommendationSummary' => [ 'CurrencyCode' => '<string>', 'CurrentOnDemandSpend' => '<string>', 'DailyCommitmentToPurchase' => '<string>', 'EstimatedMonthlySavingsAmount' => '<string>', 'EstimatedOnDemandCostWithCurrentCommitment' => '<string>', 'EstimatedROI' => '<string>', 'EstimatedSavingsAmount' => '<string>', 'EstimatedSavingsPercentage' => '<string>', 'EstimatedTotalCost' => '<string>', 'HourlyCommitmentToPurchase' => '<string>', 'TotalRecommendationCount' => '<string>', ], 'SavingsPlansType' => 'COMPUTE_SP|EC2_INSTANCE_SP', 'TermInYears' => 'ONE_YEAR|THREE_YEARS', ], ]
Result Details
Members
- Metadata
-
- Type: SavingsPlansPurchaseRecommendationMetadata structure
Information regarding this specific recommendation set.
- NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SavingsPlansPurchaseRecommendation
-
- Type: SavingsPlansPurchaseRecommendation structure
Contains your request parameters, Savings Plan Recommendations Summary, and Details.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The pagination token is invalid. Try again without a pagination token.
GetSavingsPlansUtilization
$result = $client->getSavingsPlansUtilization
([/* ... */]); $promise = $client->getSavingsPlansUtilizationAsync
([/* ... */]);
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
in SAVINGS_PLANS
to determine the possible dimension values.
You cannot group by any dimension values for GetSavingsPlansUtilization
.
Parameter Syntax
$result = $client->getSavingsPlansUtilization([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', 'SortBy' => [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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. - Granularity
-
- Type: string
The granularity of the Amazon Web Services utillization data for your Savings Plans.
The
GetSavingsPlansUtilization
operation supports onlyDAILY
andMONTHLY
granularities. - SortBy
-
- Type: SortDefinition structure
The value by which you want to sort the data.
The following values are supported for
Key
:-
UtilizationPercentage
-
TotalCommitment
-
UsedCommitment
-
UnusedCommitment
-
NetSavings
Supported values for
SortOrder
areASCENDING
orDESCENDING
. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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.
Result Syntax
[ 'SavingsPlansUtilizationsByTime' => [ [ 'AmortizedCommitment' => [ 'AmortizedRecurringCommitment' => '<string>', 'AmortizedUpfrontCommitment' => '<string>', 'TotalAmortizedCommitment' => '<string>', ], 'Savings' => [ 'NetSavings' => '<string>', 'OnDemandCostEquivalent' => '<string>', ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Utilization' => [ 'TotalCommitment' => '<string>', 'UnusedCommitment' => '<string>', 'UsedCommitment' => '<string>', 'UtilizationPercentage' => '<string>', ], ], // ... ], 'Total' => [ 'AmortizedCommitment' => [ 'AmortizedRecurringCommitment' => '<string>', 'AmortizedUpfrontCommitment' => '<string>', 'TotalAmortizedCommitment' => '<string>', ], 'Savings' => [ 'NetSavings' => '<string>', 'OnDemandCostEquivalent' => '<string>', ], 'Utilization' => [ 'TotalCommitment' => '<string>', 'UnusedCommitment' => '<string>', 'UsedCommitment' => '<string>', 'UtilizationPercentage' => '<string>', ], ], ]
Result Details
Members
- SavingsPlansUtilizationsByTime
-
- Type: Array of SavingsPlansUtilizationByTime structures
The amount of cost/commitment you used your Savings Plans. This allows you to specify date ranges.
- Total
-
- Required: Yes
- Type: SavingsPlansUtilizationAggregates structure
The total amount of cost/commitment that you used your Savings Plans, regardless of date ranges.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
GetSavingsPlansUtilizationDetails
$result = $client->getSavingsPlansUtilizationDetails
([/* ... */]); $promise = $client->getSavingsPlansUtilizationDetailsAsync
([/* ... */]);
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 to GetSavingsPlanUtilizationDetails
by providing individual dates. You can use GetDimensionValues
in SAVINGS_PLANS
to determine the possible dimension values.
GetSavingsPlanUtilizationDetails
internally groups data by SavingsPlansArn
.
Parameter Syntax
$result = $client->getSavingsPlansUtilizationDetails([ 'DataType' => ['<string>', ...], 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MaxResults' => <integer>, 'NextToken' => '<string>', 'SortBy' => [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- DataType
-
- Type: Array of strings
The data type.
- Filter
-
- Type: Expression structure
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. - MaxResults
-
- Type: int
The number of items to be returned in a response. The default is
20
, with a minimum value of1
. - NextToken
-
- Type: 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
-
- Type: SortDefinition structure
The value by which you want to sort the data.
The following values are supported for
Key
:-
UtilizationPercentage
-
TotalCommitment
-
UsedCommitment
-
UnusedCommitment
-
NetSavings
-
AmortizedRecurringCommitment
-
AmortizedUpfrontCommitment
Supported values for
SortOrder
areASCENDING
orDESCENDING
. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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.
Result Syntax
[ 'NextToken' => '<string>', 'SavingsPlansUtilizationDetails' => [ [ 'AmortizedCommitment' => [ 'AmortizedRecurringCommitment' => '<string>', 'AmortizedUpfrontCommitment' => '<string>', 'TotalAmortizedCommitment' => '<string>', ], 'Attributes' => ['<string>', ...], 'Savings' => [ 'NetSavings' => '<string>', 'OnDemandCostEquivalent' => '<string>', ], 'SavingsPlanArn' => '<string>', 'Utilization' => [ 'TotalCommitment' => '<string>', 'UnusedCommitment' => '<string>', 'UsedCommitment' => '<string>', 'UtilizationPercentage' => '<string>', ], ], // ... ], 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], 'Total' => [ 'AmortizedCommitment' => [ 'AmortizedRecurringCommitment' => '<string>', 'AmortizedUpfrontCommitment' => '<string>', 'TotalAmortizedCommitment' => '<string>', ], 'Savings' => [ 'NetSavings' => '<string>', 'OnDemandCostEquivalent' => '<string>', ], 'Utilization' => [ 'TotalCommitment' => '<string>', 'UnusedCommitment' => '<string>', 'UsedCommitment' => '<string>', 'UtilizationPercentage' => '<string>', ], ], ]
Result Details
Members
- NextToken
-
- Type: 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.
- SavingsPlansUtilizationDetails
-
- Required: Yes
- Type: Array of SavingsPlansUtilizationDetail structures
Retrieves a single daily or monthly Savings Plans utilization rate and details for your account.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
The time period of the request.
- Total
-
- Type: SavingsPlansUtilizationAggregates structure
The total Savings Plans utilization, regardless of time period.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
GetTags
$result = $client->getTags
([/* ... */]); $promise = $client->getTagsAsync
([/* ... */]);
Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
Parameter Syntax
$result = $client->getTags([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'MaxResults' => <integer>, 'NextPageToken' => '<string>', 'SearchString' => '<string>', 'SortBy' => [ [ 'Key' => '<string>', // REQUIRED 'SortOrder' => 'ASCENDING|DESCENDING', ], // ... ], 'TagKey' => '<string>', 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - MaxResults
-
- Type: int
This field is only used when SortBy is provided in the request. The maximum number of objects that to be returned for this request. If MaxResults is not specified with SortBy, the request will return 1000 results as the default value for this parameter.
For
GetTags
, MaxResults has an upper limit of 1000. - NextPageToken
-
- Type: string
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- SearchString
-
- Type: string
The value that you want to search for.
- SortBy
-
- Type: Array of SortDefinition structures
The value by which you want to sort the data.
The key represents cost and usage metrics. The following values are supported:
-
BlendedCost
-
UnblendedCost
-
AmortizedCost
-
NetAmortizedCost
-
NetUnblendedCost
-
UsageQuantity
-
NormalizedUsageAmount
Supported values for
SortOrder
areASCENDING
orDESCENDING
.When using
SortBy
,NextPageToken
andSearchString
are not supported. - TagKey
-
- Type: string
The key of the tag that you want to return values for.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
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
.
Result Syntax
[ 'NextPageToken' => '<string>', 'ReturnSize' => <integer>, 'Tags' => ['<string>', ...], 'TotalSize' => <integer>, ]
Result Details
Members
- NextPageToken
-
- Type: string
The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.
- ReturnSize
-
- Required: Yes
- Type: int
The number of query results that AWS returns at a time.
- Tags
-
- Required: Yes
- Type: Array of strings
The tags that match your request.
- TotalSize
-
- Required: Yes
- Type: int
The total number of query results.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested report expired. Update the date interval and try again.
-
The requested data is unavailable.
-
The pagination token is invalid. Try again without a pagination token.
-
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
GetUsageForecast
$result = $client->getUsageForecast
([/* ... */]); $promise = $client->getUsageForecastAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->getUsageForecast([ 'Filter' => [ 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Granularity' => 'DAILY|MONTHLY|HOURLY', // REQUIRED 'Metric' => 'BLENDED_COST|UNBLENDED_COST|AMORTIZED_COST|NET_UNBLENDED_COST|NET_AMORTIZED_COST|USAGE_QUANTITY|NORMALIZED_USAGE_AMOUNT', // REQUIRED 'PredictionIntervalLevel' => <integer>, 'TimePeriod' => [ // REQUIRED 'End' => '<string>', // REQUIRED 'Start' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- Filter
-
- Type: Expression structure
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
- Granularity
-
- Required: Yes
- Type: string
How granular you want the forecast to be. You can get 3 months of
DAILY
forecasts or 12 months ofMONTHLY
forecasts.The
GetUsageForecast
operation supports onlyDAILY
andMONTHLY
granularities. - Metric
-
- Required: Yes
- Type: string
Which metric Cost Explorer uses to create your forecast.
Valid values for a
GetUsageForecast
call are the following:-
USAGE_QUANTITY
-
NORMALIZED_USAGE_AMOUNT
- PredictionIntervalLevel
-
- Type: int
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.
- TimePeriod
-
- Required: Yes
- Type: DateInterval structure
The start and end dates of the period that you want to retrieve usage forecast for. 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
. The start date must be equal to or later than the current date to avoid a validation error.
Result Syntax
[ 'ForecastResultsByTime' => [ [ 'MeanValue' => '<string>', 'PredictionIntervalLowerBound' => '<string>', 'PredictionIntervalUpperBound' => '<string>', 'TimePeriod' => [ 'End' => '<string>', 'Start' => '<string>', ], ], // ... ], 'Total' => [ 'Amount' => '<string>', 'Unit' => '<string>', ], ]
Result Details
Members
- ForecastResultsByTime
-
- Type: Array of ForecastResult structures
The forecasts for your query, in order. For
DAILY
forecasts, this is a list of days. ForMONTHLY
forecasts, this is a list of months. - Total
-
- Type: MetricValue structure
How much you're forecasted to use over the forecast period.
Errors
-
You made too many calls in a short period of time. Try again later.
-
The requested data is unavailable.
-
UnresolvableUsageUnitException:
Cost Explorer was unable to identify the usage unit. Provide
UsageType/UsageTypeGroup
filter selections that contain matching units, for example:hours
.
ListCostCategoryDefinitions
$result = $client->listCostCategoryDefinitions
([/* ... */]); $promise = $client->listCostCategoryDefinitionsAsync
([/* ... */]);
Returns the name, ARN, NumberOfRules
and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn
to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn
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 a MaxResults
range up to 100.
Parameter Syntax
$result = $client->listCostCategoryDefinitions([ 'EffectiveOn' => '<string>', 'MaxResults' => <integer>, 'NextToken' => '<string>', ]);
Parameter Details
Members
- EffectiveOn
-
- Type: string
The date when the Cost Category was effective.
- MaxResults
-
- Type: int
The number of entries a paginated response contains.
- NextToken
-
- Type: 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.
Result Syntax
[ 'CostCategoryReferences' => [ [ 'CostCategoryArn' => '<string>', 'EffectiveEnd' => '<string>', 'EffectiveStart' => '<string>', 'Name' => '<string>', 'NumberOfRules' => <integer>, 'ProcessingStatus' => [ [ 'Component' => 'COST_EXPLORER', 'Status' => 'PROCESSING|APPLIED', ], // ... ], 'Values' => ['<string>', ...], ], // ... ], 'NextToken' => '<string>', ]
Result Details
Members
- CostCategoryReferences
-
- Type: Array of CostCategoryReference structures
A reference to a Cost Category containing enough information to identify the Cost Category.
- NextToken
-
- Type: 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.
Errors
-
You made too many calls in a short period of time. Try again later.
ProvideAnomalyFeedback
$result = $client->provideAnomalyFeedback
([/* ... */]); $promise = $client->provideAnomalyFeedbackAsync
([/* ... */]);
Modifies the feedback property of a given cost anomaly.
Parameter Syntax
$result = $client->provideAnomalyFeedback([ 'AnomalyId' => '<string>', // REQUIRED 'Feedback' => 'YES|NO|PLANNED_ACTIVITY', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'AnomalyId' => '<string>', ]
Result Details
Errors
-
You made too many calls in a short period of time. Try again later.
UpdateAnomalyMonitor
$result = $client->updateAnomalyMonitor
([/* ... */]); $promise = $client->updateAnomalyMonitorAsync
([/* ... */]);
Updates an existing cost anomaly monitor. The changes made are applied going forward, and does not change anomalies detected in the past.
Parameter Syntax
$result = $client->updateAnomalyMonitor([ 'MonitorArn' => '<string>', // REQUIRED 'MonitorName' => '<string>', ]);
Parameter Details
Members
Result Syntax
[ 'MonitorArn' => '<string>', ]
Result Details
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly monitor does not exist for the account.
UpdateAnomalySubscription
$result = $client->updateAnomalySubscription
([/* ... */]); $promise = $client->updateAnomalySubscriptionAsync
([/* ... */]);
Updates an existing cost anomaly monitor subscription.
Parameter Syntax
$result = $client->updateAnomalySubscription([ 'Frequency' => 'DAILY|IMMEDIATE|WEEKLY', 'MonitorArnList' => ['<string>', ...], 'Subscribers' => [ [ 'Address' => '<string>', 'Status' => 'CONFIRMED|DECLINED', 'Type' => 'EMAIL|SNS', ], // ... ], 'SubscriptionArn' => '<string>', // REQUIRED 'SubscriptionName' => '<string>', 'Threshold' => <float>, ]);
Parameter Details
Members
- Frequency
-
- Type: string
The update to the frequency value at which subscribers will receive notifications.
- MonitorArnList
-
- Type: Array of strings
A list of cost anomaly monitor ARNs.
- Subscribers
-
- Type: Array of Subscriber structures
The update to the subscriber list.
- SubscriptionArn
-
- Required: Yes
- Type: string
A cost anomaly subscription Amazon Resource Name (ARN).
- SubscriptionName
-
- Type: string
The subscription's new name.
- Threshold
-
- Type: double
The update to the threshold value for receiving notifications.
Result Syntax
[ 'SubscriptionArn' => '<string>', ]
Result Details
Errors
-
You made too many calls in a short period of time. Try again later.
-
The cost anomaly monitor does not exist for the account.
-
The cost anomaly subscription does not exist for the account.
UpdateCostCategoryDefinition
$result = $client->updateCostCategoryDefinition
([/* ... */]); $promise = $client->updateCostCategoryDefinitionAsync
([/* ... */]);
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.
Parameter Syntax
$result = $client->updateCostCategoryDefinition([ 'CostCategoryArn' => '<string>', // REQUIRED 'RuleVersion' => 'CostCategoryExpression.v1', // REQUIRED 'Rules' => [ // REQUIRED [ 'Rule' => [ // REQUIRED 'And' => [ [...], // RECURSIVE // ... ], 'CostCategories' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], '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', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], 'Not' => [...], // RECURSIVE 'Or' => [ [...], // RECURSIVE // ... ], 'Tags' => [ 'Key' => '<string>', 'MatchOptions' => ['<string>', ...], 'Values' => ['<string>', ...], ], ], 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- CostCategoryArn
-
- Required: Yes
- Type: string
The unique identifier for your Cost Category.
- RuleVersion
-
- Required: Yes
- Type: string
The rule schema version in this particular Cost Category.
- Rules
-
- Required: Yes
- Type: Array of CostCategoryRule structures
The
Expression
object used to categorize costs. For more information, see CostCategoryRule .
Result Syntax
[ 'CostCategoryArn' => '<string>', 'EffectiveStart' => '<string>', ]
Result Details
Members
Errors
-
The specified ARN in the request doesn't exist.
-
ServiceQuotaExceededException:
You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
-
You made too many calls in a short period of time. Try again later.
Shapes
Anomaly
Description
An unusual cost pattern. This consists of the detailed metadata and the current status of the anomaly object.
Members
- AnomalyEndDate
-
- Type: string
The last day the anomaly is detected.
- AnomalyId
-
- Required: Yes
- Type: string
The unique identifier for the anomaly.
- AnomalyScore
-
- Required: Yes
- Type: AnomalyScore structure
The latest and maximum score for the anomaly.
- AnomalyStartDate
-
- Type: string
The first day the anomaly is detected.
- DimensionValue
-
- Type: string
The dimension for the anomaly. For example, an AWS service in a service monitor.
- Feedback
-
- Type: string
The feedback value.
- Impact
-
- Required: Yes
- Type: Impact structure
The dollar impact for the anomaly.
- MonitorArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) for the cost monitor that generated this anomaly.
- RootCauses
-
- Type: Array of RootCause structures
The list of identified root causes for the anomaly.
AnomalyDateInterval
Description
The time period for an anomaly.
Members
AnomalyMonitor
Description
This object continuously inspects your account's cost data for anomalies, based on MonitorType
and MonitorSpecification
. The content consists of detailed metadata and the current status of the monitor object.
Members
- CreationDate
-
- Type: string
The date when the monitor was created.
- DimensionalValueCount
-
- Type: int
The value for evaluated dimensions.
- LastEvaluatedDate
-
- Type: string
The date when the monitor last evaluated for anomalies.
- LastUpdatedDate
-
- Type: string
The date when the monitor was last updated.
- MonitorArn
-
- Type: string
The Amazon Resource Name (ARN) value.
- MonitorDimension
-
- Type: string
The dimensions to evaluate.
- MonitorName
-
- Required: Yes
- Type: string
The name of the monitor.
- MonitorSpecification
-
- Type: Expression structure
Use
Expression
to filter by cost or by usage. There are two patterns:-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
. - MonitorType
-
- Required: Yes
- Type: string
The possible type values.
AnomalyScore
Description
Quantifies the anomaly. The higher score means that it is more anomalous.
Members
AnomalySubscription
Description
The association between a monitor, threshold, and list of subscribers used to deliver notifications about anomalies detected by a monitor that exceeds a threshold. The content consists of the detailed metadata and the current status of the AnomalySubscription
object.
Members
- AccountId
-
- Type: string
Your unique account identifier.
- Frequency
-
- Required: Yes
- Type: string
The frequency at which anomaly reports are sent over email.
- MonitorArnList
-
- Required: Yes
- Type: Array of strings
A list of cost anomaly monitors.
- Subscribers
-
- Required: Yes
- Type: Array of Subscriber structures
A list of subscribers to notify.
- SubscriptionArn
-
- Type: string
The
AnomalySubscription
Amazon Resource Name (ARN). - SubscriptionName
-
- Required: Yes
- Type: string
The name for the subscription.
- Threshold
-
- Required: Yes
- Type: double
The dollar value that triggers a notification if the threshold is exceeded.
BillExpirationException
Description
The requested report expired. Update the date interval and try again.
Members
CostCategory
Description
The structure of Cost Categories. This includes detailed metadata and the set of rules for the CostCategory
object.
Members
- CostCategoryArn
-
- Required: Yes
- Type: string
The unique identifier for your Cost Category.
- EffectiveEnd
-
- Type: string
The Cost Category's effective end date.
- EffectiveStart
-
- Required: Yes
- Type: string
The Cost Category's effective start date.
- Name
-
- Required: Yes
- Type: string
The unique name of the Cost Category.
- ProcessingStatus
-
- Type: Array of CostCategoryProcessingStatus structures
The list of processing statuses for Cost Management products for a specific cost category.
- RuleVersion
-
- Required: Yes
- Type: string
The rule schema version in this particular Cost Category.
- Rules
-
- Required: Yes
- Type: Array of CostCategoryRule structures
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.
CostCategoryProcessingStatus
Description
The list of processing statuses for Cost Management products for a specific cost category.
Members
CostCategoryReference
Description
A reference to a Cost Category containing only enough information to identify the Cost Category.
You can use this information to retrieve the full Cost Category information using DescribeCostCategory
.
Members
- CostCategoryArn
-
- Type: string
The unique identifier for your Cost Category.
- EffectiveEnd
-
- Type: string
The Cost Category's effective end date.
- EffectiveStart
-
- Type: string
The Cost Category's effective start date.
- Name
-
- Type: string
The unique name of the Cost Category.
- NumberOfRules
-
- Type: int
The number of rules associated with a specific Cost Category.
- ProcessingStatus
-
- Type: Array of CostCategoryProcessingStatus structures
The list of processing statuses for Cost Management products for a specific cost category.
- Values
-
- Type: Array of strings
A list of unique cost category values in a specific cost category.
CostCategoryRule
Description
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.
Members
- Rule
-
- Required: Yes
- Type: Expression structure
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
, andLINKED_ACCOUNT_NAME
.Root level
OR
is not supported. We recommend that you create a separate rule instead.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 AWS Billing and Cost Management User Guide. - Value
-
- Required: Yes
- Type: string
The value a line item will be categorized as, if it matches the rule.
CostCategoryValues
Description
The Cost Categories values used for filtering the costs.
If Values
and Key
are not specified, the ABSENT
MatchOption
is applied to all Cost Categories. That is, filtering on resources that are not mapped to any Cost Categories.
If Values
is provided and Key
is not specified, the ABSENT
MatchOption
is applied to the Cost Categories Key
only. That is, filtering on resources without the given Cost Categories key.
Members
- Key
-
- Type: string
The unique name of the Cost Category.
- MatchOptions
-
- Type: Array of strings
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
. - Values
-
- Type: Array of strings
The specific value of the Cost Category.
Coverage
Description
The amount of instance usage that a reservation covered.
Members
- CoverageCost
-
- Type: CoverageCost structure
The amount of cost that the reservation covered.
- CoverageHours
-
- Type: CoverageHours structure
The amount of instance usage that the reservation covered, in hours.
- CoverageNormalizedUnits
-
- Type: CoverageNormalizedUnits structure
The amount of instance usage that the reservation covered, in normalized units.
CoverageByTime
Description
Reservation coverage for a specified period, in hours.
Members
- Groups
-
- Type: Array of ReservationCoverageGroup structures
The groups of instances that the reservation covered.
- TimePeriod
-
- Type: DateInterval structure
The period that this coverage was used over.
- Total
-
- Type: Coverage structure
The total reservation coverage, in hours.
CoverageCost
Description
How much it costs to run an instance.
Members
CoverageHours
Description
How long a running instance either used a reservation or was On-Demand.
Members
- CoverageHoursPercentage
-
- Type: string
The percentage of instance hours that a reservation covered.
- OnDemandHours
-
- Type: string
The number of instance running hours that On-Demand Instances covered.
- ReservedHours
-
- Type: string
The number of instance running hours that reservations covered.
- TotalRunningHours
-
- Type: string
The total instance usage, in hours.
CoverageNormalizedUnits
Description
The amount of instance usage, in normalized units. Normalized units enable you to see your EC2 usage for multiple sizes of instances in a uniform way. For example, suppose you run an xlarge instance and a 2xlarge instance. If you run both instances for the same amount of time, the 2xlarge instance uses twice as much of your reservation as the xlarge instance, even though both instances show only one instance-hour. Using normalized units instead of instance-hours, the xlarge instance used 8 normalized units, and the 2xlarge instance used 16 normalized units.
For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide for Linux Instances.
Members
- CoverageNormalizedUnitsPercentage
-
- Type: string
The percentage of your used instance normalized units that a reservation covers.
- OnDemandNormalizedUnits
-
- Type: string
The number of normalized units that are covered by On-Demand Instances instead of a reservation.
- ReservedNormalizedUnits
-
- Type: string
The number of normalized units that a reservation covers.
- TotalRunningNormalizedUnits
-
- Type: string
The total number of normalized units that you used.
CurrentInstance
Description
Context about the current instance.
Members
- CurrencyCode
-
- Type: string
The currency code that AWS used to calculate the costs for this instance.
- InstanceName
-
- Type: string
The name you've given an instance. This field will show as blank if you haven't given the instance a name.
- MonthlyCost
-
- Type: string
Current On-Demand cost of operating this instance on a monthly basis.
- OnDemandHoursInLookbackPeriod
-
- Type: string
Number of hours during the lookback period billed at On-Demand rates.
- ReservationCoveredHoursInLookbackPeriod
-
- Type: string
Number of hours during the lookback period covered by reservations.
- ResourceDetails
-
- Type: ResourceDetails structure
Details about the resource and utilization.
- ResourceId
-
- Type: string
Resource ID of the current instance.
- ResourceUtilization
-
- Type: ResourceUtilization structure
Utilization information of the current instance during the lookback period.
- SavingsPlansCoveredHoursInLookbackPeriod
-
- Type: string
Number of hours during the lookback period covered by Savings Plans.
- Tags
-
- Type: Array of TagValues structures
Cost allocation resource tags applied to the instance.
- TotalRunningHoursInLookbackPeriod
-
- Type: string
The total number of hours the instance ran during the lookback period.
DataUnavailableException
DateInterval
Description
The time period of the request.
Members
- End
-
- Required: Yes
- Type: string
The end of the time period. The end date is exclusive. For example, if
end
is2017-05-01
, AWS retrieves cost and usage data from the start date up to, but not including,2017-05-01
. - Start
-
- Required: Yes
- Type: string
The beginning of the time period. The start date is inclusive. For example, if
start
is2017-01-01
, AWS 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.
DimensionValues
Description
The metadata that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
Members
- Key
-
- Type: 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. - MatchOptions
-
- Type: Array of strings
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
. - Values
-
- Type: Array of strings
The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.
DimensionValuesWithAttributes
Description
The metadata of a specific type that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
Members
EBSResourceUtilization
Description
The EBS field that contains a list of EBS metrics associated with the current instance.
Members
- EbsReadBytesPerSecond
-
- Type: string
The maximum size of read operations per second
- EbsReadOpsPerSecond
-
- Type: string
The maximum number of read operations per second.
- EbsWriteBytesPerSecond
-
- Type: string
The maximum size of write operations per second.
- EbsWriteOpsPerSecond
-
- Type: string
The maximum number of write operations per second.
EC2InstanceDetails
Description
Details about the Amazon EC2 instances that AWS recommends that you purchase.
Members
- AvailabilityZone
-
- Type: string
The Availability Zone of the recommended reservation.
- CurrentGeneration
-
- Type: boolean
Whether the recommendation is for a current-generation instance.
- Family
-
- Type: string
The instance family of the recommended reservation.
- InstanceType
-
- Type: string
The type of instance that AWS recommends.
- Platform
-
- Type: string
The platform of the recommended reservation. The platform is the specific combination of operating system, license model, and software on an instance.
- Region
-
- Type: string
The AWS Region of the recommended reservation.
- SizeFlexEligible
-
- Type: boolean
Whether the recommended reservation is size flexible.
- Tenancy
-
- Type: string
Whether the recommended reservation is dedicated or shared.
EC2ResourceDetails
Description
Details on the Amazon EC2 Resource.
Members
- HourlyOnDemandRate
-
- Type: string
Hourly public On-Demand rate for the instance type.
- InstanceType
-
- Type: string
The type of AWS instance.
- Memory
-
- Type: string
Memory capacity of the AWS instance.
- NetworkPerformance
-
- Type: string
Network performance capacity of the AWS instance.
- Platform
-
- Type: string
The platform of the AWS instance. The platform is the specific combination of operating system, license model, and software on an instance.
- Region
-
- Type: string
The AWS Region of the instance.
- Sku
-
- Type: string
The SKU of the product.
- Storage
-
- Type: string
The disk storage of the AWS instance (not EBS storage).
- Vcpu
-
- Type: string
Number of VCPU cores in the AWS instance type.
EC2ResourceUtilization
Description
Utilization metrics of the instance.
Members
- EBSResourceUtilization
-
- Type: EBSResourceUtilization structure
The EBS field that contains a list of EBS metrics associated with the current instance.
- MaxCpuUtilizationPercentage
-
- Type: string
Maximum observed or expected CPU utilization of the instance.
- MaxMemoryUtilizationPercentage
-
- Type: string
Maximum observed or expected memory utilization of the instance.
- MaxStorageUtilizationPercentage
-
- Type: string
Maximum observed or expected storage utilization of the instance (does not measure EBS storage).
EC2Specification
Description
The Amazon EC2 hardware specifications that you want AWS to provide recommendations for.
Members
ESInstanceDetails
Description
Details about the Amazon ES instances that AWS recommends that you purchase.
Members
- CurrentGeneration
-
- Type: boolean
Whether the recommendation is for a current-generation instance.
- InstanceClass
-
- Type: string
The class of instance that AWS recommends.
- InstanceSize
-
- Type: string
The size of instance that AWS recommends.
- Region
-
- Type: string
The AWS Region of the recommended reservation.
- SizeFlexEligible
-
- Type: boolean
Whether the recommended reservation is size flexible.
ElastiCacheInstanceDetails
Description
Details about the Amazon ElastiCache instances that AWS recommends that you purchase.
Members
- CurrentGeneration
-
- Type: boolean
Whether the recommendation is for a current generation instance.
- Family
-
- Type: string
The instance family of the recommended reservation.
- NodeType
-
- Type: string
The type of node that AWS recommends.
- ProductDescription
-
- Type: string
The description of the recommended reservation.
- Region
-
- Type: string
The AWS Region of the recommended reservation.
- SizeFlexEligible
-
- Type: boolean
Whether the recommended reservation is size flexible.
Expression
Description
Use Expression
to filter by cost or by usage. There are two patterns:
-
Simple dimension values - 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)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR'd together to retrieve cost or usage data. You can create
Expression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines. -
Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Because each
Expression
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": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
For the GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren't supported. Dimensions are also limited to LINKED_ACCOUNT
, REGION
, or RIGHTSIZING_TYPE
.
For the GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited to LINKED_ACCOUNT
.
Members
- And
-
- Type: Array of Expression structures
Return results that match both
Dimension
objects. - CostCategories
-
- Type: CostCategoryValues structure
The filter based on
CostCategory
values. - Dimensions
-
- Type: DimensionValues structure
The specific
Dimension
to use forExpression
. - Not
-
- Type: Expression structure
Return results that don't match a
Dimension
object. - Or
-
- Type: Array of Expression structures
Return results that match either
Dimension
object. - Tags
-
- Type: TagValues structure
The specific
Tag
to use forExpression
.
ForecastResult
Description
The forecast created for your query.
Members
- MeanValue
-
- Type: string
The mean value of the forecast.
- PredictionIntervalLowerBound
-
- Type: string
The lower limit for the prediction interval.
- PredictionIntervalUpperBound
-
- Type: string
The upper limit for the prediction interval.
- TimePeriod
-
- Type: DateInterval structure
The period of time that the forecast covers.
Group
Description
One level of grouped data in the results.
Members
- Keys
-
- Type: Array of strings
The keys that are included in this group.
- Metrics
-
- Type: Associative array of custom strings keys (MetricName) to MetricValue structures
The metrics that are included in this group.
GroupDefinition
Description
Represents a group when you specify a group by criteria or in the response to a query with a specific grouping.
Members
Impact
Description
The anomaly's dollar value.
Members
InstanceDetails
Description
Details about the instances that AWS recommends that you purchase.
Members
- EC2InstanceDetails
-
- Type: EC2InstanceDetails structure
The Amazon EC2 instances that AWS recommends that you purchase.
- ESInstanceDetails
-
- Type: ESInstanceDetails structure
The Amazon ES instances that AWS recommends that you purchase.
- ElastiCacheInstanceDetails
-
- Type: ElastiCacheInstanceDetails structure
The ElastiCache instances that AWS recommends that you purchase.
- RDSInstanceDetails
-
- Type: RDSInstanceDetails structure
The Amazon RDS instances that AWS recommends that you purchase.
- RedshiftInstanceDetails
-
- Type: RedshiftInstanceDetails structure
The Amazon Redshift instances that AWS recommends that you purchase.
InvalidNextTokenException
Description
The pagination token is invalid. Try again without a pagination token.
Members
LimitExceededException
Description
You made too many calls in a short period of time. Try again later.
Members
MetricValue
Description
The aggregated value for a metric.
Members
ModifyRecommendationDetail
Description
Details on the modification recommendation.
Members
- TargetInstances
-
- Type: Array of TargetInstance structures
Identifies whether this instance type is the AWS default recommendation.
RDSInstanceDetails
Description
Details about the Amazon RDS instances that AWS recommends that you purchase.
Members
- CurrentGeneration
-
- Type: boolean
Whether the recommendation is for a current-generation instance.
- DatabaseEdition
-
- Type: string
The database edition that the recommended reservation supports.
- DatabaseEngine
-
- Type: string
The database engine that the recommended reservation supports.
- DeploymentOption
-
- Type: string
Whether the recommendation is for a reservation in a single Availability Zone or a reservation with a backup in a second Availability Zone.
- Family
-
- Type: string
The instance family of the recommended reservation.
- InstanceType
-
- Type: string
The type of instance that AWS recommends.
- LicenseModel
-
- Type: string
The license model that the recommended reservation supports.
- Region
-
- Type: string
The AWS Region of the recommended reservation.
- SizeFlexEligible
-
- Type: boolean
Whether the recommended reservation is size flexible.
RedshiftInstanceDetails
Description
Details about the Amazon Redshift instances that AWS recommends that you purchase.
Members
- CurrentGeneration
-
- Type: boolean
Whether the recommendation is for a current-generation instance.
- Family
-
- Type: string
The instance family of the recommended reservation.
- NodeType
-
- Type: string
The type of node that AWS recommends.
- Region
-
- Type: string
The AWS Region of the recommended reservation.
- SizeFlexEligible
-
- Type: boolean
Whether the recommended reservation is size flexible.
RequestChangedException
Description
Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
Members
ReservationAggregates
Description
The aggregated numbers for your reservation usage.
Members
- AmortizedRecurringFee
-
- Type: string
The monthly cost of your reservation, amortized over the reservation period.
- AmortizedUpfrontFee
-
- Type: string
The upfront cost of your reservation, amortized over the reservation period.
- NetRISavings
-
- Type: string
How much you saved due to purchasing and utilizing reservation. AWS calculates this by subtracting
TotalAmortizedFee
fromOnDemandCostOfRIHoursUsed
. - OnDemandCostOfRIHoursUsed
-
- Type: string
How much your reservation would cost if charged On-Demand rates.
- PurchasedHours
-
- Type: string
How many reservation hours that you purchased.
- PurchasedUnits
-
- Type: string
How many Amazon EC2 reservation hours that you purchased, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
- RICostForUnusedHours
-
- Type: string
The cost of unused hours for your reservation.
- RealizedSavings
-
- Type: string
The realized savings due to purchasing and using a reservation.
- TotalActualHours
-
- Type: string
The total number of reservation hours that you used.
- TotalActualUnits
-
- Type: string
The total number of Amazon EC2 reservation hours that you used, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
- TotalAmortizedFee
-
- Type: string
The total cost of your reservation, amortized over the reservation period.
- TotalPotentialRISavings
-
- Type: string
How much you could save if you use your entire reservation.
- UnrealizedSavings
-
- Type: string
The unrealized savings due to purchasing and using a reservation.
- UnusedHours
-
- Type: string
The number of reservation hours that you didn't use.
- UnusedUnits
-
- Type: string
The number of Amazon EC2 reservation hours that you didn't use, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
- UtilizationPercentage
-
- Type: string
The percentage of reservation time that you used.
- UtilizationPercentageInUnits
-
- Type: string
The percentage of Amazon EC2 reservation time that you used, converted to normalized units. Normalized units are available only for Amazon EC2 usage after November 11, 2017.
ReservationCoverageGroup
Description
A group of reservations that share a set of attributes.
Members
- Attributes
-
- Type: Associative array of custom strings keys (AttributeType) to strings
The attributes for this group of reservations.
- Coverage
-
- Type: Coverage structure
How much instance usage this group of reservations covered.
ReservationPurchaseRecommendation
Description
A specific reservation that AWS recommends for purchase.
Members
- AccountScope
-
- Type: string
The account scope that AWS recommends that you purchase this instance for. For example, you can purchase this reservation for an entire organization in AWS Organizations.
- LookbackPeriodInDays
-
- Type: string
How many days of previous usage that AWS considers when making this recommendation.
- PaymentOption
-
- Type: string
The payment option for the reservation. For example,
AllUpfront
orNoUpfront
. - RecommendationDetails
-
- Type: Array of ReservationPurchaseRecommendationDetail structures
Details about the recommended purchases.
- RecommendationSummary
-
- Type: ReservationPurchaseRecommendationSummary structure
A summary about the recommended purchase.
- ServiceSpecification
-
- Type: ServiceSpecification structure
Hardware specifications for the service that you want recommendations for.
- TermInYears
-
- Type: string
The term of the reservation that you want recommendations for, in years.
ReservationPurchaseRecommendationDetail
Description
Details about your recommended reservation purchase.
Members
- AccountId
-
- Type: string
The account that this RI recommendation is for.
- AverageNormalizedUnitsUsedPerHour
-
- Type: string
The average number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- AverageNumberOfInstancesUsedPerHour
-
- Type: string
The average number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- AverageUtilization
-
- Type: string
The average utilization of your instances. AWS uses this to calculate your recommended reservation purchases.
- CurrencyCode
-
- Type: string
The currency code that AWS used to calculate the costs for this instance.
- EstimatedBreakEvenInMonths
-
- Type: string
How long AWS estimates that it takes for this instance to start saving you money, in months.
- EstimatedMonthlyOnDemandCost
-
- Type: string
How much AWS estimates that you spend on On-Demand Instances in a month.
- EstimatedMonthlySavingsAmount
-
- Type: string
How much AWS estimates that this specific recommendation could save you in a month.
- EstimatedMonthlySavingsPercentage
-
- Type: string
How much AWS estimates that this specific recommendation could save you in a month, as a percentage of your overall costs.
- EstimatedReservationCostForLookbackPeriod
-
- Type: string
How much AWS estimates that you would have spent for all usage during the specified historical period if you had a reservation.
- InstanceDetails
-
- Type: InstanceDetails structure
Details about the instances that AWS recommends that you purchase.
- MaximumNormalizedUnitsUsedPerHour
-
- Type: string
The maximum number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- MaximumNumberOfInstancesUsedPerHour
-
- Type: string
The maximum number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- MinimumNormalizedUnitsUsedPerHour
-
- Type: string
The minimum number of normalized units that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- MinimumNumberOfInstancesUsedPerHour
-
- Type: string
The minimum number of instances that you used in an hour during the historical period. AWS uses this to calculate your recommended reservation purchases.
- RecommendedNormalizedUnitsToPurchase
-
- Type: string
The number of normalized units that AWS recommends that you purchase.
- RecommendedNumberOfInstancesToPurchase
-
- Type: string
The number of instances that AWS recommends that you purchase.
- RecurringStandardMonthlyCost
-
- Type: string
How much purchasing this instance costs you on a monthly basis.
- UpfrontCost
-
- Type: string
How much purchasing this instance costs you upfront.
ReservationPurchaseRecommendationMetadata
Description
Information about this specific recommendation, such as the timestamp for when AWS made a specific recommendation.
Members
ReservationPurchaseRecommendationSummary
Description
A summary about this recommendation, such as the currency code, the amount that AWS estimates that you could save, and the total amount of reservation to purchase.
Members
- CurrencyCode
-
- Type: string
The currency code used for this recommendation.
- TotalEstimatedMonthlySavingsAmount
-
- Type: string
The total amount that AWS estimates that this recommendation could save you in a month.
- TotalEstimatedMonthlySavingsPercentage
-
- Type: string
The total amount that AWS estimates that this recommendation could save you in a month, as a percentage of your costs.
ReservationUtilizationGroup
Description
A group of reservations that share a set of attributes.
Members
- Attributes
-
- Type: Associative array of custom strings keys (AttributeType) to strings
The attributes for this group of reservations.
- Key
-
- Type: string
The key for a specific reservation attribute.
- Utilization
-
- Type: ReservationAggregates structure
How much you used this group of reservations.
- Value
-
- Type: string
The value of a specific reservation attribute.
ResourceDetails
Description
Details on the resource.
Members
- EC2ResourceDetails
-
- Type: EC2ResourceDetails structure
Details on the Amazon EC2 resource.
ResourceNotFoundException
ResourceUtilization
Description
Resource utilization of current resource.
Members
- EC2ResourceUtilization
-
- Type: EC2ResourceUtilization structure
Utilization of current Amazon EC2 instance.
ResultByTime
Description
The result that is associated with a time period.
Members
- Estimated
-
- Type: boolean
Whether the result is estimated.
- Groups
-
- Type: Array of Group structures
The groups that this time period includes.
- TimePeriod
-
- Type: DateInterval structure
The time period that the result covers.
- Total
-
- Type: Associative array of custom strings keys (MetricName) to MetricValue structures
The total amount of cost or usage accrued during the time period.
RightsizingRecommendation
Description
Recommendations to rightsize resources.
Members
- AccountId
-
- Type: string
The account that this recommendation is for.
- CurrentInstance
-
- Type: CurrentInstance structure
Context regarding the current instance.
- ModifyRecommendationDetail
-
- Type: ModifyRecommendationDetail structure
Details for modification recommendations.
- RightsizingType
-
- Type: string
Recommendation to either terminate or modify the resource.
- TerminateRecommendationDetail
-
- Type: TerminateRecommendationDetail structure
Details for termination recommendations.
RightsizingRecommendationConfiguration
Description
Enables you 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 associated with recommendations with consideration of existing Savings Plans or RI benefits, or neither.
Members
- BenefitsConsidered
-
- Required: Yes
- Type: boolean
The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
TRUE
. - RecommendationTarget
-
- Required: Yes
- Type: string
The option to see recommendations within the same instance family, or recommendations for instances across other families. The default value is
SAME_INSTANCE_FAMILY
.
RightsizingRecommendationMetadata
Description
Metadata for this recommendation set.
Members
- AdditionalMetadata
-
- Type: string
Additional metadata that may be applicable to the recommendation.
- GenerationTimestamp
-
- Type: string
The timestamp for when AWS made this recommendation.
- LookbackPeriodInDays
-
- Type: string
How many days of previous usage that AWS considers when making this recommendation.
- RecommendationId
-
- Type: string
The ID for this specific recommendation.
RightsizingRecommendationSummary
Description
Summary of rightsizing recommendations
Members
- EstimatedTotalMonthlySavingsAmount
-
- Type: string
Estimated total savings resulting from modifications, on a monthly basis.
- SavingsCurrencyCode
-
- Type: string
The currency code that AWS used to calculate the savings.
- SavingsPercentage
-
- Type: string
Savings percentage based on the recommended modifications, relative to the total On-Demand costs associated with these instances.
- TotalRecommendationCount
-
- Type: string
Total number of instance recommendations.
RootCause
Description
The combination of AWS service, linked account, Region, and usage type where a cost anomaly is observed.
Members
- LinkedAccount
-
- Type: string
The linked account value associated with the cost anomaly.
- Region
-
- Type: string
The AWS Region associated with the cost anomaly.
- Service
-
- Type: string
The AWS service name associated with the cost anomaly.
- UsageType
-
- Type: string
The
UsageType
value associated with the cost anomaly.
SavingsPlansAmortizedCommitment
Description
The amortized amount of Savings Plans purchased in a specific account during a specific time interval.
Members
- AmortizedRecurringCommitment
-
- Type: string
The amortized amount of your Savings Plans commitment that was purchased with either a
Partial
or aNoUpfront
. - AmortizedUpfrontCommitment
-
- Type: string
The amortized amount of your Savings Plans commitment that was purchased with an
Upfront
orPartialUpfront
Savings Plans. - TotalAmortizedCommitment
-
- Type: string
The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.
SavingsPlansCoverage
Description
The amount of Savings Plans eligible usage that is covered by Savings Plans. All calculations consider the On-Demand equivalent of your Savings Plans usage.
Members
- Attributes
-
- Type: Associative array of custom strings keys (AttributeType) to strings
The attribute that applies to a specific
Dimension
. - Coverage
-
- Type: SavingsPlansCoverageData structure
The amount of Savings Plans eligible usage that the Savings Plans covered.
- TimePeriod
-
- Type: DateInterval structure
The time period of the request.
SavingsPlansCoverageData
Description
Specific coverage percentage, On-Demand costs, and spend covered by Savings Plans, and total Savings Plans costs for an account.
Members
- CoveragePercentage
-
- Type: 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).
- OnDemandCost
-
- Type: string
The cost of your AWS usage at the public On-Demand rate.
- SpendCoveredBySavingsPlans
-
- Type: string
The amount of your AWS usage that is covered by a Savings Plans.
- TotalCost
-
- Type: string
The total cost of your AWS usage, regardless of your purchase option.
SavingsPlansDetails
Description
Attribute details on a specific Savings Plan.
Members
- InstanceFamily
-
- Type: string
A group of instance types that Savings Plans applies to.
- OfferingId
-
- Type: string
The unique ID used to distinguish Savings Plans from one another.
- Region
-
- Type: string
A collection of AWS resources in a geographic area. Each AWS Region is isolated and independent of the other Regions.
SavingsPlansPurchaseRecommendation
Description
Contains your request parameters, Savings Plan Recommendations Summary, and Details.
Members
- AccountScope
-
- Type: 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 isLINKED
, recommendations are calculated for individual member accounts only. - LookbackPeriodInDays
-
- Type: string
The lookback period in days, used to generate the recommendation.
- PaymentOption
-
- Type: string
The payment option used to generate the recommendation.
- SavingsPlansPurchaseRecommendationDetails
-
- Type: Array of SavingsPlansPurchaseRecommendationDetail structures
Details for the Savings Plans we recommend that you purchase to cover existing Savings Plans eligible workloads.
- SavingsPlansPurchaseRecommendationSummary
-
- Type: SavingsPlansPurchaseRecommendationSummary structure
Summary metrics for your Savings Plans Recommendations.
- SavingsPlansType
-
- Type: string
The requested Savings Plans recommendation type.
- TermInYears
-
- Type: string
The Savings Plans recommendation term in years, used to generate the recommendation.
SavingsPlansPurchaseRecommendationDetail
Description
Details for your recommended Savings Plans.
Members
- AccountId
-
- Type: string
The
AccountID
the recommendation is generated for. - CurrencyCode
-
- Type: string
The currency code AWS used to generate the recommendations and present potential savings.
- CurrentAverageHourlyOnDemandSpend
-
- Type: string
The average value of hourly On-Demand spend over the lookback period of the applicable usage type.
- CurrentMaximumHourlyOnDemandSpend
-
- Type: string
The highest value of hourly On-Demand spend over the lookback period of the applicable usage type.
- CurrentMinimumHourlyOnDemandSpend
-
- Type: string
The lowest value of hourly On-Demand spend over the lookback period of the applicable usage type.
- EstimatedAverageUtilization
-
- Type: string
The estimated utilization of the recommended Savings Plans.
- EstimatedMonthlySavingsAmount
-
- Type: string
The estimated monthly savings amount, based on the recommended Savings Plans.
- EstimatedOnDemandCost
-
- Type: string
The remaining On-Demand cost estimated to not be covered by the recommended Savings Plans, over the length of the lookback period.
- EstimatedOnDemandCostWithCurrentCommitment
-
- Type: string
The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.
- EstimatedROI
-
- Type: string
The estimated return on investment based on the recommended Savings Plans purchased. This is calculated as
estimatedSavingsAmount
/estimatedSPCost
*100. - EstimatedSPCost
-
- Type: string
The cost of the recommended Savings Plans over the length of the lookback period.
- EstimatedSavingsAmount
-
- Type: string
The estimated savings amount based on the recommended Savings Plans over the length of the lookback period.
- EstimatedSavingsPercentage
-
- Type: string
The estimated savings percentage relative to the total cost of applicable On-Demand usage over the lookback period.
- HourlyCommitmentToPurchase
-
- Type: string
The recommended hourly commitment level for the Savings Plans type, and configuration based on the usage during the lookback period.
- SavingsPlansDetails
-
- Type: SavingsPlansDetails structure
Details for your recommended Savings Plans.
- UpfrontCost
-
- Type: string
The upfront cost of the recommended Savings Plans, based on the selected payment option.
SavingsPlansPurchaseRecommendationMetadata
Description
Metadata about your Savings Plans Purchase Recommendations.
Members
SavingsPlansPurchaseRecommendationSummary
Description
Summary metrics for your Savings Plans Purchase Recommendations.
Members
- CurrencyCode
-
- Type: string
The currency code AWS used to generate the recommendations and present potential savings.
- CurrentOnDemandSpend
-
- Type: string
The current total on demand spend of the applicable usage types over the lookback period.
- DailyCommitmentToPurchase
-
- Type: string
The recommended Savings Plans cost on a daily (24 hourly) basis.
- EstimatedMonthlySavingsAmount
-
- Type: string
The estimated monthly savings amount, based on the recommended Savings Plans purchase.
- EstimatedOnDemandCostWithCurrentCommitment
-
- Type: string
The estimated On-Demand costs you would expect with no additional commitment, based on your usage of the selected time period and the Savings Plans you own.
- EstimatedROI
-
- Type: string
The estimated return on investment based on the recommended Savings Plans and estimated savings.
- EstimatedSavingsAmount
-
- Type: string
The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
- EstimatedSavingsPercentage
-
- Type: string
The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated as
estimatedSavingsAmount
/CurrentOnDemandSpend
*100. - EstimatedTotalCost
-
- Type: 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.
- HourlyCommitmentToPurchase
-
- Type: string
The recommended hourly commitment based on the recommendation parameters.
- TotalRecommendationCount
-
- Type: string
The aggregate number of Savings Plans recommendations that exist for your account.
SavingsPlansSavings
Description
The amount of savings you're accumulating, against the public On-Demand rate of the usage accrued in an account.
Members
- NetSavings
-
- Type: string
The savings amount that you are accumulating for the usage that is covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.
- OnDemandCostEquivalent
-
- Type: string
How much the amount that the usage would have cost if it was accrued at the On-Demand rate.
SavingsPlansUtilization
Description
The measurement of how well you are using your existing Savings Plans.
Members
- TotalCommitment
-
- Type: string
The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).
- UnusedCommitment
-
- Type: string
The amount of your Savings Plans commitment that was not consumed from Savings Plans eligible usage in a specific period.
- UsedCommitment
-
- Type: string
The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.
- UtilizationPercentage
-
- Type: string
The amount of
UsedCommitment
divided by theTotalCommitment
for your Savings Plans.
SavingsPlansUtilizationAggregates
Description
The aggregated utilization metrics for your Savings Plans usage.
Members
- AmortizedCommitment
-
- Type: SavingsPlansAmortizedCommitment structure
The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.
- Savings
-
- Type: SavingsPlansSavings structure
The amount saved by using existing Savings Plans. Savings returns both net savings from Savings Plans, as well as the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate. - Utilization
-
- Required: Yes
- Type: SavingsPlansUtilization structure
A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
SavingsPlansUtilizationByTime
Description
The amount of Savings Plans utilization, in hours.
Members
- AmortizedCommitment
-
- Type: SavingsPlansAmortizedCommitment structure
The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.
- Savings
-
- Type: SavingsPlansSavings structure
The amount saved by using existing Savings Plans. Savings returns both net savings from Savings Plans as well as the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate. - TimePeriod
-
- Required: Yes
- Type: DateInterval structure
The time period of the request.
- Utilization
-
- Required: Yes
- Type: SavingsPlansUtilization structure
A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
SavingsPlansUtilizationDetail
Description
A single daily or monthly Savings Plans utilization rate, and details for your account. A management account in an organization have access to member accounts. You can use GetDimensionValues
to determine the possible dimension values.
Members
- AmortizedCommitment
-
- Type: SavingsPlansAmortizedCommitment structure
The total amortized commitment for a Savings Plans. Includes the sum of the upfront and recurring Savings Plans fees.
- Attributes
-
- Type: Associative array of custom strings keys (AttributeType) to strings
The attribute that applies to a specific
Dimension
. - Savings
-
- Type: SavingsPlansSavings structure
The amount saved by using existing Savings Plans. Savings returns both net savings from savings plans as well as the
onDemandCostEquivalent
of the Savings Plans when considering the utilization rate. - SavingsPlanArn
-
- Type: string
The unique Amazon Resource Name (ARN) for a particular Savings Plan.
- Utilization
-
- Type: SavingsPlansUtilization structure
A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.
ServiceQuotaExceededException
Description
You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
Members
ServiceSpecification
Description
Hardware specifications for the service that you want recommendations for.
Members
- EC2Specification
-
- Type: EC2Specification structure
The Amazon EC2 hardware specifications that you want AWS to provide recommendations for.
SortDefinition
Description
The details of how to sort the data.
Members
Subscriber
Description
The recipient of AnomalySubscription
notifications.
Members
TagValues
Description
The values that are available for a tag.
If Values
and Key
are not specified, the ABSENT
MatchOption
is applied to all tags. That is, filtering on resources with no tags.
If Values
is provided and Key
is not specified, the ABSENT
MatchOption
is applied to the tag Key
only. That is, filtering on resources without the given tag key.
Members
- Key
-
- Type: string
The key for the tag.
- MatchOptions
-
- Type: Array of strings
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
. - Values
-
- Type: Array of strings
The specific value of the tag.
TargetInstance
Description
Details on recommended instance.
Members
- CurrencyCode
-
- Type: string
The currency code that AWS used to calculate the costs for this instance.
- DefaultTargetInstance
-
- Type: boolean
Indicates whether this recommendation is the defaulted AWS recommendation.
- EstimatedMonthlyCost
-
- Type: string
Expected cost to operate this instance type on a monthly basis.
- EstimatedMonthlySavings
-
- Type: string
Estimated savings resulting from modification, on a monthly basis.
- ExpectedResourceUtilization
-
- Type: ResourceUtilization structure
Expected utilization metrics for target instance type.
- ResourceDetails
-
- Type: ResourceDetails structure
Details on the target instance type.
TerminateRecommendationDetail
Description
Details on termination recommendation.
Members
TotalImpactFilter
Description
Filters cost anomalies based on the total impact.
Members
UnknownMonitorException
UnknownSubscriptionException
Description
The cost anomaly subscription does not exist for the account.
Members
UnresolvableUsageUnitException
Description
Cost Explorer was unable to identify the usage unit. Provide UsageType/UsageTypeGroup
filter selections that contain matching units, for example: hours
.
Members
UtilizationByTime
Description
The amount of utilization, in hours.
Members
- Groups
-
- Type: Array of ReservationUtilizationGroup structures
The groups that this utilization result uses.
- TimePeriod
-
- Type: DateInterval structure
The period of time that this utilization was used for.
- Total
-
- Type: ReservationAggregates structure
The total number of reservation hours that were used.