Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Network.AWS.MarketplaceMetering.MeterUsage
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.
- meterUsage :: Text -> UTCTime -> Text -> Natural -> Bool -> MeterUsage
- data MeterUsage
- muProductCode :: Lens' MeterUsage Text
- muTimestamp :: Lens' MeterUsage UTCTime
- muUsageDimension :: Lens' MeterUsage Text
- muUsageQuantity :: Lens' MeterUsage Natural
- muDryRun :: Lens' MeterUsage Bool
- meterUsageResponse :: Int -> MeterUsageResponse
- data MeterUsageResponse
- mursMeteringRecordId :: Lens' MeterUsageResponse (Maybe Text)
- mursResponseStatus :: Lens' MeterUsageResponse Int
Creating a Request
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.
Request Lenses
muProductCode :: Lens' MeterUsage Text #
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 #
Timestamp of the hour, recorded in UTC. The seconds and milliseconds portions of the timestamp will be ignored.
muUsageDimension :: Lens' MeterUsage Text #
It will be one of the fcp dimension name provided during the publishing of the product.
muUsageQuantity :: Lens' MeterUsage Natural #
Consumption value for the hour.
muDryRun :: Lens' MeterUsage Bool #
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
Arguments
:: Int | |
-> MeterUsageResponse |
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:
mursMeteringRecordId
- Undocumented member.mursResponseStatus
- -- | The response status code.
data MeterUsageResponse #
See: meterUsageResponse
smart constructor.
Response Lenses
mursMeteringRecordId :: Lens' MeterUsageResponse (Maybe Text) #
Undocumented member.
mursResponseStatus :: Lens' MeterUsageResponse Int #
- - | The response status code.