Skip to content

aws.cost_optimization_hub.list_recommendations

Example SQL Queries

SELECT * FROM
aws.cost_optimization_hub.list_recommendations;

Description

Returns a list of recommendations.

Table Definition

Column NameColumn Data Type
filter Input Column

The constraints that you want all returned recommendations to match.

STRUCT(
"restart_needed" BOOLEAN,
"rollback_possible" BOOLEAN,
"implementation_efforts" VARCHAR[],
"account_ids" VARCHAR[],
"regions" VARCHAR[],
"resource_types" VARCHAR[],
"action_types" VARCHAR[],
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"resource_ids" VARCHAR[],
"resource_arns" VARCHAR[],
"recommendation_ids" VARCHAR[]
)
Show child fields
filter.account_ids[]
filter.action_types[]
filter.implementation_efforts[]
filter.recommendation_ids[]
filter.regions[]
filter.resource_arns[]
filter.resource_ids[]
filter.resource_types[]
filter.restart_needed

Whether or not implementing the recommendation requires a restart.

filter.rollback_possible

Whether or not implementing the recommendation can be rolled back.

filter.tags[]
Show child fields
filter.tags[].key

The key that's associated with the tag.

filter.tags[].value

The value that's associated with the tag.

include_all_recommendations Input Column

List of all recommendations for a resource, or a single recommendation if de-duped by resourceId.

BOOLEAN
order_by Input Column

The ordering of recommendations by a dimension.

STRUCT(
"dimension" VARCHAR,
"order" VARCHAR
)
Show child fields
order_by.dimension

Sorts by dimension values.

order_by.order

The order that's used to sort the data.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
account_id

The account that the recommendation is for.

VARCHAR
action_type

The type of tasks that can be carried out by this action.

VARCHAR
currency_code

The currency code used for the recommendation.

VARCHAR
current_resource_summary

Describes the current resource.

VARCHAR
current_resource_type

The current resource type.

VARCHAR
estimated_monthly_cost

The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.

DOUBLE
estimated_monthly_savings

The estimated monthly savings amount for the recommendation.

DOUBLE
estimated_savings_percentage

The estimated savings percentage relative to the total cost over the cost calculation lookback period.

DOUBLE
implementation_effort

The effort required to implement the recommendation.

VARCHAR
last_refresh_timestamp

The time when the recommendation was last generated.

TIMESTAMP_S
recommendation_id

The ID for the recommendation.

VARCHAR
recommendation_lookback_period_in_days

The lookback period that's used to generate the recommendation.

BIGINT
recommended_resource_summary

Describes the recommended resource.

VARCHAR
recommended_resource_type

The recommended resource type.

VARCHAR
region

The Amazon Web Services Region of the resource.

VARCHAR
resource_arn

The Amazon Resource Name (ARN) for the recommendation.

VARCHAR
resource_id

The resource ID for the recommendation.

VARCHAR
restart_needed

Whether or not implementing the recommendation requires a restart.

BOOLEAN
rollback_possible

Whether or not implementing the recommendation can be rolled back.

BOOLEAN
source

The source of the recommendation.

VARCHAR
tags

A list of tags assigned to the recommendation.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
tags[]
Show child fields
tags[].key

The key that's associated with the tag.

tags[].value

The value that's associated with the tag.