ApiManagementServiceResource.UpdateQuotaByCounterKeysAsync Method

Definition

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.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}
  • Operation Id: QuotaByCounterKeys_Update
  • Default Api Version: 2023-03-01-preview
public virtual Azure.AsyncPageable<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract> UpdateQuotaByCounterKeysAsync (string quotaCounterKey, Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateQuotaByCounterKeysAsync : string * Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>
override this.UpdateQuotaByCounterKeysAsync : string * Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>
Public Overridable Function UpdateQuotaByCounterKeysAsync (quotaCounterKey As String, content As QuotaCounterValueUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(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.

content
QuotaCounterValueUpdateContent

The value of the quota counter to be applied to all quota counter periods.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

An async collection of QuotaCounterContract that may take multiple service requests to iterate over.

Exceptions

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

quotaCounterKey or content is null.

Applies to