Skip to content

Quota Info Guide(KR)

ByoungSeob Kim edited this page May 13, 2026 · 4 revisions

Quota Info Guide

Language: English | 한국어

1. CB-Spider Quota Info 개요

  • 사용자는 CSP가 제공하는 서비스 타입별 Quota 정보(한도, 사용량, 가용량)를 조회할 수 있다.
  • Quota 조회는 2단계로 진행된다.
    1. ListQuotaServiceType로 서비스 타입 목록 조회
    2. GetQuotaInfo로 특정 서비스 타입의 Quota 상세 조회
  • CB-Spider는 CSP가 제공하는 원본 Quota 항목을 최대한 그대로 전달하며, CSP가 제공하지 않는 값은 NA로 반환한다.
  • 지원 CSP: AWS, Azure, GCP, Alibaba
┌─────────────────────────────────────────────────────────────┐
│                    CB-Spider Quota Info                     │
│                                                             │
│  ConnectionName (CSP + Region)                              │
│        │                                                    │
│        ├── ListQuotaServiceType()                           │
│        │      └── ServiceType 목록                           │
│        │           예: ec2, eks, Compute                    │
│        │               compute.googleapis.com, ecs          │
│        │                                                    │
│        └── GetQuotaInfo(ServiceType)                        │
│               └── Quotas                                    │
│                    ├── QuotaName                            │
│                    ├── Limit                                │
│                    ├── Used                                 │
│                    ├── Available                            │
│                    ├── Unit                                 │
│                    └── Description                          │
└─────────────────────────────────────────────────────────────┘

2. 사전 준비 사항

2.1 공통

  • 대상 CSP Connection이 정상적으로 등록되어 있어야 한다.

2.2 GCP 사전 준비

3. CB-Spider Quota API 및 제공 정보 규격

  • 사용자는 다음과 같은 CB-Spider REST API를 이용하여 Quota 정보를 JSON 규격으로 제공받는다.

3.1 Quota API

# Quota 서비스 타입 목록
GET /spider/quotaservicetype        - List Quota Service Types

# 특정 서비스 타입의 Quota 상세
GET /spider/quotainfo               - Get Quota Info

3.2 요청 파라미터

ListQuotaServiceType

파라미터 설명 예시
ConnectionName Quota 정보를 조회할 대상 Connection 이름 aws-seoul-config, gcp-seoul-config

GetQuotaInfo

파라미터 설명 예시
ConnectionName Quota 정보를 조회할 대상 Connection 이름 aws-seoul-config
ServiceType ListQuotaServiceType API로 조회한 서비스 타입 이름 ec2, compute.googleapis.com, ecs

3.3 제공 정보 규격

Quota 정보 (QuotaInfo)

필드 설명 예시
CSP 클라우드 제공자 이름 AWS, AZURE, GCP, ALIBABA
Region Quota가 적용되는 리전/위치 ap-northeast-2, koreacentral, asia-northeast3, cn-beijing
Quotas 서비스 타입에 속한 Quota 상세 목록 아래 Quota 참조

Quota 상세 정보 (Quota)

필드 설명 예시
QuotaName Quota 항목 이름 Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances, CPUs
Limit Quota 한도 값 500, 24, 801
Used 현재 사용량 12, 8, 26
Available 사용 가능 잔여량 (Limit - Used) 488, 16, 775
Unit Quota 단위 count, vCPU, Count, NA
Description Quota 부가 정보 AWS QuotaArn

참고

  • CSP가 Used, Available, Unit 등을 제공하지 않으면 해당 값은 NA로 반환된다.
  • Quota 항목 이름과 설명은 CSP 원본 값을 최대한 그대로 전달한다.

4. CB-Spider Quota API 예시

4.1 서비스 타입 목록 조회 예시

curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX 'GET' 'http://localhost:1024/spider/quotaservicetype?ConnectionName=aws-seoul-config' | jq

응답 예시:

{
  "ServiceTypes": [
    "ec2",
    "vpc",
    "ebs",
    ...
  ]
}

4.2 특정 서비스 타입 Quota 조회 예시

curl -u "$SPIDER_USERNAME:$SPIDER_PASSWORD" -sX 'GET' 'http://localhost:1024/spider/quotainfo?ConnectionName=aws-seoul-config&ServiceType=ec2' | jq

응답 예시:

{
  "CSP": "AWS",
  "Region": "ap-northeast-2",
  "Quotas": [
    {
      "QuotaName": "Attachments per transit gateway",
      "Limit": "5000",
      "Used": "NA",
      "Available": "NA",
      "Unit": "None",
      "Description": "QuotaArn=arn:aws:servicequotas:ap-northeast-2:635484366616:ec2/L-E0233F82"
    },
    {
      "QuotaName": "Running Dedicated z1d Hosts",
      "Limit": "2",
      "Used": "NA",
      "Available": "NA",
      "Unit": "None",
      "Description": "QuotaArn=arn:aws:servicequotas:ap-northeast-2:635484366616:ec2/L-F035E935"
    },
    {
      "QuotaName": "Concurrent TRN1 Capacity Blocks per account",
      "Limit": "32768",
      "Used": "NA",
      "Available": "NA",
      "Unit": "None",
      ...
    }
  ]
}

5. Quota 시험 결과

5.1 AWS: Pass

============================================================
 Test Result Summary
============================================================
 Connection      : aws-seoul-config
 Service Types   : 218
 Success         : 218
 Failure         : 0
============================================================

5.2 Azure: Pass

============================================================
 Test Result Summary
============================================================
 Connection      : azure-koreacentral-config
 Service Types   : 14
 Success         : 14
 Failure         : 0
============================================================

5.3 GCP: Pass

============================================================
 Test Result Summary
============================================================
 Connection      : gcp-seoul-config
 Service Types   : 46
 Success         : 46
 Failure         : 0
============================================================

5.4 Alibaba: Pass

  • 시험에서는 아래 4개 서비스 타입이 현재 리전 미지원으로 에러를 반환하였으며,
  • 이는 정상적인 예외 상황(세부 내용 주의 사항 및 제약사항 참고)
    • ros
    • openapiexplorer
    • sas
    • cloudsso
============================================================
 Test Result Summary
============================================================
 Connection      : alibaba-beijing-config
 Service Types   : 66
 Success         : 62
 Failure         : 4
============================================================

6. 주의사항 및 제약사항

6.1 서비스 타입은 CSP별 형식이 다름

  • AWS: ec2, vpc, ebs, eks
  • Azure: Compute, ContainerService
  • GCP: compute.googleapis.com, container.googleapis.com
  • Alibaba: ecs, csk

6.2 Alibaba 리전별 서비스 제공 차이

  • Alibaba 서비스 타입 목록에는 Region 미지원 항목이 포함될 수 있다.
    • 현재 Region에서 제공하는 서비스 타입 목록을 한번에 얻는 API 부재
    • 제공하는 서비스 타입 필터링 위해서는 많은 GetQuota API 호출 필요
  • 즉, 특정 서비스 타입에 대해 GetQuotaInfo 요청 시 다음 오류가 발생할 수 있다.
    • ErrorCode: QUOTA.DIMENSION.VALUE.UNSUPPORT

6.3 Alibaba 중국 계정의 Quota 정보 언어

  • Alibaba 중국 계정을 사용하는 경우, Quota API가 반환하는 QuotaNameDescription 등이 중국어로 제공된다.
  • 이는 Alibaba API의 언어 옵션으로 해결할 수 없는 CSP 정책으로 추정됨
{
  "QuotaName": "单次可购买的包年包月实例的最大数量",
  "Limit": "300",
  "Used": "0",
  "Available": "300",
  "Unit": "NA",
  "Description": "单次可购买的包年包月ecs的最大数量"
}

7. API 응답 코드

HTTP Status 설명
200 OK 요청 성공
400 Bad Request 잘못된 요청 (필수 파라미터 누락, 잘못된 서비스 타입 등)
404 Not Found 대상 리소스를 찾을 수 없음
500 Internal Server Error 서버 내부 오류 또는 CSP API 오류

8. 참고 자료

Table of contents




Clone this wiki locally