이 가이드는 API 명세를 기반으로 자동 생성했습니다.
VPC 환경에서 이용 가능합니다.
Ncloud API 표준 규격을 적용한 API입니다.
리전의 상품 목록과 상품별 요금을 조회합니다.
prices에는 요금의 요약 필드만 담깁니다. 전체 필드는 상품 조회를 사용합니다.pageSize의 단위는 상품이며, 한 페이지에 담기는 요금 행 수는 이보다 많을 수 있습니다.- 목록 필터는 모두 동등 비교이며, 여러 값은
serviceCode=a&serviceCode=b처럼 반복해서 전달합니다. - 기본 정렬은
productCode오름차순입니다.
페이지네이션
- 커서 기반 페이지네이션을 사용하며 전체 건수는 제공하지 않습니다.
- 응답의
nextToken이 null이면 마지막 페이지입니다. nextToken은 발급 시점의 조회 조건에 종속됩니다. 조회 조건을 바꾸거나 다른 API의 토큰을 전달하면InvalidNextToken(400)이 반환됩니다.
권한
- 서브 계정으로 호출하려면 IAM action
View/getProducts권한이 필요합니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
| 메서드 | URI |
|---|---|
| GET | /billing/v2/products |
요청 헤더
Billing API에서 공통으로 사용하는 헤더에 대한 정보는 Billing 요청 헤더를 참조해 주십시오.
요청 쿼리 파라미터
요청 쿼리 파라미터에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
regionCode |
String | Required | 리전 코드. 조회할 상품 범위와 prices 범위를 함께 결정
|
payCurrency |
String | Optional | 요금 통화. 지정하지 않으면 회원 결제 통화
|
serviceCode |
List<String> | Optional | 서비스 코드. 이 서비스로 청구되는 요금을 가진 상품만 반환. 여러 번 지정하면 하나라도 일치하는 항목을 반환
|
billingItemGroupCode |
List<String> | Optional | 과금항목그룹 코드. 여러 번 지정하면 하나라도 일치하는 항목을 반환
|
billingItemCode |
List<String> | Optional | 과금항목 코드. 이 과금항목의 요금을 가진 상품만 반환. 여러 번 지정하면 하나라도 일치하는 항목을 반환
|
productCode |
List<String> | Optional | 상품 코드. 여러 번 지정하면 하나라도 일치하는 항목을 반환
|
categoryCode |
List<String> | Optional | 상품 카테고리 코드. 여러 번 지정하면 하나라도 일치하는 항목을 반환
|
pageSize |
Integer (int32) | Optional | 페이지 크기
|
nextToken |
String | Optional | 다음 페이지 토큰 (첫 요청 시 생략)
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request GET 'https://billingapi.apigw.ntruss.com/billing/v2/products?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 응답 헤더를 참조해 주십시오.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
products |
List<ProductSummary> | Required | 상품 목록. prices는 요금의 요약 필드만 담음
|
nextToken |
String | null | Required | 다음 페이지 토큰. 마지막 페이지에서는 null
|
ProductSummary
상품(목록 조회). prices에는 요금의 요약 필드만 담음
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
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<PriceSummary> | Required | 요금 목록(요약). 요금이 없으면 빈 배열
|
PriceSummary
요금(요약 필드). 목록·단건 조회에 모두 포함
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
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
|
응답 상태 코드
호출에 실패하면 기본 오류 응답 형식의 응답 바디를 반환하며, 오류 코드는 error.errorCode 값입니다.
응답 상태 코드에 대한 설명은 다음과 같습니다.
| HTTP 상태 코드 | 코드 | 메시지 | 설명 |
|---|---|---|---|
| 400 | InvalidParameter |
The specified parameter is invalid. |
regionCode가 없거나 파라미터 형식·범위가 올바르지 않은 경우 |
| 400 | InvalidNextToken |
You have provided an invalid pagination token in your request. |
nextToken이 손상되었거나 다른 조회 조건으로 발급된 경우 |
| 403 | Forbidden |
You do not have sufficient permissions to perform this action. |
서브 계정에 조회 권한이 없는 경우. detail에 거부된 IAM action이 담김. 권한 정책을 수정한 뒤 다시 요청 |
참고
Billing API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Billing 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"products": [
{
"productCode": "SPNET00000000015",
"productName": "Network",
"productDescription": "Network",
"categoryCode": "NETWORKING",
"categoryName": "Networking",
"productItemKindCode": "NET",
"productItemKindName": "Network",
"productItemKindDetailCode": null,
"productItemKindDetailName": null,
"productTypeCode": null,
"productTypeName": null,
"productTypeDetailCode": null,
"productTypeDetailName": null,
"softwareTypeCode": null,
"softwareTypeName": null,
"generationCode": null,
"generationName": null,
"serverProductCode": null,
"cpuCount": null,
"gpuCount": null,
"memorySize": null,
"baseBlockStorageSize": null,
"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": 28,
"serviceCode": "NET",
"serviceName": "Network",
"billingItemGroupCode": "NET_SVR",
"billingItemGroupName": "Network - Server&LoadBalancer",
"billingItemCodes": [
"NTOSM-ITSTM"
],
"billingItemNames": [
"Outbound(Internet) Network - Server type&Load Balancer"
],
"ratingTypeCode": "NETOT",
"ratingTypeName": "Network OUT",
"rateType": "METERED",
"rateTypeName": "Meter rate",
"pricingUnitType": "SECTION",
"pricingUnitTypeName": "Period unit",
"unitCode": "USAGE_1GB",
"unitName": "GB",
"unitPrice": null,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2011-06-07T15:00:00Z",
"endDateTime": null,
"priceVersion": null
}
]
},
{
"productCode": "SPNOTIF000000001",
"productName": "SImple & Easy Notification Service",
"productDescription": "SImple & Easy Notification Service",
"categoryCode": "APP-SERVICES",
"categoryName": "Application Services",
"productItemKindCode": "NOTIF",
"productItemKindName": "Simple & Easy Notification Service",
"productItemKindDetailCode": null,
"productItemKindDetailName": null,
"productTypeCode": null,
"productTypeName": null,
"productTypeDetailCode": null,
"productTypeDetailName": null,
"softwareTypeCode": null,
"softwareTypeName": null,
"generationCode": null,
"generationName": null,
"serverProductCode": null,
"cpuCount": null,
"gpuCount": null,
"memorySize": null,
"baseBlockStorageSize": null,
"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": 7100,
"serviceCode": "NOTIF",
"serviceName": "Simple & Easy Notification Service",
"billingItemGroupCode": "NOTIF",
"billingItemGroupName": "Simple & Easy Notification Service",
"billingItemCodes": [
"NTFSM-GSMS"
],
"billingItemNames": [
"Global SMS"
],
"ratingTypeCode": "GSMS",
"ratingTypeName": "Global SMS",
"rateType": "METERED",
"rateTypeName": "Meter rate",
"pricingUnitType": "DETAIL",
"pricingUnitTypeName": "Detail Unit",
"unitCode": "REQ_CNT",
"unitName": "Number of requests",
"unitPrice": null,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2018-06-18T15:00:00Z",
"endDateTime": null,
"priceVersion": null
}
]
},
{
"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": "LOCAL",
"diskTypeName": "Local storage",
"diskDetailTypeCode": "SSD",
"diskDetailTypeName": "SSD",
"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
},
{
"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
}
]
},
{
"productCode": "SVR.VSVR.STAND.C002.M008.NET.HDD.B050.G002",
"productName": "vCPU 2EA, Memory 8GB, [HDD] Disk 50GB",
"productDescription": "vCPU 2EA, Memory 8GB, [HDD] Disk 50GB",
"categoryCode": "COMPUTE",
"categoryName": "Compute",
"productItemKindCode": "VSVR",
"productItemKindName": "Server (VPC)",
"productItemKindDetailCode": "STAND",
"productItemKindDetailName": "Standard",
"productTypeCode": "STAND",
"productTypeName": "Standard",
"productTypeDetailCode": null,
"productTypeDetailName": null,
"softwareTypeCode": null,
"softwareTypeName": null,
"generationCode": "G2",
"generationName": "G2",
"serverProductCode": null,
"cpuCount": 2,
"gpuCount": 0,
"memorySize": 8589934592,
"baseBlockStorageSize": 53687091200,
"dbKindCode": null,
"dbKindName": null,
"osInformation": null,
"osTypeCode": null,
"osTypeName": null,
"platformTypeCode": null,
"platformTypeName": null,
"platformCategoryCode": null,
"diskTypeCode": "NET",
"diskTypeName": "Network storage",
"diskDetailTypeCode": "HDD",
"diskDetailTypeName": "HDD",
"prices": [
{
"priceNo": 30001,
"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": 54,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2020-12-06T15:00:00Z",
"endDateTime": null,
"priceVersion": null
},
{
"priceNo": 30003,
"serviceCode": "VSVR",
"serviceName": "Server (VPC)",
"billingItemGroupCode": "VSVR",
"billingItemGroupName": "Server (VPC)",
"billingItemCodes": [
"VSVR-VSVRT"
],
"billingItemNames": [
"Server (VPC) Stop Usage"
],
"ratingTypeCode": "VSVR",
"ratingTypeName": "VPC Server",
"rateType": "METERED",
"rateTypeName": "Meter rate",
"pricingUnitType": "POINT",
"pricingUnitTypeName": "Point unit",
"unitCode": "USAGE_HH",
"unitName": "Usage time (per hour)",
"unitPrice": 5.4,
"payCurrency": "KRW",
"regionCode": "KR",
"regionName": "Korea",
"startDateTime": "2020-12-06T15:00:00Z",
"endDateTime": null,
"priceVersion": null
}
]
}
],
"nextToken": "c_EOvh4bjJwcoS1Vql3camd61H64G833OmvXEBeUDYTp7zppR9UhJzM8dGcXXg0q8JIU0CvP05RH7p5bUZaGBrc2Or04bmA"
}