recommendations
Creates, updates, deletes, gets or lists a recommendations resource.
Overview
| Name | recommendations |
| Type | Resource |
| Id | aws.cost_optimization_hub.recommendations |
Fields
The following fields are returned by SELECT queries:
- get_recommendation
- list_recommendations
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account to which the recommendation applies. |
action_type | string | The type of action you can take by adopting the recommendation. (Rightsize, Stop, Upgrade, PurchaseSavingsPlans, PurchaseReservedInstances, MigrateToGraviton, Delete, ScaleIn) |
cost_calculation_lookback_period_in_days | integer | The lookback period used to calculate cost impact for a recommendation. |
currency_code | string | The currency code used for the recommendation. |
current_resource_details | object | The details for the resource. |
current_resource_type | string | The type of resource. (Ec2Instance, LambdaFunction, EbsVolume, EcsService, Ec2AutoScalingGroup, Ec2InstanceSavingsPlans, ComputeSavingsPlans, SageMakerSavingsPlans, Ec2ReservedInstances, RdsReservedInstances, OpenSearchReservedInstances, RedshiftReservedInstances, ElastiCacheReservedInstances, RdsDbInstanceStorage, RdsDbInstance, AuroraDbClusterStorage, DynamoDbReservedCapacity, MemoryDbReservedInstances, NatGateway, DynamoDBTable, ElastiCacheCluster, MemoryDBCluster, DocumentDBCluster, WorkSpaces, SageMakerEndpoint) |
estimated_monthly_cost | number (double) | The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage. |
estimated_monthly_savings | number (double) | The estimated monthly savings amount for the recommendation. |
estimated_savings_over_cost_calculation_lookback_period | number (double) | The estimated savings amount over the lookback period used to calculate cost impact for a recommendation. |
estimated_savings_percentage | number (double) | The estimated savings percentage relative to the total cost over the cost calculation lookback period. |
implementation_effort | string | The effort required to implement the recommendation. (VeryLow, Low, Medium, High, VeryHigh) |
last_refresh_timestamp | string (date-time) | The time when the recommendation was last generated. |
recommendation_id | string | The ID for the recommendation. |
recommendation_lookback_period_in_days | integer | The lookback period that's used to generate the recommendation. |
recommended_resource_details | object | The details about the recommended resource. |
recommended_resource_type | string | The resource type of the recommendation. (Ec2Instance, LambdaFunction, EbsVolume, EcsService, Ec2AutoScalingGroup, Ec2InstanceSavingsPlans, ComputeSavingsPlans, SageMakerSavingsPlans, Ec2ReservedInstances, RdsReservedInstances, OpenSearchReservedInstances, RedshiftReservedInstances, ElastiCacheReservedInstances, RdsDbInstanceStorage, RdsDbInstance, AuroraDbClusterStorage, DynamoDbReservedCapacity, MemoryDbReservedInstances, NatGateway, DynamoDBTable, ElastiCacheCluster, MemoryDBCluster, DocumentDBCluster, WorkSpaces, SageMakerEndpoint) |
region | string | The Amazon Web Services Region of the resource. |
resource_arn | string | The Amazon Resource Name (ARN) of the resource. |
resource_id | string | The unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available. |
restart_needed | boolean | Whether or not implementing the recommendation requires a restart. |
rollback_possible | boolean | Whether or not implementing the recommendation can be rolled back. |
source | string | The source of the recommendation. (ComputeOptimizer, CostExplorer) |
tags | array | A list of tags associated with the resource for which the recommendation exists. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account to which the recommendation applies. |
action_type | string | The type of tasks that can be carried out by this action. |
currency_code | string | The currency code used for the recommendation. |
current_resource_summary | string | Describes the current resource. |
current_resource_type | string | The current resource type. |
estimated_monthly_cost | number (double) | The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage. |
estimated_monthly_savings | number (double) | The estimated monthly savings amount for the recommendation. |
estimated_savings_percentage | number (double) | The estimated savings percentage relative to the total cost over the cost calculation lookback period. |
implementation_effort | string | The effort required to implement the recommendation. |
last_refresh_timestamp | string (date-time) | The time when the recommendation was last generated. |
recommendation_id | string | The ID for the recommendation. |
recommendation_lookback_period_in_days | integer | The lookback period that's used to generate the recommendation. |
recommended_resource_summary | string | Describes the recommended resource. |
recommended_resource_type | string | The recommended resource type. |
region | string | The Amazon Web Services Region of the resource. |
resource_arn | string | The Amazon Resource Name (ARN) for the recommendation. |
resource_id | string | The resource ID for the recommendation. |
restart_needed | boolean | Whether or not implementing the recommendation requires a restart. |
rollback_possible | boolean | Whether or not implementing the recommendation can be rolled back. |
source | string | The source of the recommendation. (ComputeOptimizer, CostExplorer) |
tags | array | A list of tags assigned to the recommendation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_recommendation | select | region | Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationId is only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve the recommendationId, use the ListRecommendations API. | |
list_recommendations | select | region | Returns a list of recommendations. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_recommendation
- list_recommendations
Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationId is only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve the recommendationId, use the ListRecommendations API.
SELECT
account_id,
action_type,
cost_calculation_lookback_period_in_days,
currency_code,
current_resource_details,
current_resource_type,
estimated_monthly_cost,
estimated_monthly_savings,
estimated_savings_over_cost_calculation_lookback_period,
estimated_savings_percentage,
implementation_effort,
last_refresh_timestamp,
recommendation_id,
recommendation_lookback_period_in_days,
recommended_resource_details,
recommended_resource_type,
region,
resource_arn,
resource_id,
restart_needed,
rollback_possible,
source,
tags
FROM aws.cost_optimization_hub.recommendations
WHERE region = '{{ region }}' -- required
;
Returns a list of recommendations.
SELECT
account_id,
action_type,
currency_code,
current_resource_summary,
current_resource_type,
estimated_monthly_cost,
estimated_monthly_savings,
estimated_savings_percentage,
implementation_effort,
last_refresh_timestamp,
recommendation_id,
recommendation_lookback_period_in_days,
recommended_resource_summary,
recommended_resource_type,
region,
resource_arn,
resource_id,
restart_needed,
rollback_possible,
source,
tags
FROM aws.cost_optimization_hub.recommendations
WHERE region = '{{ region }}' -- required
;