amazonka-marketplace-metering-1.6.0: Amazon Marketplace Metering 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.MarketplaceMetering.MeterUsage

Contents

Description

API to emit metering records. For identical requests, the API is idempotent. It simply returns the metering record ID.

MeterUsage is authenticated on the buyer's AWS account, generally when running from an EC2 instance on the AWS Marketplace.

Synopsis

Creating a Request

meterUsage Source #

Creates a value of MeterUsage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • muProductCode - Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.
  • muTimestamp - Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions of the timestamp will be ignored.
  • muUsageDimension - It will be one of the fcp dimension name provided during the publishing of the product.
  • muUsageQuantity - Consumption value for the hour.
  • muDryRun - Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException.

data MeterUsage Source #

See: meterUsage smart constructor.

Instances

Eq MeterUsage Source # 
Data MeterUsage Source # 

Methods

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

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

toConstr :: MeterUsage -> Constr #

dataTypeOf :: MeterUsage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read MeterUsage Source # 
Show MeterUsage Source # 
Generic MeterUsage Source # 

Associated Types

type Rep MeterUsage :: * -> * #

Hashable MeterUsage Source # 
ToJSON MeterUsage Source # 
NFData MeterUsage Source # 

Methods

rnf :: MeterUsage -> () #

AWSRequest MeterUsage Source # 
ToHeaders MeterUsage Source # 

Methods

toHeaders :: MeterUsage -> [Header] #

ToPath MeterUsage Source # 
ToQuery MeterUsage Source # 
type Rep MeterUsage Source # 
type Rep MeterUsage = D1 * (MetaData "MeterUsage" "Network.AWS.MarketplaceMetering.MeterUsage" "amazonka-marketplace-metering-1.6.0-HFuhj9zEPT2GyfFEOaxJ6V" False) (C1 * (MetaCons "MeterUsage'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_muProductCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_muTimestamp") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * POSIX))) ((:*:) * (S1 * (MetaSel (Just Symbol "_muUsageDimension") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_muUsageQuantity") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Nat)) (S1 * (MetaSel (Just Symbol "_muDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Bool))))))
type Rs MeterUsage Source # 

Request Lenses

muProductCode :: Lens' MeterUsage Text Source #

Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.

muTimestamp :: Lens' MeterUsage UTCTime Source #

Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions of the timestamp will be ignored.

muUsageDimension :: Lens' MeterUsage Text Source #

It will be one of the fcp dimension name provided during the publishing of the product.

muUsageQuantity :: Lens' MeterUsage Natural Source #

Consumption value for the hour.

muDryRun :: Lens' MeterUsage Bool Source #

Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException.

Destructuring the Response

meterUsageResponse Source #

Creates a value of MeterUsageResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data MeterUsageResponse Source #

See: meterUsageResponse smart constructor.

Instances

Eq MeterUsageResponse Source # 
Data MeterUsageResponse Source # 

Methods

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

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

toConstr :: MeterUsageResponse -> Constr #

dataTypeOf :: MeterUsageResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read MeterUsageResponse Source # 
Show MeterUsageResponse Source # 
Generic MeterUsageResponse Source # 
NFData MeterUsageResponse Source # 

Methods

rnf :: MeterUsageResponse -> () #

type Rep MeterUsageResponse Source # 
type Rep MeterUsageResponse = D1 * (MetaData "MeterUsageResponse" "Network.AWS.MarketplaceMetering.MeterUsage" "amazonka-marketplace-metering-1.6.0-HFuhj9zEPT2GyfFEOaxJ6V" False) (C1 * (MetaCons "MeterUsageResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_mursMeteringRecordId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_mursResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

mursResponseStatus :: Lens' MeterUsageResponse Int Source #

  • - | The response status code.