이 가이드는 API 명세를 기반으로 자동 생성했습니다.
VPC 환경에서 이용 가능합니다.
Ncloud API 표준 규격을 적용한 API입니다.
상품 하나와 그 요금의 전체 필드를 조회합니다.
prices에는 구간 단위(sectionUnits)·상세 단위(detailUnits)·패키지 단위(packageUnits)까지 모두 담깁니다.
권한
- 서브 계정으로 호출하려면 IAM action
View/getProducts권한이 필요합니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
| 메서드 | URI |
|---|---|
| GET | /billing/v2/products/{productCode} |
요청 헤더
Billing API에서 공통으로 사용하는 헤더에 대한 정보는 Billing 요청 헤더를 참조해 주십시오.
요청 경로 파라미터
요청 경로 파라미터에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
productCode |
String | Required | 상품 코드
|
요청 쿼리 파라미터
요청 쿼리 파라미터에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
regionCode |
String | Required | 리전 코드. prices 범위를 결정
|
payCurrency |
String | Optional | prices의 요금 통화. 지정하지 않으면 회원 결제 통화
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request GET 'https://billingapi.apigw.ntruss.com/billing/v2/products/SVR.VSVR.BM.C048.M512.LOCAL.SSD.B15564.G001?regionCode=KR' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
응답
응답 형식을 설명합니다.
응답 헤더
Billing API에서 공통으로 사용하는 헤더에 대한 정보는 Billing 응답 헤더를 참조해 주십시오.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
productCode |
String | Required | 상품 코드
|
productName |
String | Required | 상품명
|
productDescription |
String | null | Required | 상품 설명. 상품명과 별개로 등록한 값이며, 상품명과 같은 값인 상품이 많음. 설명이 등록되지 않은 상품이면 null
|
categoryCode |
String | Required | 상품 카테고리 코드. 전체 값은 GET /categories로 조회
|
categoryName |
String | Required | categoryCode의 표시명
|
productItemKindCode |
String | Required | 상품 종류 코드. 상품 카탈로그의 분류로 과금 계층의 serviceCode와는 다른 코드. 전체 값은 GET /codes?codeType=PRODUCT_ITEM_KIND로 조회
|
productItemKindName |
String | Required | productItemKindCode의 표시명
|
productItemKindDetailCode |
String | null | Required | 상품 종류 상세 코드. 전체 값은 GET /codes?codeType=PRODUCT_ITEM_KIND_DETAIL로 조회. 상품 종류 상세 구분이 없는 상품이면 null
|
productItemKindDetailName |
String | null | Required | productItemKindDetailCode의 표시명. productItemKindDetailCode가 null이면 null
|
productTypeCode |
String | null | Required | 상품 유형 코드. 전체 값은 GET /codes?codeType=PRODUCT_TYPE로 조회. 상품 유형 구분이 없는 상품이면 null
|
productTypeName |
String | null | Required | productTypeCode의 표시명. productTypeCode가 null이면 null
|
productTypeDetailCode |
String | null | Required | 상품 유형 상세 코드. 전체 값은 GET /codes?codeType=PRODUCT_TYPE_DETAIL로 조회. 상품 유형 상세 구분이 없는 상품이면 null
|
productTypeDetailName |
String | null | Required | productTypeDetailCode의 표시명. productTypeDetailCode가 null이면 null
|
softwareTypeCode |
String | null | Required | 소프트웨어 유형 코드. 전체 값은 GET /codes?codeType=SOFTWARE_TYPE로 조회. 소프트웨어 상품이 아니면 null
|
softwareTypeName |
String | null | Required | softwareTypeCode의 표시명. softwareTypeCode가 null이면 null
|
generationCode |
String | null | Required | 세대 코드. 전체 값은 GET /codes?codeType=GENERATION로 조회. 세대 구분이 없는 상품이면 null
|
generationName |
String | null | Required | generationCode의 표시명. 세대는 표시명이 따로 없어 generationCode와 같음. generationCode가 null이면 null
|
serverProductCode |
String | null | Required | 소프트웨어가 얹히는 서버 상품 코드. 소프트웨어 상품이 아니면 null
|
cpuCount |
Integer (int32) | null | Required | vCPU 또는 코어 수. CPU 사양이 없는 상품(서버가 아닌 상품 등)이면 null
|
gpuCount |
Integer (int32) | null | Required | GPU 수. GPU 사양이 없는 상품이면 null
|
memorySize |
Integer (int64) | null | Required | 메모리 크기 (byte). 메모리 사양이 없는 상품이면 null
|
baseBlockStorageSize |
Integer (int64) | null | Required | 기본 블록 스토리지 크기 (byte). 기본 블록 스토리지가 없는 상품이면 null
|
dbKindCode |
String | null | Required | DB 종류 코드. 전체 값은 GET /codes?codeType=DB_KIND로 조회. DB 상품이 아니면 null
|
dbKindName |
String | null | Required | dbKindCode의 표시명. dbKindCode가 null이면 null
|
osInformation |
String | null | Required | OS 정보. OS가 없는 상품이면 null
|
osTypeCode |
String | null | Required | OS 종류 코드. 전체 값은 GET /codes?codeType=OS_TYPE로 조회. OS가 없는 상품이면 null
|
osTypeName |
String | null | Required | osTypeCode의 표시명. osTypeCode가 null이면 null
|
platformTypeCode |
String | null | Required | 플랫폼 유형 코드. 전체 값은 GET /codes?codeType=PLATFORM_TYPE로 조회. 플랫폼 구분이 없는 상품이면 null
|
platformTypeName |
String | null | Required | platformTypeCode의 표시명. platformTypeCode가 null이면 null
|
platformCategoryCode |
String | null | Required | 플랫폼 분류 코드. 전체 값은 GET /codes?codeType=PLATFORM_CATEGORY로 조회. 플랫폼 분류가 없는 상품이면 null
|
diskTypeCode |
String | null | Required | 디스크 유형 코드. 전체 값은 GET /codes?codeType=DISK_TYPE로 조회. 디스크 구분이 없는 상품이면 null
|
diskTypeName |
String | null | Required | diskTypeCode의 표시명. diskTypeCode가 null이면 null
|
diskDetailTypeCode |
String | null | Required | 디스크 상세 유형 코드. 전체 값은 GET /codes?codeType=DISK_DETAIL_TYPE로 조회. 디스크 상세 구분이 없는 상품이면 null
|
diskDetailTypeName |
String | null | Required | diskDetailTypeCode의 표시명. diskDetailTypeCode가 null이면 null
|
prices |
List<Price> | Required | 요금 목록(전체). 요금이 없으면 빈 배열
|
Price
요금(전체 필드). 단건 조회에만 포함
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
priceNo |
Integer (int64) | Required | 요금 번호
|
serviceCode |
String | Required | 이 요금으로 청구되는 서비스 코드. 전체 값은 GET /cost-relation-codes로 조회
|
serviceName |
String | Required | serviceCode의 표시명
|
billingItemGroupCode |
String | Required | 과금항목그룹 코드. 서비스 아래에서 과금항목을 묶는 분류. 전체 값은 GET /cost-relation-codes로 조회
|
billingItemGroupName |
String | Required | billingItemGroupCode의 표시명
|
billingItemCodes |
List<String> | Required | 이 요금으로 비용이 집계되는 과금항목 코드 목록. 전체 값은 GET /cost-relation-codes로 조회
|
billingItemNames |
List<String> | Required | billingItemCodes의 표시명 목록
|
ratingTypeCode |
String | Required | 상품 과금 유형 코드. 무엇을 계량해 과금하는지(서버 사용 시간, 네트워크 전송량 등)를 나타내며, 과금 계층의 코드와는 다른 코드. 전체 값은 GET /codes?codeType=RATING_TYPE로 조회
|
ratingTypeName |
String | Required | ratingTypeCode의 표시명
|
rateType |
String | Required | 요금제
|
rateTypeName |
String | Required | rateType의 표시명
|
pricingUnitType |
String | Required | 요금 모델. 단건 조회에서 값이 채워지는 단위 목록을 결정
|
pricingUnitTypeName |
String | Required | pricingUnitType의 표시명
|
unitCode |
String | Required | 단가 계산 단위 코드. 전체 값은 GET /codes?codeType=PRICE_UNIT로 조회
|
unitName |
String | Required | unitCode의 표시명
|
unitPrice |
Number (double) | null | Required | 단가. POINT는 단가, PACKAGE는 기본가, SECTION·DETAIL은 null
|
payCurrency |
String | Required | 요금 통화. ISO 4217 통화 코드
|
regionCode |
String | Required | 리전 코드. COM은 리전 무관 요금. 전체 값은 GET /regions로 조회
|
regionName |
String | Required | regionCode의 표시명
|
startDateTime |
String (date-time) | Required | 적용 시작 일시
|
endDateTime |
String (date-time) | null | Required | 적용 종료 일시. 현재 유효하면 null
|
priceVersion |
String | null | Required | 요금 버전. 버전이 등록되지 않은 요금이면 null
|
meteringUnitCode |
String | null | Required | 미터링 단위 코드. 미터링 단위가 없는 요금이면 null. 전체 값은 GET /codes?codeType=PRICE_UNIT로 조회
|
meteringUnitName |
String | null | Required | meteringUnitCode의 표시명. meteringUnitCode가 null이면 null
|
description |
String | null | Required | 요금 산식 설명. 설명이 등록되지 않은 요금이면 null
|
priceAttributeCode |
String | null | Required | 요금 속성 코드. 한 상품에 속성별 요금이 여럿일 때 구분. 속성 구분이 없으면 null. 전체 값은 GET /codes?codeType=PRICE_ATTRIBUTE로 조회
|
freeUnitCode |
String | null | Required | 무료 제공량 단위 코드. 무료 제공량이 없으면 null. 전체 값은 GET /codes?codeType=PRICE_UNIT로 조회
|
freeUnitName |
String | null | Required | freeUnitCode의 표시명. 무료 제공량이 없으면 null
|
freeQuantity |
Integer (int64) | null | Required | 무료 제공량. freeUnitCode 단위. 무료 제공량이 없으면 null
|
conditionalPrice |
Object | Required | 조건부 요금. 없으면 null
|
conditionalPrice.type |
String | Required | 조건 유형
|
conditionalPrice.typeName |
String | Required | type의 표시명
|
conditionalPrice.unitPrice |
Number (double) | Required | 조건 충족 시 적용 단가
|
measurementBasis |
Object | Required | 측정 기준. 없으면 null
|
measurementBasis.type |
String | Required | 측정 기준 유형
|
measurementBasis.typeName |
String | Required | type의 표시명
|
measurementBasis.value |
Integer (int64) | Required | 측정 기준값. 예: unitCode가 REQ_CNT이고 값이 10000이면 요청 1만 건당 단가. 측정 기준값이 없으면 0
|
measurementBasis.unitCode |
String | null | Required | 측정 기준값의 단위 코드. 측정 기준값이 없으면(value가 0) null. 전체 값은 GET /codes?codeType=PRICE_UNIT로 조회
|
measurementBasis.unitName |
String | null | Required | unitCode의 표시명. unitCode가 null이면 null
|
measurementBasis.excessUnitPrice |
Number (double) | null | Required | 기준 초과분 단가. 기준 초과분 요금이 없으면 null
|
detailFeeCategoryCode |
String | null | Required | 상세 요금 분류 코드. pricingUnitType이 DETAIL일 때만 값이 있음. 전체 값은 GET /codes?codeType=DETAIL_FEE_CATEGORY로 조회
|
detailFeeCategoryName |
String | null | Required | detailFeeCategoryCode의 표시명. detailFeeCategoryCode가 null이면 null
|
detailPricingUnitType |
String | null | Required | 상세 행의 요금 모델. pricingUnitType이 DETAIL일 때만 값이 있음
|
detailPricingUnitTypeName |
String | null | Required | detailPricingUnitType의 표시명. detailPricingUnitType이 null이면 null
|
sectionUnits |
List<SectionUnit> | Required | 구간 단위 목록. pricingUnitType이 SECTION일 때만 값이 있고 그 외는 빈 배열
|
detailUnits |
List<DetailUnit> | Required | 상세 단위 목록. pricingUnitType이 DETAIL일 때만 값이 있고 그 외는 빈 배열
|
packageUnits |
List<PackageUnit> | Required | 패키지 단위 목록. pricingUnitType이 PACKAGE일 때만 값이 있고 그 외는 빈 배열
|
SectionUnit
구간 단위
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
startValue |
Integer (int64) | Required | 구간 시작값(포함). 미터링 단위 기준
|
endValue |
Integer (int64) | null | Required | 구간 끝값. null이면 상한 없음
|
unitPrice |
Number (double) | Required | 구간 단가. 요금의 unitCode 단위 기준
|
DetailUnit
상세 단위
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
detailPriceNo |
Integer (int64) | Required | 상세 요금 번호
|
detailTypeCode |
String | Required | 상세 유형 코드. detailFeeCategoryCode에 따라 국가·리전·스토리지 클래스 코드. 전체 값은 GET /codes?codeType=DETAIL_TYPE로 조회
|
detailTypeName |
String | Required | detailTypeCode의 표시명
|
unitPrice |
Number (double) | null | Required | 상세 단가. detailPricingUnitType이 POINT일 때 값이 있음
|
detailSectionUnits |
List<SectionUnit> | Required | 상세 유형 안의 구간 단위 목록. detailPricingUnitType이 SECTION일 때만 값이 있고 그 외는 빈 배열
|
PackageUnit
패키지 단위
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
productRatingTypeCode |
String | Required | 패키지에 포함되는 상품 과금 유형 코드. 전체 값은 GET /codes?codeType=RATING_TYPE로 조회
|
productRatingTypeName |
String | Required | productRatingTypeCode의 표시명
|
includedQuantity |
Number (double) | Required | 패키지에 포함된 사용량 (byte). productRatingTypeCode 과금 유형의 사용량 중 이만큼은 패키지 요금에 포함됨
|
응답 상태 코드
호출에 실패하면 기본 오류 응답 형식의 응답 바디를 반환하며, 오류 코드는 error.errorCode 값입니다.
응답 상태 코드에 대한 설명은 다음과 같습니다.
| HTTP 상태 코드 | 코드 | 메시지 | 설명 |
|---|---|---|---|
| 400 | InvalidParameter |
The specified parameter is invalid. |
regionCode가 없거나 파라미터 형식이 올바르지 않은 경우 |
| 403 | Forbidden |
You do not have sufficient permissions to perform this action. |
서브 계정에 조회 권한이 없는 경우. detail에 거부된 IAM action이 담김. 권한 정책을 수정한 뒤 다시 요청 |
| 404 | ResourceNotFound |
The specified resource could not be found. |
경로에 지정한 자원이 존재하지 않는 경우 |
참고
Billing API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Billing 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"productCode": "SVR.VSVR.BM.C048.M512.LOCAL.SSD.B15564.G001",
"productName": "Dual Intel Xeon Gold 6248R(3.0GHz), 48 cores, 512GB RAM, 8 x 1.9TB SSD",
"productDescription": "Dual Intel Xeon Gold 6248R(3.0GHz), 48 cores, 512GB RAM, 8 x 1.9TB SSD",
"categoryCode": "COMPUTE",
"categoryName": "Compute",
"productItemKindCode": "VSVR",
"productItemKindName": "Server (VPC)",
"productItemKindDetailCode": "BM",
"productItemKindDetailName": "BareMetal",
"productTypeCode": "CPU",
"productTypeName": "CPU",
"productTypeDetailCode": null,
"productTypeDetailName": null,
"softwareTypeCode": null,
"softwareTypeName": null,
"generationCode": "G1",
"generationName": "G1",
"serverProductCode": null,
"cpuCount": 48,
"gpuCount": 0,
"memorySize": 549755813888,
"baseBlockStorageSize": 16712576742195,
"dbKindCode": null,
"dbKindName": null,
"osInformation": null,
"osTypeCode": null,
"osTypeName": null,
"platformTypeCode": null,
"platformTypeName": null,
"platformCategoryCode": null,
"diskTypeCode": null,
"diskTypeName": null,
"diskDetailTypeCode": null,
"diskDetailTypeName": null,
"prices": [
{
"priceNo": 14168,
"serviceCode": "VSVR",
"serviceName": "Server (VPC)",
"billingItemGroupCode": "VSVR",
"billingItemGroupName": "Server (VPC)",
"billingItemCodes": [
"VSVR-VSVR"
],
"billingItemNames": [
"VPC Server"
],
"ratingTypeCode": "VSVR",
"ratingTypeName": "VPC Server",
"rateType": "MONTHLY_FLAT",
"rateTypeName": "Monthly flat rate",
"pricingUnitType": "POINT",
"pricingUnitTypeName": "Point unit",
"unitCode": "USAGE_TIME",
"unitName": "Usage time(Prorated)",
"unitPrice": 4168368,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2020-12-06T15:00:00Z",
"endDateTime": null,
"priceVersion": null,
"meteringUnitCode": "USAGE_SEC",
"meteringUnitName": "Usage time (per second)",
"description": null,
"priceAttributeCode": null,
"freeUnitCode": null,
"freeUnitName": null,
"freeQuantity": null,
"conditionalPrice": null,
"measurementBasis": null,
"detailFeeCategoryCode": null,
"detailFeeCategoryName": null,
"detailPricingUnitType": null,
"detailPricingUnitTypeName": null,
"sectionUnits": [],
"detailUnits": [],
"packageUnits": []
},
{
"priceNo": 14170,
"serviceCode": "VSVR",
"serviceName": "Server (VPC)",
"billingItemGroupCode": "VSVR",
"billingItemGroupName": "Server (VPC)",
"billingItemCodes": [
"VSVR-VSVR"
],
"billingItemNames": [
"VPC Server"
],
"ratingTypeCode": "VSVR",
"ratingTypeName": "VPC Server",
"rateType": "METERED",
"rateTypeName": "Meter rate",
"pricingUnitType": "POINT",
"pricingUnitTypeName": "Point unit",
"unitCode": "USAGE_HH",
"unitName": "Usage time (per hour)",
"unitPrice": 5789,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2020-12-06T15:00:00Z",
"endDateTime": null,
"priceVersion": null,
"meteringUnitCode": "USAGE_SEC",
"meteringUnitName": "Usage time (per second)",
"description": "Usage time (hour) * Price",
"priceAttributeCode": null,
"freeUnitCode": null,
"freeUnitName": null,
"freeQuantity": null,
"conditionalPrice": {
"type": "SERVER_STOP_PRICE",
"typeName": "Server Stop Price",
"unitPrice": 5789
},
"measurementBasis": {
"type": "TIME",
"typeName": "Time",
"value": 0,
"unitCode": null,
"unitName": null,
"excessUnitPrice": 0
},
"detailFeeCategoryCode": null,
"detailFeeCategoryName": null,
"detailPricingUnitType": null,
"detailPricingUnitTypeName": null,
"sectionUnits": [],
"detailUnits": [],
"packageUnits": []
}
]
}