Megosztás a következőn keresztül:


ApiManagementServiceResource.UpdateQuotaByPeriodKeyAsync 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 System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>> UpdateQuotaByPeriodKeyAsync (string quotaCounterKey, string quotaPeriodKey, Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateQuotaByPeriodKeyAsync : string * string * Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>>
override this.UpdateQuotaByPeriodKeyAsync : string * string * Azure.ResourceManager.ApiManagement.Models.QuotaCounterValueUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApiManagement.Models.QuotaCounterContract>>
Public Overridable Function UpdateQuotaByPeriodKeyAsync (quotaCounterKey As String, quotaPeriodKey As String, content As QuotaCounterValueUpdateContent, 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.

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