Copyright | (c) 2013-2021 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 |
Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key.
Synopsis
- data UpdateUsage = UpdateUsage' {
- patchOperations :: Maybe [PatchOperation]
- usagePlanId :: Text
- keyId :: Text
- newUpdateUsage :: Text -> Text -> UpdateUsage
- updateUsage_patchOperations :: Lens' UpdateUsage (Maybe [PatchOperation])
- updateUsage_usagePlanId :: Lens' UpdateUsage Text
- updateUsage_keyId :: Lens' UpdateUsage Text
- data Usage = Usage' {}
- newUsage :: Usage
- usage_usagePlanId :: Lens' Usage (Maybe Text)
- usage_endDate :: Lens' Usage (Maybe Text)
- usage_items :: Lens' Usage (Maybe (HashMap Text [[Integer]]))
- usage_startDate :: Lens' Usage (Maybe Text)
- usage_position :: Lens' Usage (Maybe Text)
Creating a Request
data UpdateUsage Source #
The PATCH request to grant a temporary extension to the remaining quota of a usage plan associated with a specified API key.
See: newUpdateUsage
smart constructor.
UpdateUsage' | |
|
Instances
Create a value of UpdateUsage
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:patchOperations:UpdateUsage'
, updateUsage_patchOperations
- A list of update operations to be applied to the specified resource and
in the order specified in this list.
$sel:usagePlanId:UpdateUsage'
, updateUsage_usagePlanId
- [Required] The Id of the usage plan associated with the usage data.
$sel:keyId:UpdateUsage'
, updateUsage_keyId
- [Required] The identifier of the API key associated with the usage plan
in which a temporary extension is granted to the remaining quota.
Request Lenses
updateUsage_patchOperations :: Lens' UpdateUsage (Maybe [PatchOperation]) Source #
A list of update operations to be applied to the specified resource and in the order specified in this list.
updateUsage_usagePlanId :: Lens' UpdateUsage Text Source #
- Required
- The Id of the usage plan associated with the usage data.
updateUsage_keyId :: Lens' UpdateUsage Text Source #
- Required
- The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.
Destructuring the Response
Represents the usage data of a usage plan.
Create and Use Usage Plans, Manage Usage in a Usage Plan
See: newUsage
smart constructor.
Usage' | |
|
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:usagePlanId:Usage'
, usage_usagePlanId
- The plan Id associated with this usage data.
$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:startDate:Usage'
, usage_startDate
- The starting date of the usage data.
$sel:position:Usage'
, usage_position
- Undocumented member.
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]
.