quota_by_period_keys
Creates, updates, deletes, gets or lists a quota_by_period_keys resource.
Overview
| Name | quota_by_period_keys |
| Type | Resource |
| Id | azure.api_management.quota_by_period_keys |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
counterKey | string | The Key value of the Counter. Must not be empty. Required. |
periodEndTime | string (date-time) | The date of the end of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. Required. |
periodKey | string | Identifier of the Period for which the counter was collected. Must not be empty. Required. |
periodStartTime | string (date-time) | The date of the start of Counter Period. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. Required. |
value | object | Quota Value Properties. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, quota_counter_key, quota_period_key, subscription_id | Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. | |
update | update | resource_group_name, service_name, quota_counter_key, quota_period_key, subscription_id | Updates an existing quota counter value in the specified service instance. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
quota_counter_key | string | Quota counter key identifier. This is the result of expression defined in counter-key attribute of the quota-by-key policy. For example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. Required. |
quota_period_key | string | Quota period key identifier. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string |
SELECT examples
- get
Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.
SELECT
counterKey,
periodEndTime,
periodKey,
periodStartTime,
value
FROM azure.api_management.quota_by_period_keys
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND quota_counter_key = '{{ quota_counter_key }}' -- required
AND quota_period_key = '{{ quota_period_key }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
UPDATE examples
- update
Updates an existing quota counter value in the specified service instance.
UPDATE azure.api_management.quota_by_period_keys
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND quota_counter_key = '{{ quota_counter_key }}' --required
AND quota_period_key = '{{ quota_period_key }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
counterKey,
periodEndTime,
periodKey,
periodStartTime,
value;