Boto3 get_savings_plans_utilization_details DIMENSION as INSTANCE_TYPE?

0

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce/client/get_savings_plans_utilization_details.html

Hi, The document above says that INSTANCE_TYPE is a valid value for DIMENSION field in the Request Syntax. However, when I call this API, i get the following error:

botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the GetSavingsPlansUtilizationDetails operation: Dimension INSTANCE_TYPE is not allowed. Allowed dimension(s): LINKED_ACCOUNT, SAVINGS_PLAN_ARN, SAVINGS_PLANS_TYPE, REGION, PAYMENT_OPTION, INSTANCE_TYPE_FAMILY, AGREEMENT_END_DATE_TIME_AFTER, AGREEMENT_END_DATE_TIME_BEFORE

I am using boto3 version boto3-1.34.107

Is there a way to get savings plan utilization details by each INSTANCE_TYPE within each region instead of INSTANCE_TYPE_FAMILY?

Thanks in advance.

  • Can you post the call you are making?

  • Hi iBehr, Here's the call I am making in Python and the error is given below: response = ce.get_savings_plans_utilization_details( TimePeriod={ 'Start': '2024-05-01', 'End': '2024-05-17' }, Filter = { 'And': [ { 'Dimensions': { 'Key': 'INSTANCE_TYPE', 'Values': ['m6g.medium'] } }, { 'Dimensions': { 'Key': 'REGION', 'Values': ['ap-south-2'] } } ] }, DataType=['UTILIZATION'] )

    An error occurred (ValidationException) when calling the GetSavingsPlansUtilizationDetails operation: Dimension INSTANCE_TYPE is not allowed. Allowed dimension(s): INSTANCE_TYPE_FAMILY, (...)

  • Looks like the documentation's Request Syntax is misleading for several methods. Most of the options listed in the documentation for 'DIMENSION' are not actually permitted. Ran into a few more instances today: e.g.

    botocore.exceptions.ClientError: Unsupported [Dimension Key=SAVINGS_PLAN_ARN], dimension key must be a subset of SERVICE,REGION,INSTANCE_TYPE_FAMILY

    https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce/client/get_savings_plans_coverage.html This page lists a lot more options for dimension key.

asked 21 days ago79 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions