Share via


Quota By Period Keys - Update

Belirtilen hizmet örneğinde mevcut kota sayacı değerini Güncelleştirmeler.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}?api-version=2022-08-01

URI Parametreleri

Name İçinde Gerekli Tür Description
quotaCounterKey
path True

string

Kota sayacı anahtar tanımlayıcısı. Bu, anahtara göre kota ilkesinin counter-key özniteliğinde tanımlanan ifadenin sonucudur. Örneğin, ilkede counter-key="boo" belirtirseniz, buna "boo" sayaç anahtarıyla erişilebilir. Ancak counter-key="@("b"+"a")" olarak tanımlanırsa, "ba" tuşuyla erişilebilir

quotaPeriodKey
path True

string

Kota dönemi anahtar tanımlayıcısı.

resourceGroupName
path True

string

Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.

serviceName
path True

string

API Management hizmetinin adı.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

Hedef aboneliğin kimliği.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

İstek Gövdesi

Name Tür Description
properties.callsCount

integer

Counter'ın çağrılma sayısı.

properties.kbTransferred

number

KiloBytes cinsinden Aktarılan Veriler.

Yanıtlar

Name Tür Description
200 OK

QuotaCounterContract

Yanıt gövdesi, belirtilen süre için Kota sayacı ayrıntılarını içerir.

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

ApiManagementUpdateQuotaCounterKeyByQuotaPeriod

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/quotas/ba/periods/0_P3Y6M4DT12H30M5S?api-version=2022-08-01

{
  "properties": {
    "callsCount": 0,
    "kbTransferred": 0
  }
}

Sample Response

{
  "counterKey": "ba",
  "periodKey": "0_P3Y6M4DT12H30M5S",
  "periodStartTime": "2014-08-04T04:24:35Z",
  "periodEndTime": "2018-02-08T16:54:40Z",
  "value": {
    "callsCount": 0,
    "kbTransferred": 2.5625
  }
}

Tanımlar

Name Description
ErrorFieldContract

Hata Alanı sözleşmesi.

ErrorResponse

Hata Yanıtı.

QuotaCounterContract

Kota sayacı ayrıntıları.

QuotaCounterValueContractProperties

Kota sayacı değeri ayrıntıları.

QuotaCounterValueUpdateContract

Kota sayacı değeri ayrıntıları.

ErrorFieldContract

Hata Alanı sözleşmesi.

Name Tür Description
code

string

Özellik düzeyi hata kodu.

message

string

Özellik düzeyi hatanın insan tarafından okunabilir gösterimi.

target

string

Özellik adı.

ErrorResponse

Hata Yanıtı.

Name Tür Description
error.code

string

Hizmet tanımlı hata kodu. Bu kod, yanıtta belirtilen HTTP hata kodu için bir alt durum görevi görür.

error.details

ErrorFieldContract[]

Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi.

error.message

string

Hatanın insan tarafından okunabilen gösterimi.

QuotaCounterContract

Kota sayacı ayrıntıları.

Name Tür Description
counterKey

string

Sayacın Anahtar değeri. Boş olmamalıdır.

periodEndTime

string

Sayaç Döneminin bitiş tarihi. Tarih şu biçime uygundur: yyyy-MM-ddTHH:mm:ssZ ISO 8601 standardı tarafından belirtildiği gibi.

periodKey

string

Sayacın toplandığı Dönemin tanımlayıcısı. Boş olmamalıdır.

periodStartTime

string

Sayaç Döneminin başlangıç tarihi. Tarih şu biçime uygundur: yyyy-MM-ddTHH:mm:ssZ ISO 8601 standardı tarafından belirtildiği gibi.

value

QuotaCounterValueContractProperties

Kota Değeri Özellikleri

QuotaCounterValueContractProperties

Kota sayacı değeri ayrıntıları.

Name Tür Description
callsCount

integer

Counter'ın çağrılma sayısı.

kbTransferred

number

KiloBytes cinsinden Aktarılan Veriler.

QuotaCounterValueUpdateContract

Kota sayacı değeri ayrıntıları.

Name Tür Description
properties.callsCount

integer

Counter'ın çağrılma sayısı.

properties.kbTransferred

number

KiloBytes cinsinden Aktarılan Veriler.