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 |
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.
data MeterUsage Source #
See: meterUsage
smart constructor.
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
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 Source #
See: meterUsageResponse
smart constructor.
Response Lenses
mursMeteringRecordId :: Lens' MeterUsageResponse (Maybe Text) Source #
Undocumented member.
mursResponseStatus :: Lens' MeterUsageResponse Int Source #
- - | The response status code.