amazonka-pricing-1.6.0: Amazon Price List Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Pricing

Contents

Description

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:

Synopsis

Service Configuration

pricing :: 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)

DescribeServices (Paginated)

GetProducts (Paginated)

Types

FilterType

data FilterType Source #

Constructors

TermMatch 

Instances

Bounded FilterType Source # 
Enum FilterType Source # 
Eq FilterType Source # 
Data FilterType Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FilterType -> c FilterType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FilterType #

toConstr :: FilterType -> Constr #

dataTypeOf :: FilterType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c FilterType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FilterType) #

gmapT :: (forall b. Data b => b -> b) -> FilterType -> FilterType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FilterType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FilterType -> r #

gmapQ :: (forall d. Data d => d -> u) -> FilterType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FilterType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FilterType -> m FilterType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterType -> m FilterType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterType -> m FilterType #

Ord FilterType Source # 
Read FilterType Source # 
Show FilterType Source # 
Generic FilterType Source # 

Associated Types

type Rep FilterType :: * -> * #

Hashable FilterType Source # 
ToJSON FilterType Source # 
NFData FilterType Source # 

Methods

rnf :: FilterType -> () #

ToHeader FilterType Source # 
ToQuery FilterType Source # 
ToByteString FilterType Source # 
FromText FilterType Source # 
ToText FilterType Source # 

Methods

toText :: FilterType -> Text #

type Rep FilterType Source # 
type Rep FilterType = D1 * (MetaData "FilterType" "Network.AWS.Pricing.Types.Sum" "amazonka-pricing-1.6.0-VdAw69MpMwFno1bpRT25z" False) (C1 * (MetaCons "TermMatch" PrefixI False) (U1 *))

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.

Instances

Eq AttributeValue Source # 
Data AttributeValue Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttributeValue -> c AttributeValue #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttributeValue #

toConstr :: AttributeValue -> Constr #

dataTypeOf :: AttributeValue -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c AttributeValue) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttributeValue) #

gmapT :: (forall b. Data b => b -> b) -> AttributeValue -> AttributeValue #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttributeValue -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttributeValue -> r #

gmapQ :: (forall d. Data d => d -> u) -> AttributeValue -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AttributeValue -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttributeValue -> m AttributeValue #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttributeValue -> m AttributeValue #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttributeValue -> m AttributeValue #

Read AttributeValue Source # 
Show AttributeValue Source # 
Generic AttributeValue Source # 

Associated Types

type Rep AttributeValue :: * -> * #

Hashable AttributeValue Source # 
FromJSON AttributeValue Source # 
NFData AttributeValue Source # 

Methods

rnf :: AttributeValue -> () #

type Rep AttributeValue Source # 
type Rep AttributeValue = D1 * (MetaData "AttributeValue" "Network.AWS.Pricing.Types.Product" "amazonka-pricing-1.6.0-VdAw69MpMwFno1bpRT25z" True) (C1 * (MetaCons "AttributeValue'" PrefixI True) (S1 * (MetaSel (Just Symbol "_avValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe Text))))

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 an attributeName .

avValue :: Lens' AttributeValue (Maybe Text) Source #

The specific value of an attributeName .

Filter

data Filter Source #

The constraints that you want all returned products to match.

See: filter' smart constructor.

Instances

Eq Filter Source # 

Methods

(==) :: Filter -> Filter -> Bool #

(/=) :: Filter -> Filter -> Bool #

Data Filter Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Filter -> c Filter #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Filter #

toConstr :: Filter -> Constr #

dataTypeOf :: Filter -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Filter) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Filter) #

gmapT :: (forall b. Data b => b -> b) -> Filter -> Filter #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Filter -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Filter -> r #

gmapQ :: (forall d. Data d => d -> u) -> Filter -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Filter -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Filter -> m Filter #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Filter -> m Filter #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Filter -> m Filter #

Read Filter Source # 
Show Filter Source # 
Generic Filter Source # 

Associated Types

type Rep Filter :: * -> * #

Methods

from :: Filter -> Rep Filter x #

to :: Rep Filter x -> Filter #

Hashable Filter Source # 

Methods

hashWithSalt :: Int -> Filter -> Int #

hash :: Filter -> Int #

ToJSON Filter Source # 
NFData Filter Source # 

Methods

rnf :: Filter -> () #

type Rep Filter Source # 
type Rep Filter = D1 * (MetaData "Filter" "Network.AWS.Pricing.Types.Product" "amazonka-pricing-1.6.0-VdAw69MpMwFno1bpRT25z" False) (C1 * (MetaCons "Filter'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_fType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * FilterType)) ((:*:) * (S1 * (MetaSel (Just Symbol "_fField") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_fValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))

filter' Source #

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 the AmazonEC2 service code and the volumeType 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 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.

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.

Instances

Eq PricingService Source # 
Data PricingService Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PricingService -> c PricingService #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PricingService #

toConstr :: PricingService -> Constr #

dataTypeOf :: PricingService -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PricingService) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PricingService) #

gmapT :: (forall b. Data b => b -> b) -> PricingService -> PricingService #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PricingService -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PricingService -> r #

gmapQ :: (forall d. Data d => d -> u) -> PricingService -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PricingService -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PricingService -> m PricingService #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PricingService -> m PricingService #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PricingService -> m PricingService #

Read PricingService Source # 
Show PricingService Source # 
Generic PricingService Source # 

Associated Types

type Rep PricingService :: * -> * #

Hashable PricingService Source # 
FromJSON PricingService Source # 
NFData PricingService Source # 

Methods

rnf :: PricingService -> () #

type Rep PricingService Source # 
type Rep PricingService = D1 * (MetaData "PricingService" "Network.AWS.Pricing.Types.Product" "amazonka-pricing-1.6.0-VdAw69MpMwFno1bpRT25z" False) (C1 * (MetaCons "PricingService'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_psAttributeNames") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Text]))) (S1 * (MetaSel (Just Symbol "_psServiceCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))))

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 :: Lens' PricingService [Text] Source #

The attributes that are available for this service.

psServiceCode :: Lens' PricingService (Maybe Text) Source #

The code for the AWS service.