Last Updated on April 28, 2021
Below is a reference for all attribute names and attribute values in AWS Price List API for AWS Cost Explorer.
Note: All the list below are in alphabetical order.
Service Code: AWSCostExplorer
Python Code to get Attribute Names for AWS Cost Explorer using Boto3
import boto3
pricing_client = boto3.client('pricing', region_name='us-east-1')
response = pricing_client.describe_services(ServiceCode='AWSCostExplorer')
attribute_names = response['Services'][0]['AttributeNames']
print(attribute_names)
Attribute Name List for AWS Cost Explorer
- granularity
- location
- locationType
- operation
- productFamily
- requestType
- servicecode
- servicename
- termType
- usagetype
Python Code to get the Attribute Values List for AWS Cost Explorer using Boto3
import boto3
pricing_client = boto3.client('pricing', region_name='us-east-1')
response = pricing_client.describe_services(ServiceCode='AWSCostExplorer')
attribute_names = response['Services'][0]['AttributeNames']
for attribute_name in attribute_names:
attribute_values = []
response_iterator = pricing_client.get_paginator('get_attribute_values').paginate(
ServiceCode='AWSCostExplorer',
AttributeName=attribute_name
)
for response in response_iterator:
for attribute_value in response['AttributeValues']:
attribute_values.append(attribute_value['Value'])
print('Attribute Name:', attribute_name)
print(attribute_values)
print()
Attribute Values List for AWS Cost Explorer
Attribute Name: granularity
Values:
All
Attribute Name: location
Values:
US East (N. Virginia)
Attribute Name: locationType
Values:
AWS Region
Attribute Name: operation
Values:
CostDataStorage
Attribute Name: productFamily
Values:
API Request
Storage
Attribute Name: requestType
Values:
Reporting
Attribute Name: servicecode
Values:
AWSCostExplorer
Attribute Name: servicename
Values:
AWS Cost Explorer
Attribute Name: termType
Values:
OnDemand
Attribute Name: usagetype
Values:
USE1-APIRequest
USE1-CostDataStorage
We hope the above list of attribute names and values helps when using the AWS Price List API for AWS Cost Explorer.
If the list is outdated, let us know in the comments below. We’ll update it as soon as we can.