| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.APIGateway.GetUsage
Description
Gets the usage data of a usage plan in a specified time interval.
This operation returns paginated results.
Synopsis
- data GetUsage = GetUsage' {}
- newGetUsage :: Text -> Text -> Text -> GetUsage
- getUsage_keyId :: Lens' GetUsage (Maybe Text)
- getUsage_limit :: Lens' GetUsage (Maybe Int)
- getUsage_position :: Lens' GetUsage (Maybe Text)
- getUsage_usagePlanId :: Lens' GetUsage Text
- getUsage_startDate :: Lens' GetUsage Text
- getUsage_endDate :: Lens' GetUsage Text
- data Usage = Usage' {}
- newUsage :: Usage
- usage_endDate :: Lens' Usage (Maybe Text)
- usage_items :: Lens' Usage (Maybe (HashMap Text [[Integer]]))
- usage_position :: Lens' Usage (Maybe Text)
- usage_startDate :: Lens' Usage (Maybe Text)
- usage_usagePlanId :: Lens' Usage (Maybe Text)
Creating a Request
The GET request to get the usage data of a usage plan in a specified time interval.
See: newGetUsage smart constructor.
Constructors
| GetUsage' | |
Fields
| |
Instances
Create a value of GetUsage with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:keyId:GetUsage', getUsage_keyId - The Id of the API key associated with the resultant usage data.
GetUsage, getUsage_limit - The maximum number of returned results per page. The default value is 25
and the maximum value is 500.
GetUsage, getUsage_position - The current pagination position in the paged result set.
GetUsage, getUsage_usagePlanId - The Id of the usage plan associated with the usage data.
GetUsage, getUsage_startDate - The starting date (e.g., 2016-01-01) of the usage data.
GetUsage, getUsage_endDate - The ending date (e.g., 2016-12-31) of the usage data.
Request Lenses
getUsage_keyId :: Lens' GetUsage (Maybe Text) Source #
The Id of the API key associated with the resultant usage data.
getUsage_limit :: Lens' GetUsage (Maybe Int) Source #
The maximum number of returned results per page. The default value is 25 and the maximum value is 500.
getUsage_position :: Lens' GetUsage (Maybe Text) Source #
The current pagination position in the paged result set.
getUsage_usagePlanId :: Lens' GetUsage Text Source #
The Id of the usage plan associated with the usage data.
getUsage_startDate :: Lens' GetUsage Text Source #
The starting date (e.g., 2016-01-01) of the usage data.
getUsage_endDate :: Lens' GetUsage Text Source #
The ending date (e.g., 2016-12-31) of the usage data.
Destructuring the Response
Represents the usage data of a usage plan.
See: newUsage smart constructor.
Constructors
| Usage' | |
Fields
| |
Instances
Create a value of Usage with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:endDate:Usage', usage_endDate - The ending date of the usage data.
$sel:items:Usage', usage_items - 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].
$sel:position:Usage', usage_position - Undocumented member.
$sel:startDate:Usage', usage_startDate - The starting date of the usage data.
$sel:usagePlanId:Usage', usage_usagePlanId - The plan Id associated with this usage data.
Response Lenses
usage_items :: Lens' Usage (Maybe (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].