Amazon Web Services Price List API is a centralized and convenient way
to programmatically query Amazon Web Services for services, products,
and pricing information. The Amazon Web Services Price List uses
standardized product attributes such as Location
, Storage Class
, and
Operating System
, and provides prices at the SKU level. You can use
the Amazon Web Services Price List 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 Amazon Web Services.
Use GetServices
without a service code to retrieve the service codes
for all AWS services, then GetServices
with a service code to retrieve
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
Amazon Web Services 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.
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint: The complete URL to use for the constructed client.
region: The AWS Region used in instantiating the client.
close_connection: Immediately close all HTTP connections.
timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
s3_force_path_style: Set this to true
to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY
.
svc <- pricing(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical"
)
)
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_price_list_file_url | This feature is in preview release and is subject to change |
get_products | Returns a list of all products that match the filter criteria |
list_price_lists | This feature is in preview release and is subject to change |
if (FALSE) {
svc <- pricing()
# Retrieves the service for the given Service Code.
svc$describe_services(
FormatVersion = "aws_v1",
MaxResults = 1L,
ServiceCode = "AmazonEC2"
)
}
Run the code above in your browser using DataLab