ApiManagementServiceResource.GetQuotaByPeriodKeyAsync Method

Definition

Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}
  • Operation Id: QuotaByPeriodKeys_Get
  • Default Api Version: 2023-03-01-preview
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>> GetQuotaByPeriodKeyAsync (string quotaCounterKey, string quotaPeriodKey, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQuotaByPeriodKeyAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>>
override this.GetQuotaByPeriodKeyAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>>
Public Overridable Function GetQuotaByPeriodKeyAsync (quotaCounterKey As String, quotaPeriodKey As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of QuotaCounterContract))

Parameters

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.

quotaPeriodKey
String

Quota period key identifier.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

quotaCounterKey or quotaPeriodKey is an empty string, and was expected to be non-empty.

quotaCounterKey or quotaPeriodKey is null.

Applies to