2024/08/06 - Cost Optimization Hub - 1 updated api methods
Changes This release adds savings percentage support to the ListRecommendationSummaries API.
{'metrics': ['SavingsPercentage']}Response
{'metrics': {'savingsPercentage': 'string'}}
Returns a concise representation of savings estimates for resources. Also returns de-duped savings across different types of recommendations.
See also: AWS API Documentation
Request Syntax
client.list_recommendation_summaries( filter={ 'restartNeeded': True|False, 'rollbackPossible': True|False, 'implementationEfforts': [ 'VeryLow'|'Low'|'Medium'|'High'|'VeryHigh', ], 'accountIds': [ 'string', ], 'regions': [ 'string', ], 'resourceTypes': [ 'Ec2Instance'|'LambdaFunction'|'EbsVolume'|'EcsService'|'Ec2AutoScalingGroup'|'Ec2InstanceSavingsPlans'|'ComputeSavingsPlans'|'SageMakerSavingsPlans'|'Ec2ReservedInstances'|'RdsReservedInstances'|'OpenSearchReservedInstances'|'RedshiftReservedInstances'|'ElastiCacheReservedInstances'|'RdsDbInstanceStorage'|'RdsDbInstance', ], 'actionTypes': [ 'Rightsize'|'Stop'|'Upgrade'|'PurchaseSavingsPlans'|'PurchaseReservedInstances'|'MigrateToGraviton', ], 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'resourceIds': [ 'string', ], 'resourceArns': [ 'string', ], 'recommendationIds': [ 'string', ] }, groupBy='string', maxResults=123, metrics=[ 'SavingsPercentage', ], nextToken='string' )
dict
Describes a filter that returns a more specific list of recommendations. Filters recommendations by different dimensions.
restartNeeded (boolean) --
Whether or not implementing the recommendation requires a restart.
rollbackPossible (boolean) --
Whether or not implementing the recommendation can be rolled back.
implementationEfforts (list) --
The effort required to implement the recommendation.
(string) --
accountIds (list) --
The account that the recommendation is for.
(string) --
regions (list) --
The Amazon Web Services Region of the resource.
(string) --
resourceTypes (list) --
The resource type of the recommendation.
(string) --
actionTypes (list) --
The type of action you can take by adopting the recommendation.
(string) --
tags (list) --
A list of tags assigned to the recommendation.
(dict) --
The tag structure that contains a tag key and value.
key (string) --
The key that's associated with the tag.
value (string) --
The value that's associated with the tag.
resourceIds (list) --
The resource ID of the recommendation.
(string) --
resourceArns (list) --
The Amazon Resource Name (ARN) of the recommendation.
(string) --
recommendationIds (list) --
The IDs for the recommendations.
(string) --
string
[REQUIRED]
The grouping of recommendations by a dimension.
integer
The maximum number of recommendations to be returned for the request.
list
Additional metrics to be returned for the request. The only valid value is savingsPercentage.
(string) --
string
The token to retrieve the next set of results.
dict
Response Syntax
{ 'estimatedTotalDedupedSavings': 123.0, 'items': [ { 'group': 'string', 'estimatedMonthlySavings': 123.0, 'recommendationCount': 123 }, ], 'groupBy': 'string', 'currencyCode': 'string', 'metrics': { 'savingsPercentage': 'string' }, 'nextToken': 'string' }
Response Structure
(dict) --
estimatedTotalDedupedSavings (float) --
The total overall savings for the aggregated view.
items (list) --
A list of all savings recommendations.
(dict) --
The summary of rightsizing recommendations, including de-duped savings from all types of recommendations.
group (string) --
The grouping of recommendations.
estimatedMonthlySavings (float) --
The estimated total savings resulting from modifications, on a monthly basis.
recommendationCount (integer) --
The total number of instance recommendations.
groupBy (string) --
The dimension used to group the recommendations by.
currencyCode (string) --
The currency code used for the recommendation.
metrics (dict) --
The results or descriptions for the additional metrics, based on whether the metrics were or were not requested.
savingsPercentage (string) --
The savings percentage based on your Amazon Web Services spend over the past 30 days.
nextToken (string) --
The token to retrieve the next set of results.