Share via


ApiManagementServiceResource.UpdateQuotaByPeriodKey Method

Definition

Updates an existing quota counter value in the specified service instance.

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

content
QuotaCounterValueUpdateContent

The value of the Quota counter to be applied on the specified period.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

quotaCounterKey, quotaPeriodKey or content is null.

Applies to