AWS Price List Service API (AWS Price List Service) is a centralized and
convenient way to programmatically query Amazon Web Services for
services, products, and pricing information. The AWS Price List Service
uses standardized product attributes such as Location
,
Storage Class
, and Operating System
, and provides prices at the SKU
level. You can use the AWS Price List Service to build cost control and
scenario planning tools, reconcile billing data, forecast future spend
for budgeting purposes, and provide cost benefit analysis that compare
your internal workloads with AWS.
Use GetServices
without a service code to retrieve the service codes
for all AWS services, then GetServices
with a service code to retreive
the attribute names for that service. After you have the service code
and attribute names, you can use
get_attribute_values
to see what
values are available for an attribute. With the service code and an
attribute name and value, you can use
get_products
to find specific products that
you're interested in, such as an AmazonEC2
instance, with a
Provisioned IOPS
volumeType
.
Service Endpoint
AWS Price List Service API provides the following two endpoints:
https://api.pricing.us-east-1.amazonaws.com
https://api.pricing.ap-south-1.amazonaws.com
pricing(config = list())
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've assigned
to the client. The available operations are listed in the
Operations section.
Optional configuration of credentials, endpoint, and/or region.
svc <- pricing(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string"
),
endpoint = "string",
region = "string"
)
)
describe_services | Returns the metadata for one service or a list of the metadata for all services |
get_attribute_values | Returns a list of attribute values |
get_products | Returns a list of all products that match the filter criteria |
if (FALSE) {
svc <- pricing()
svc$describe_services(
FormatVersion = "aws_v1",
MaxResults = 1L,
ServiceCode = "AmazonEC2"
)
}
Run the code above in your browser using DataLab