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 |
Gets the usage data of a usage plan in a specified time interval.
- getUsage :: Text -> Text -> Text -> GetUsage
- data GetUsage
- guKeyId :: Lens' GetUsage (Maybe Text)
- guLimit :: Lens' GetUsage (Maybe Int)
- guPosition :: Lens' GetUsage (Maybe Text)
- guUsagePlanId :: Lens' GetUsage Text
- guStartDate :: Lens' GetUsage Text
- guEndDate :: Lens' GetUsage Text
- usage :: Usage
- data Usage
- uUsagePlanId :: Lens' Usage (Maybe Text)
- uEndDate :: Lens' Usage (Maybe Text)
- uItems :: Lens' Usage (HashMap Text [[Integer]])
- uStartDate :: Lens' Usage (Maybe Text)
- uPosition :: Lens' Usage (Maybe Text)
Creating a Request
Creates a value of GetUsage
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
guKeyId
- The Id of the API key associated with the resultant usage data.guLimit
- The maximum number of results to be returned.guPosition
- PositionguUsagePlanId
- The Id of the usage plan associated with the usage data.guStartDate
- The starting date (e.g., 2016-01-01) of the usage data.guEndDate
- The ending date (e.g., 2016-12-31) of the usage data.
The GET request to get the usage data of a usage plan in a specified time interval.
See: getUsage
smart constructor.
Request Lenses
guKeyId :: Lens' GetUsage (Maybe Text) Source #
The Id of the API key associated with the resultant usage data.
guUsagePlanId :: Lens' GetUsage Text Source #
The Id of the usage plan associated with the usage data.
Destructuring the Response
Creates a value of Usage
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
uUsagePlanId
- The plan Id associated with this usage data.uEndDate
- The ending date of the usage data.uItems
- The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example,{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}
, where{api_key}
stands for an API key value and the daily log entry is of the format[used quota, remaining quota]
.uStartDate
- The starting date of the usage data.uPosition
- Undocumented member.
Represents the usage data of a usage plan.
Create and Use Usage Plans , Manage Usage in a Usage Plan
See: usage
smart constructor.
Response Lenses
uItems :: Lens' Usage (HashMap Text [[Integer]]) Source #
The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}
, where {api_key}
stands for an API key value and the daily log entry is of the format [used quota, remaining quota]
.