Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
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 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
AWS Price List Service API provides the following two endpoints:
- pricing :: 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
- module Network.AWS.Pricing.GetAttributeValues
- module Network.AWS.Pricing.DescribeServices
- module Network.AWS.Pricing.GetProducts
- data FilterType = TermMatch
- data AttributeValue
- attributeValue :: AttributeValue
- avValue :: Lens' AttributeValue (Maybe Text)
- data Filter
- filter' :: FilterType -> Text -> Text -> Filter
- fType :: Lens' Filter FilterType
- fField :: Lens' Filter Text
- fValue :: Lens' Filter Text
- data PricingService
- pricingService :: PricingService
- psAttributeNames :: Lens' PricingService [Text]
- psServiceCode :: Lens' PricingService (Maybe Text)
Service Configuration
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)
DescribeServices (Paginated)
GetProducts (Paginated)
Types
FilterType
data FilterType Source #
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: attributeValue
smart constructor.
attributeValue :: AttributeValue Source #
Creates a value of AttributeValue
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
avValue
- The specific value of anattributeName
.
Filter
The constraints that you want all returned products to match.
See: filter'
smart constructor.
Creates a value of Filter
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fType
- 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.fField
- 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 theAmazonEC2
service code and thevolumeType
attribute name to get the prices for only Amazon EC2 volumes.fValue
- 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 asAmazonEC2
. If you are filtering by attribute name, this is the attribute value that you want the returned products to match, such as aProvisioned IOPS
volume.
fType :: Lens' Filter FilterType Source #
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.
fField :: Lens' Filter Text Source #
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.
fValue :: Lens' Filter Text Source #
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: pricingService
smart constructor.
pricingService :: PricingService Source #
Creates a value of PricingService
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
psAttributeNames
- The attributes that are available for this service.psServiceCode
- The code for the AWS service.
psAttributeNames :: Lens' PricingService [Text] Source #
The attributes that are available for this service.
psServiceCode :: Lens' PricingService (Maybe Text) Source #
The code for the AWS service.