Skip to content

aws.ce.get_savings_plans_utilization_details

Example SQL Queries

SELECT * FROM
aws.ce.get_savings_plans_utilization_details
WHERE
"time_period" = 'VALUE';

Description

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.

Table Definition

Column NameColumn Data Type
time_period Required Input Column

The time period of the request.

STRUCT(
"start" VARCHAR,
"end" VARCHAR
)
Show child fields
time_period.end

The end of the time period. The end date is exclusive. For example, if end is 2017-05-01, Amazon Web Services retrieves cost and usage data from the start date up to, but not including, 2017-05-01.

time_period.start

The beginning of the time period. The start date is inclusive. For example, if start is 2017-01-01, Amazon Web Services retrieves cost and usage data starting at 2017-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.

data_type Input Column

The data type.

VARCHAR[]
Show child fields
data_type[]
filter Input Column

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 only AND is supported among each dimension.

STRUCT(
"dimensions" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
),
"tags" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
),
"cost_categories" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
)
)
Show child fields
filter.cost_categories

The filter that's based on CostCategory values.

Show child fields
filter.cost_categories.key

The unique name of the Cost Category.

filter.cost_categories.match_options[]
filter.cost_categories.values[]
filter.dimensions

The specific Dimension to use for Expression.

Show child fields
filter.dimensions.key

The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones.

Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.

LINK_ACCOUNT_NAME and SERVICE_CODE can only be used in CostCategoryRule.

ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE can only be used in AnomalySubscriptions.

filter.dimensions.match_options[]
filter.dimensions.values[]
filter.tags

The specific Tag to use for Expression.

Show child fields
filter.tags.key

The key for the tag.

filter.tags.match_options[]
filter.tags.values[]
max_results Input Column

The number of items to be returned in a response. The default is 20, with a minimum value of 1.

BIGINT
next_token Input Column

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.

VARCHAR
sort_by Input Column

The value that you want to sort the data by.

The following values are supported for Key:

  • UtilizationPercentage

  • TotalCommitment

  • UsedCommitment

  • UnusedCommitment

  • NetSavings

  • AmortizedRecurringCommitment

  • AmortizedUpfrontCommitment

The supported values for SortOrder are ASCENDING and DESCENDING.

STRUCT(
"key" VARCHAR,
"sort_order" VARCHAR
)
Show child fields
sort_by.key

The key that's used to sort the data.

sort_by.sort_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.

savings_plans_utilization_details

Retrieves a single daily or monthly Savings Plans utilization rate and details for your account.

STRUCT(
"savings_plan_arn" VARCHAR,
"attributes" MAP(VARCHAR, VARCHAR),
"utilization" STRUCT(
"total_commitment" VARCHAR,
"used_commitment" VARCHAR,
"unused_commitment" VARCHAR,
"utilization_percentage" VARCHAR
),
"savings" STRUCT(
"net_savings" VARCHAR,
"on_demand_cost_equivalent" VARCHAR
),
"amortized_commitment" STRUCT(
"amortized_recurring_commitment" VARCHAR,
"amortized_upfront_commitment" VARCHAR,
"total_amortized_commitment" VARCHAR
)
)[]
Show child fields
savings_plans_utilization_details[]
Show child fields
savings_plans_utilization_details[].amortized_commitment

The total amortized commitment for a Savings Plans. Includes the sum of the upfront and recurring Savings Plans fees.

Show child fields
savings_plans_utilization_details[].amortized_commitment.amortized_recurring_commitment

The amortized amount of your Savings Plans commitment that was purchased with either a Partial or a NoUpfront.

savings_plans_utilization_details[].amortized_commitment.amortized_upfront_commitment

The amortized amount of your Savings Plans commitment that was purchased with an Upfront or PartialUpfront Savings Plans.

savings_plans_utilization_details[].amortized_commitment.total_amortized_commitment

The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.

savings_plans_utilization_details[].attributes

The attribute that applies to a specific Dimension.

savings_plans_utilization_details[].savings

The amount saved by using existing Savings Plans. Savings returns both net savings from savings plans and also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate.

Show child fields
savings_plans_utilization_details[].savings.net_savings

The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.

savings_plans_utilization_details[].savings.on_demand_cost_equivalent

How much the amount that the usage would have cost if it was accrued at the On-Demand rate.

savings_plans_utilization_details[].savings_plan_arn

The unique Amazon Resource Name (ARN) for a particular Savings Plan.

savings_plans_utilization_details[].utilization

A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.

Show child fields
savings_plans_utilization_details[].utilization.total_commitment

The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).

savings_plans_utilization_details[].utilization.unused_commitment

The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.

savings_plans_utilization_details[].utilization.used_commitment

The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.

savings_plans_utilization_details[].utilization.utilization_percentage

The amount of UsedCommitment divided by the TotalCommitment for your Savings Plans.

total

The total Savings Plans utilization, regardless of time period.

STRUCT(
"utilization" STRUCT(
"total_commitment" VARCHAR,
"used_commitment" VARCHAR,
"unused_commitment" VARCHAR,
"utilization_percentage" VARCHAR
),
"savings" STRUCT(
"net_savings" VARCHAR,
"on_demand_cost_equivalent" VARCHAR
),
"amortized_commitment" STRUCT(
"amortized_recurring_commitment" VARCHAR,
"amortized_upfront_commitment" VARCHAR,
"total_amortized_commitment" VARCHAR
)
)
Show child fields
total.amortized_commitment

The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings Plans fees.

Show child fields
total.amortized_commitment.amortized_recurring_commitment

The amortized amount of your Savings Plans commitment that was purchased with either a Partial or a NoUpfront.

total.amortized_commitment.amortized_upfront_commitment

The amortized amount of your Savings Plans commitment that was purchased with an Upfront or PartialUpfront Savings Plans.

total.amortized_commitment.total_amortized_commitment

The total amortized amount of your Savings Plans commitment, regardless of your Savings Plans purchase method.

total.savings

The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate.

Show child fields
total.savings.net_savings

The savings amount that you're accumulating for the usage that's covered by a Savings Plans, when compared to the On-Demand equivalent of the same usage.

total.savings.on_demand_cost_equivalent

How much the amount that the usage would have cost if it was accrued at the On-Demand rate.

total.utilization

A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans eligible.

Show child fields
total.utilization.total_commitment

The total amount of Savings Plans commitment that's been purchased in an account (or set of accounts).

total.utilization.unused_commitment

The amount of your Savings Plans commitment that wasn't consumed from Savings Plans eligible usage in a specific period.

total.utilization.used_commitment

The amount of your Savings Plans commitment that was consumed from Savings Plans eligible usage in a specific period.

total.utilization.utilization_percentage

The amount of UsedCommitment divided by the TotalCommitment for your Savings Plans.