다음을 통해 공유


Content Item - Create Or Update

제공된 콘텐츠 형식으로 지정된 새 개발자 포털의 콘텐츠 항목을 만듭니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
contentItemId
path True

string

콘텐츠 항목 식별자입니다.

contentTypeId
path True

string

콘텐츠 형식 식별자입니다.

resourceGroupName
path True

string

리소스 그룹의 이름. 이름은 대소문자를 구분하지 않습니다.

serviceName
path True

string

API Management 서비스의 이름입니다.

regex 패턴: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

대상 구독의 ID입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 헤더

Name 필수 형식 Description
If-Match

string

엔터티의 ETag입니다. 엔터티를 만들 때는 필요하지 않지만 엔터티를 업데이트할 때 필요합니다.

응답

Name 형식 Description
200 OK

ContentItemContract

기존 콘텐츠 항목이 업데이트되었습니다.

헤더

ETag: string

201 Created

ContentItemContract

콘텐츠 항목이 성공적으로 만들어졌습니다.

헤더

ETag: string

Other Status Codes

ErrorResponse

작업이 실패한 이유를 설명하는 오류 응답입니다.

보안

azure_auth

Azure Active Directory OAuth2 Flow.

형식: oauth2
Flow: implicit
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize

범위

Name Description
user_impersonation 사용자 계정 가장

예제

ApiManagementCreateContentTypeContentItem

샘플 요청

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"
    }
  }
}

샘플 응답

{
  "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"
    }
  }
}

정의

Name Description
ContentItemContract

콘텐츠 형식 계약 세부 정보입니다.

ErrorFieldContract

오류 필드 계약.

ErrorResponse

오류 응답.

ContentItemContract

콘텐츠 형식 계약 세부 정보입니다.

Name 형식 Description
id

string

리소스에 대한 정규화된 리소스 ID입니다. 예 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

리소스의 이름입니다.

type

string

리소스 형식입니다. 예: "Microsoft.Compute/virtualMachines" 또는 "Microsoft.Storage/storageAccounts"

ErrorFieldContract

오류 필드 계약.

Name 형식 Description
code

string

속성 수준 오류 코드입니다.

message

string

사람이 읽을 수 있는 속성 수준 오류 표현입니다.

target

string

속성 이름입니다.

ErrorResponse

오류 응답.

Name 형식 Description
error.code

string

서비스에서 정의한 오류 코드입니다. 이 코드는 응답에 지정된 HTTP 오류 코드의 하위 상태로 사용됩니다.

error.details

ErrorFieldContract[]

유효성 검사 오류가 발생한 경우 요청에 잘못된 필드가 전송됩니다.

error.message

string

사람이 읽을 수 있는 오류 표현입니다.