Tag - Assign To Api

Api'ye etiket atayın.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}?api-version=2024-05-01

URI Parametreleri

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

string

minLength: 1
maxLength: 256
pattern: ^[^*#&+:<>?]+$

API düzeltme tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır. Geçerli olmayan düzeltme ; rev=n sonek olarak, n düzeltme numarasıdır.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

API Management hizmetinin adı.

subscriptionId
path True

string (uuid)

Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.

tagId
path True

string

minLength: 1
maxLength: 80
pattern: ^[^*#&+:<>?]+$

Etiket tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

api-version
query True

string

minLength: 1

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

Yanıtlar

Name Tür Description
200 OK

TagContract

Etiket api'ye zaten atanmıştır.

Üst Bilgiler

ETag: string

201 Created

TagContract

Etiket Api'ye atandı.

Üst Bilgiler

ETag: string

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 Akışı.

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

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

Örnekler

ApiManagementCreateApiTag

Örnek isteği

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tags/tagId1?api-version=2024-05-01

Örnek yanıt

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1",
  "type": "Microsoft.ApiManagement/service/tags",
  "name": "tagId1",
  "properties": {
    "displayName": "tag1"
  }
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1",
  "type": "Microsoft.ApiManagement/service/tags",
  "name": "tagId1",
  "properties": {
    "displayName": "tag1"
  }
}

Tanımlar

Name Description
ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

TagContract

Etiket Sözleşmesi ayrıntıları.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

TagContract

Etiket Sözleşmesi ayrıntıları.

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Örn - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Kaynağın adı

properties.displayName

string

minLength: 1
maxLength: 160

Etiket adı.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"