update_usage¶
Operation¶
update_usage
async
¶
update_usage(input: UpdateUsageInput, plugins: list[Plugin] | None = None) -> UpdateUsageOutput
Grants a temporary extension to the remaining quota of a usage plan associated with a specified API key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
UpdateUsageInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
UpdateUsageOutput
|
An instance of |
Input¶
UpdateUsageInput
dataclass
¶
The PATCH request to grant a temporary extension to the remaining quota of a usage plan associated with a specified API key.
Attributes¶
key_id
class-attribute
instance-attribute
¶
key_id: str | None = None
The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.
patch_operations
class-attribute
instance-attribute
¶
patch_operations: list[PatchOperation] | None = None
For more information about supported patch operations, see Patch Operations.
usage_plan_id
class-attribute
instance-attribute
¶
usage_plan_id: str | None = None
The Id of the usage plan associated with the usage data.
Output¶
UpdateUsageOutput
dataclass
¶
Represents the usage data of a usage plan.
Attributes¶
end_date
class-attribute
instance-attribute
¶
end_date: str | None = None
The ending date of the usage data.
items
class-attribute
instance-attribute
¶
items: dict[str, list[list[int]]] | None = None
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].
position
class-attribute
instance-attribute
¶
position: str | None = None
The current pagination position in the paged result set.
start_date
class-attribute
instance-attribute
¶
start_date: str | None = None
The starting date of the usage data.
usage_plan_id
class-attribute
instance-attribute
¶
usage_plan_id: str | None = None
The plan Id associated with this usage data.