--- title: "createTrafficProfile" slug: "pub-global-traffic-manager-v2-traffic-profiles-createtrafficprofile" updated: 2026-11-24T09:24:40Z published: 2026-11-24T09:24:40Z canonical: "api.ncloud-docs.com/pub-global-traffic-manager-v2-traffic-profiles-createtrafficprofile" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createTrafficProfile 이 가이드는 API 명세를 기반으로 자동 생성했습니다. Classic/VPC 환경에서 이용 가능합니다. Ncloud API 표준 규격을 적용한 API입니다. Traffic Profile을 생성합니다. Traffic Profile은 도메인과 TTL을 정의하고 Traffic Policy를 연결하는 자원입니다. 연결된 Traffic Policy의 로드 밸런싱 알고리즘과 리소스 구성이 실제 DNS 응답을 결정하므로, Traffic Profile을 만들기 전에 Traffic Policy를 먼저 생성해야 합니다. Traffic Profile 구성은 네임서버에 반영되어야 실제 DNS 응답에 적용되므로 요청은 응답 시점에 완결되지 않습니다. 응답으로 작업을 반환하며, 작업의 `id` 를 `GET /traffic-profiles/operations/{operationId}` 로 조회해 `done` 이 true가 되는 시점을 확인합니다. 확정된 Traffic Profile은 작업 조회 응답의 `results` 로 확인합니다. ## 요청 요청 형식을 설명합니다. 요청 형식은 다음과 같습니다. | 메서드 | URI | | --- | --- | | POST | /gtm/v2/traffic-profiles | ### 요청 헤더 Global Traffic Manager API에서 공통으로 사용하는 헤더에 대한 정보는 [Global Traffic Manager 요청 헤더](/docs/pub-global-traffic-manager-v2-overview#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)를 참조해 주십시오. ### 요청 바디 요청 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 설명 | | --- | --- | --- | --- | | `host` | String | Required | 도메인 이름의 host 부분 (서버가 `.ncloudgtm.com` 을 붙여 완성, `www` → `www.ncloudgtm.com`) 대소문자 미구분, 서버가 소문자로 정규화 각 label은 영문자 · 숫자로 시작하고 끝나며 중간에 하이픈(`-`) 사용 가능 완성된 도메인 이름은 계정과 무관하게 전역에서 유일해야하며, 이미 사용 중이면 409 AlreadyExists 응답 - 패턴: `^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$` - 길이: 2 ~ 136 - <예시> www | | `trafficPolicyId` | String | Required | 연결할 Traffic Policy Id - 길이: 1 ~ - <예시> 3 | | `ttl` | Integer (int64) | Optional | DNS 응답의 TTL (초). - 범위: 60 ~ 604,800 (기본값: `300`) - <예시> 300 | | `claRegionCode` | ClaRegionCode \| Null | Optional | 질의 로그를 수집할 CLA 리전 코드 (KR 한국, JPN 일본, SGN 싱가포르, 제공 리전은 늘어날 수 있음) 생략하거나 null이면 질의 로그를 수집하지 않음 - 한 가지만 지정 - <예시> KR | ### 요청 예시 요청 예시는 다음과 같습니다. ``` curl --location --request POST 'https://globaltrafficmanager.apigw.ntruss.com/gtm/v2/traffic-profiles' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' \ --data '{ "host": "www", "trafficPolicyId": "3" }' ``` ## 응답 응답 형식을 설명합니다. ### 응답 바디 이 API는 작업을 접수하고 [Operation 기반 LRO API 응답](/docs/type-operation-response#LRO%EC%9D%91%EB%8B%B5)을 반환합니다. 작업 상태는 작업 조회 API로 확인합니다. 처리 흐름은 [Operation 응답](/docs/type-operation-response#%EC%B2%98%EB%A6%AC%ED%9D%90%EB%A6%84)을 참조해 주십시오. 응답 바디에 대한 설명은 다음과 같습니다. | 필드 | 타입 | 필수 여부 | 구분 | 설명 | | --- | --- | --- | --- | --- | | `id` | String (uuid) | Required | [공통](/docs/type-operation-response#LRO%EC%9D%91%EB%8B%B5) | Operation 식별자 - <예시> 550e8400-e29b-41d4-a716-446655440000 | | `done` | Boolean | Required | [공통](/docs/type-operation-response#LRO%EC%9D%91%EB%8B%B5) | 작업 완료 여부. 완료 시 true, 진행 중이면 false - `true` \| `false` - <예시> false | | `metadata` | Object<[OperationMetadata](/docs/type-operation-response#OperationMetadata)> | Required | - | 작업 메타데이터 (어떤 자원에 대한 어떤 요청이었는지와 작업의 시작 · 종료 시점) 시각 필드는 자원의 `createdDateTime` · `updatedDateTime` 과 동일하게 ISO 8601 문자열로 표현 - <예시> `{"operationType": "UPDATE", "resourceType": "traffic-profiles", "startDateTime": "2026-08-07T09:30:00+09:00", "endDateTime": "2026-08-07T09:31:12+09:00"}` | ### 응답 상태 코드 호출에 실패하면 [기본 오류 응답](/docs/type-error-response) 형식의 응답 바디를 반환하며, 오류 코드는 `error.errorCode` 값입니다. 응답 상태 코드에 대한 설명은 다음과 같습니다. | HTTP 상태 코드 | 코드 | 메시지 | 설명 | | --- | --- | --- | --- | | 202 | - | - | Accepted | | 400 | `InvalidParameter` | `The specified parameter is invalid.` | 요청 본문 필드의 형식 또는 범위가 올바르지 않은 경우 | | 400 | `BadRequest` | `The request is malformed or contains an error such as an invalid parameter value or a missing required parameter.` | 요청을 해석할 수 없는 경우 | | 400 | `InvalidConfiguration` | `Some or all of the configuration is incomplete, missing, or not valid.` | 요청 본문의 구성 조합이 유효하지 않은 경우 | | 400 | `InvalidState` | `The request cannot be processed in the current state.` | `claRegionCode` 에 CLA를 구독하지 않은 리전을 지정한 경우 | | 404 | `TrafficPolicyNotFound` | `The Traffic Policy does not exist.` | 대상 자원이 존재하지 않는 경우 | | 409 | `AlreadyExists` | `A resource with the requested identifier already exists.` | 같은 도메인 이름의 Traffic Profile이 이미 있는 경우. 도메인 이름은 계정과 무관하게 전역에서 유일하며, 삭제를 접수했지만 아직 네임서버에서 내려가지 않은 이름도 사용 중으로 간주 | | 415 | `UnsupportedMediaType` | `The content type of the request body is not supported.` | 요청 본문의 Content-Type이 `application/json` 이 아닌 경우 | 참고 Global Traffic Manager API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 [Global Traffic Manager 응답 상태 코드](/docs/pub-global-traffic-manager-v2-overview#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)를 참조해 주십시오. ### 응답 예시 응답 예시는 다음과 같습니다. ``` { "id": "550e8400-e29b-41d4-a716-446655440000", "done": false, "metadata": { "operationType": "UPDATE", "resourceType": "traffic-profiles", "startDateTime": "2026-08-07T09:30:00+09:00", "endDateTime": "2026-08-07T09:31:12+09:00" } } ```