Aracılığıyla paylaş


Content Item - Create Or Update

Sağlanan içerik türü tarafından belirtilen yeni bir geliştirici portalı içerik öğesi oluşturur.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}?api-version=2022-08-01

URI Parametreleri

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

string

İçerik öğesi tanımlayıcısı.

contentTypeId
path True

string

İçerik türü 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ı.

Normal ifade deseni: ^[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 Başlığı

Name Gerekli Tür Description
If-Match

string

Varlığın ETag'i. Varlık oluştururken gerekli değildir, ancak varlığı güncelleştirirken gereklidir.

Yanıtlar

Name Tür Description
200 OK

ContentItemContract

Mevcut içerik öğesi başarıyla güncelleştirildi.

Üst Bilgiler

ETag: string

201 Created

ContentItemContract

İçerik öğesi başarıyla oluşturuldu.

Ü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 Flow.

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

ApiManagementCreateContentTypeContentItem

Örnek isteği

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8?api-version=2022-08-01

{
  "properties": {
    "en_us": {
      "title": "About",
      "description": "Short story about the company.",
      "keywords": "company, about",
      "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
      "permalink": "/about"
    }
  }
}

Örnek yanıt

{
  "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "type": "Microsoft.ApiManagement/service/contentTypes/contentItems",
  "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "properties": {
    "en_us": {
      "title": "About",
      "description": "Short story about the company.",
      "keywords": "company, about",
      "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
      "permalink": "/about"
    }
  }
}
{
  "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "type": "Microsoft.ApiManagement/service/contentTypes/contentItems",
  "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
  "properties": {
    "en_us": {
      "title": "About",
      "description": "Short story about the company.",
      "keywords": "company, about",
      "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
      "permalink": "/about"
    }
  }
}

Tanımlar

Name Description
ContentItemContract

İçerik türü sözleşme ayrıntıları.

ErrorFieldContract

Hata Alanı sözleşmesi.

ErrorResponse

Hata Yanıtı.

ContentItemContract

İçerik türü sözleşme ayrıntıları.

Name Tür Description
id

string

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

name

string

Kaynağın adı

type

string

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

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.