quota_by_counter_keys
Creates, updates, deletes, gets or lists a quota_by_counter_keys
resource.
Overview
Name | quota_by_counter_keys |
Type | Resource |
Id | azure.api_management.quota_by_counter_keys |
Fields
The following fields are returned by SELECT
queries:
- list_by_service
Lists a collection of the quota counter values.
Name | Datatype | Description |
---|---|---|
counterKey | string | The Key value of the Counter. Must not be empty. |
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. |
periodKey | string | Identifier of the Period for which the counter was collected. Must not be empty. |
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. |
value | object | Quota Value Properties |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_by_service | select | resourceGroupName , serviceName , quotaCounterKey , subscriptionId | Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. | |
update | update | resourceGroupName , serviceName , quotaCounterKey , subscriptionId | Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. |
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 |
---|---|---|
quotaCounterKey | 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 |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
serviceName | string | The name of the API Management service. |
subscriptionId | string | The ID of the target subscription. |
SELECT
examples
- list_by_service
Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.
SELECT
counterKey,
periodEndTime,
periodKey,
periodStartTime,
value
FROM azure.api_management.quota_by_counter_keys
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND quotaCounterKey = '{{ quotaCounterKey }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
UPDATE
examples
- update
Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values.
UPDATE azure.api_management.quota_by_counter_keys
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND quotaCounterKey = '{{ quotaCounterKey }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
count,
nextLink,
value;