Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Derived from API version 2017-10-15
of the AWS service descriptions, licensed under Apache 2.0.
Amazon Web Services Price List Service API (Amazon Web Services Price
List Service) is a centralized and convenient way to programmatically
query Amazon Web Services for services, products, and pricing
information. The Amazon Web Services 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 Amazon Web Services 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 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 retreive
the attribute names for that service. After you have the service code
and attribute names, you can use GetAttributeValues
to see what values
are available for an attribute. With the service code and an attribute
name and value, you can use GetProducts
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
Synopsis
- defaultService :: Service
- _InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError
- _ExpiredNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
- _NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
- data GetAttributeValues = GetAttributeValues' (Maybe Text) (Maybe Natural) Text Text
- newGetAttributeValues :: Text -> Text -> GetAttributeValues
- data GetAttributeValuesResponse = GetAttributeValuesResponse' (Maybe [AttributeValue]) (Maybe Text) Int
- newGetAttributeValuesResponse :: Int -> GetAttributeValuesResponse
- data DescribeServices = DescribeServices' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural)
- newDescribeServices :: DescribeServices
- data DescribeServicesResponse = DescribeServicesResponse' (Maybe Text) (Maybe Text) (Maybe [PricingService]) Int
- newDescribeServicesResponse :: Int -> DescribeServicesResponse
- data GetProducts = GetProducts' (Maybe [Filter]) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural)
- newGetProducts :: GetProducts
- data GetProductsResponse = GetProductsResponse' (Maybe Text) (Maybe Text) (Maybe [Text]) Int
- newGetProductsResponse :: Int -> GetProductsResponse
- newtype FilterType where
- FilterType' { }
- pattern FilterType_TERM_MATCH :: FilterType
- data AttributeValue = AttributeValue' (Maybe Text)
- newAttributeValue :: AttributeValue
- data Filter = Filter' FilterType Text Text
- newFilter :: FilterType -> Text -> Text -> Filter
- data PricingService = PricingService' (Maybe [Text]) (Maybe Text)
- newPricingService :: PricingService
Service Configuration
defaultService :: Service Source #
API version 2017-10-15
of the Amazon Price List Service SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by Pricing
.
InvalidParameterException
_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source #
One or more parameters had an invalid value.
InternalErrorException
_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError Source #
An error on the server occurred during the processing of your request. Try again later.
ExpiredNextTokenException
_ExpiredNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The pagination token expired. Try again without a pagination token.
NotFoundException
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The requested resource can't be found.
InvalidNextTokenException
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The pagination token is invalid. Try again without a pagination token.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
GetAttributeValues (Paginated)
data GetAttributeValues Source #
See: newGetAttributeValues
smart constructor.
Instances
newGetAttributeValues Source #
:: Text | |
-> Text | |
-> GetAttributeValues |
Create a value of GetAttributeValues
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:GetAttributeValues'
, getAttributeValues_nextToken
- The pagination token that indicates the next set of results that you
want to retrieve.
$sel:maxResults:GetAttributeValues'
, getAttributeValues_maxResults
- The maximum number of results to return in response.
$sel:serviceCode:GetAttributeValues'
, getAttributeValues_serviceCode
- The service code for the service whose attributes you want to retrieve.
For example, if you want the retrieve an EC2 attribute, use AmazonEC2
.
$sel:attributeName:GetAttributeValues'
, getAttributeValues_attributeName
- The name of the attribute that you want to retrieve the values for, such
as volumeType
.
data GetAttributeValuesResponse Source #
See: newGetAttributeValuesResponse
smart constructor.
Instances
newGetAttributeValuesResponse Source #
Create a value of GetAttributeValuesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:attributeValues:GetAttributeValuesResponse'
, getAttributeValuesResponse_attributeValues
- The list of values for an attribute. For example,
Throughput Optimized HDD
and Provisioned IOPS
are two available
values for the AmazonEC2
volumeType
.
$sel:nextToken:GetAttributeValues'
, getAttributeValuesResponse_nextToken
- The pagination token that indicates the next set of results to retrieve.
$sel:httpStatus:GetAttributeValuesResponse'
, getAttributeValuesResponse_httpStatus
- The response's http status code.
DescribeServices (Paginated)
data DescribeServices Source #
See: newDescribeServices
smart constructor.
Instances
newDescribeServices :: DescribeServices Source #
Create a value of DescribeServices
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:formatVersion:DescribeServices'
, describeServices_formatVersion
- The format version that you want the response to be in.
Valid values are: aws_v1
$sel:nextToken:DescribeServices'
, describeServices_nextToken
- The pagination token that indicates the next set of results that you
want to retrieve.
$sel:serviceCode:DescribeServices'
, describeServices_serviceCode
- The code for the service whose information you want to retrieve, such as
AmazonEC2
. You can use the ServiceCode
to filter the results in a
GetProducts
call. To retrieve a list of all services, leave this
blank.
$sel:maxResults:DescribeServices'
, describeServices_maxResults
- The maximum number of results that you want returned in the response.
data DescribeServicesResponse Source #
See: newDescribeServicesResponse
smart constructor.
Instances
newDescribeServicesResponse Source #
Create a value of DescribeServicesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:formatVersion:DescribeServices'
, describeServicesResponse_formatVersion
- The format version of the response. For example, aws_v1
.
$sel:nextToken:DescribeServices'
, describeServicesResponse_nextToken
- The pagination token for the next set of retreivable results.
$sel:services:DescribeServicesResponse'
, describeServicesResponse_services
- The service metadata for the service or services in the response.
$sel:httpStatus:DescribeServicesResponse'
, describeServicesResponse_httpStatus
- The response's http status code.
GetProducts (Paginated)
data GetProducts Source #
See: newGetProducts
smart constructor.
Instances
newGetProducts :: GetProducts Source #
Create a value of GetProducts
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:filters:GetProducts'
, getProducts_filters
- The list of filters that limit the returned products. only products that
match all filters are returned.
$sel:formatVersion:GetProducts'
, getProducts_formatVersion
- The format version that you want the response to be in.
Valid values are: aws_v1
$sel:nextToken:GetProducts'
, getProducts_nextToken
- The pagination token that indicates the next set of results that you
want to retrieve.
$sel:serviceCode:GetProducts'
, getProducts_serviceCode
- The code for the service whose products you want to retrieve.
$sel:maxResults:GetProducts'
, getProducts_maxResults
- The maximum number of results to return in the response.
data GetProductsResponse Source #
See: newGetProductsResponse
smart constructor.
Instances
newGetProductsResponse Source #
Create a value of GetProductsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:formatVersion:GetProducts'
, getProductsResponse_formatVersion
- The format version of the response. For example, aws_v1.
$sel:nextToken:GetProducts'
, getProductsResponse_nextToken
- The pagination token that indicates the next set of results to retrieve.
$sel:priceList:GetProductsResponse'
, getProductsResponse_priceList
- The list of products that match your filters. The list contains both the
product metadata and the price information.
$sel:httpStatus:GetProductsResponse'
, getProductsResponse_httpStatus
- The response's http status code.
Types
FilterType
newtype FilterType Source #
pattern FilterType_TERM_MATCH :: FilterType |
Instances
AttributeValue
data AttributeValue Source #
The values of a given attribute, such as Throughput Optimized HDD
or
Provisioned IOPS
for the Amazon EC2
volumeType
attribute.
See: newAttributeValue
smart constructor.
Instances
newAttributeValue :: AttributeValue Source #
Create a value of AttributeValue
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:value:AttributeValue'
, attributeValue_value
- The specific value of an attributeName
.
Filter
The constraints that you want all returned products to match.
See: newFilter
smart constructor.
Instances
Eq Filter Source # | |
Read Filter Source # | |
Show Filter Source # | |
Generic Filter Source # | |
NFData Filter Source # | |
Defined in Amazonka.Pricing.Types.Filter | |
Hashable Filter Source # | |
Defined in Amazonka.Pricing.Types.Filter | |
ToJSON Filter Source # | |
Defined in Amazonka.Pricing.Types.Filter | |
type Rep Filter Source # | |
Defined in Amazonka.Pricing.Types.Filter type Rep Filter = D1 ('MetaData "Filter" "Amazonka.Pricing.Types.Filter" "libZSservicesZSamazonka-pricingZSamazonka-pricing" 'False) (C1 ('MetaCons "Filter'" 'PrefixI 'True) (S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FilterType) :*: (S1 ('MetaSel ('Just "field") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))) |
Create a value of Filter
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:type':Filter'
, filter_type
- The type of filter that you want to use.
Valid values are: TERM_MATCH
. TERM_MATCH
returns only products that
match both the given filter field and the given value.
$sel:field:Filter'
, filter_field
- The product metadata field that you want to filter on. You can filter by
just the service code to see all products for a specific service, filter
by just the attribute name to see a specific attribute for multiple
services, or use both a service code and an attribute name to retrieve
only products that match both fields.
Valid values include: ServiceCode
, and all attribute names
For example, you can filter by the AmazonEC2
service code and the
volumeType
attribute name to get the prices for only Amazon EC2
volumes.
$sel:value:Filter'
, filter_value
- The service code or attribute value that you want to filter by. If you
are filtering by service code this is the actual service code, such as
AmazonEC2
. If you are filtering by attribute name, this is the
attribute value that you want the returned products to match, such as a
Provisioned IOPS
volume.
PricingService
data PricingService Source #
The metadata for a service, such as the service code and available attribute names.
See: newPricingService
smart constructor.
PricingService' (Maybe [Text]) (Maybe Text) |
Instances
newPricingService :: PricingService Source #
Create a value of PricingService
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:attributeNames:PricingService'
, pricingService_attributeNames
- The attributes that are available for this service.
$sel:serviceCode:PricingService'
, pricingService_serviceCode
- The code for the Amazon Web Services service.