Skip to main content

quota_by_period_keys

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

Overview

Namequota_by_period_keys
TypeResource
Idazure.api_management.quota_by_period_keys

Fields

The following fields are returned by SELECT queries:

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, service_name, quota_counter_key, quota_period_key, subscription_idGets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.
updateupdateresource_group_name, service_name, quota_counter_key, quota_period_key, subscription_idUpdates 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.

NameDatatypeDescription
quota_counter_keystringQuota 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_keystringQuota period key identifier. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
service_namestringThe name of the API Management service. Required.
subscription_idstring

SELECT examples

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

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;