Skip to main content

quota_by_counter_keys

Creates, updates, deletes, gets or lists a quota_by_counter_keys resource.

Overview

Namequota_by_counter_keys
TypeResource
Idazure.api_management.quota_by_counter_keys

Fields

The following fields are returned by SELECT queries:

Lists a collection of the quota counter values.

NameDatatypeDescription
counterKeystringThe Key value of the Counter. Must not be empty.
periodEndTimestring (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.
periodKeystringIdentifier of the Period for which the counter was collected. Must not be empty.
periodStartTimestring (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.
valueobjectQuota Value Properties

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_serviceselectresourceGroupName, serviceName, quotaCounterKey, subscriptionIdLists 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.
updateupdateresourceGroupName, serviceName, quotaCounterKey, subscriptionIdUpdates 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.

NameDatatypeDescription
quotaCounterKeystringQuota 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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

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

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;