Cloud DB Serverless 개요

Prev Next

VPC 환경에서 이용 가능합니다.

Ncloud 표준 표현을 적용한 API입니다.

Cloud DB Serverless는 이용 패턴에 따라 스펙과 용량을 자동으로 최적화하는 데이터베이스를 운영할 수 있도록 지원하는 네이버 클라우드 플랫폼의 서비스입니다. Cloud DB Serverless 서비스에서는 클러스터, 인스턴스, DB 사용자, Database, DB 파라미터, 로그, 백업, 이벤트, Operation, 엔진 버전 기능에 대한 API를 RESTful 형태로 제공합니다.

Cloud DB Serverless 공통 설정

Cloud DB Serverless API에서 공통으로 사용하는 요청 형식과 응답 형식을 설명합니다.

요청

공통 요청 형식을 설명합니다.

API URL

요청 API URL은 다음과 같습니다.

https://clouddb-serverless.apigw.ntruss.com

요청 헤더

요청 헤더에 대한 설명은 다음과 같습니다.

필드 필수 여부 설명
x-ncp-apigw-timestamp Required 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간 (밀리초)
  • API Gateway 서버와 5분 이상 시간 차 발생 시 유효하지 않은 요청으로 간주
  • Unix Timestamp 형식
x-ncp-iam-access-key Required 네이버 클라우드 플랫폼에서 발급받은 Access Key
x-ncp-apigw-signature-v2 Required 네이버 클라우드 플랫폼에서 발급받은 Access Key에 매핑되는 Secret Key 및 HMAC 암호화 알고리즘(HmacSHA256)으로 요청 정보를 암호화한 후 Base64로 인코딩한 서명
Content-Type Conditional 요청 바디의 미디어 타입
  • application/json | application/merge-patch+json
    • application/json: POST 요청, PATCH 요청
    • application/merge-patch+json: PATCH 요청
  • 요청 바디가 있는 경우, 필수 입력

응답

공통 응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다. 호출이 성공한 경우, 응답 바디는 각 API 문서를 참조해 주십시오.

Error
Error는 API 호출 실패 정보를 정의합니다. Error에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
error Object - 오류 정보
error.errorCode String - 오류 코드
error.message String - 오류 메시지
error.detail String - 오류 상세 정보

응답 상태 코드

응답 상태 코드에 대한 설명은 다음과 같습니다.

HTTP 상태 코드 코드 메시지 설명
200 - - 요청 성공. 각 API 문서의 응답 상태 코드 참조
202 - - 요청 접수. 비동기 API의 응답으로 Operation 반환. 각 API 문서의 응답 바디 참조
400 BadRequest The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. 요청 본문 또는 파라미터의 형식이 올바르지 않은 경우
400 InvalidParameter The specified parameter is invalid. 각 API 문서의 응답 상태 코드 참조
400 InvalidState Indicates that the specified state is not a valid state for an event source. 각 API 문서의 응답 상태 코드 참조
401 Unauthorized Invalid authentication credentials. 인증 헤더가 없거나 서명이 유효하지 않은 경우
403 AccessDenied The client is permanently forbidden from making the request. 요청한 리소스에 대한 접근 권한이 없는 경우
403 Forbidden You do not have sufficient permissions to perform this action. 해당 작업을 수행할 권한이 없는 경우
404 NotFound One or more of the resources in the request does not exist in the system. 지정한 리소스가 존재하지 않는 경우
409 Conflict The request could not be processed because of a conflict in the current status of the resource. 각 API 문서의 응답 상태 코드 참조
409 ResourceInUse The specified resource is in use. 각 API 문서의 응답 상태 코드 참조
415 UnsupportedMediaType The content type of the request body is not supported. 요청 Content-Type이 지원 대상이 아닌 경우. accept-patch 응답 헤더로 지원 미디어 타입 안내
429 TooManyRequests The operation failed because it was called too frequently and exceeded a throttle limit. 요청 한도를 초과한 경우
429 ThrottlingExceeded The request was denied due to request throttling. 단위 시간당 허용 호출 수를 초과한 경우
500 InternalServerError The request processing has failed because of an unknown error, exception, or failure. 서버 내부 오류가 발생한 경우
참고

네이버 클라우드 플랫폼에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Ncloud API 응답 상태 코드를 참조해 주십시오.

응답 예시

호출이 성공한 경우의 응답 예시는 각 API 명세에서 확인해 주십시오. 호출이 실패한 경우의 응답 예시는 다음과 같습니다.

{
  "error": {
    "errorCode": "Unauthorized",
    "message": "Invalid authentication credentials.",
    "detail": "Authentication information are missing."
  }
}

Cloud DB Serverless API

Cloud DB Serverless에서 제공하는 API에 대한 설명은 다음과 같습니다.

Cluster

클러스터 관련 API에 대한 설명은 다음과 같습니다.

API 설명
createCluster 클러스터 생성
listClusters 클러스터 목록 조회
getCluster 클러스터 상세 정보 조회
updateCluster 클러스터 설정 변경
deleteCluster 클러스터 삭제
restoreCluster 백업 복원으로 새 클러스터 생성

Instance

인스턴스 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listInstances 인스턴스 목록 조회
getInstance 인스턴스 상세 정보 조회
listProcesses 인스턴스에 연결된 세션 목록 조회
batchKillProcesses 인스턴스의 세션 일괄 종료

User

DB 사용자 관련 API에 대한 설명은 다음과 같습니다.

API 설명
createUser DB 사용자 계정 생성
batchCreateUsers DB 사용자 계정 일괄 생성
listUsers DB 사용자 목록 조회
getUser DB 사용자 상세 정보 조회
updateUser DB 사용자 계정의 비밀번호 또는 권한 변경
deleteUser DB 사용자 계정 삭제
batchDeleteUsers DB 사용자 계정 일괄 삭제

Database

Database 관련 API에 대한 설명은 다음과 같습니다.

API 설명
createDatabase Database 생성
batchCreateDatabases Database 일괄 생성
listDatabases Database 목록 조회
getDatabase Database 존재 확인
deleteDatabase Database 삭제
batchDeleteDatabases Database 일괄 삭제

Config

DB 파라미터 관련 API에 대한 설명은 다음과 같습니다.

API 설명
getConfig DB 파라미터 설정 조회
updateConfig DB 파라미터 변경
listConfigParameters 변경할 수 있는 DB 파라미터 목록 조회

Log

로그 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listLogs 인스턴스의 로그 파일 목록 조회
exportLogs 인스턴스의 로그 파일을 Object Storage로 내보내기
batchDeleteLogs 인스턴스의 로그 파일 일괄 삭제
getLogConfig 로그 로테이션 설정 조회
updateLogConfig 로그 로테이션 설정 변경

Backup

백업 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listBackups 백업 목록 조회
getBackup 백업 상세 정보 조회
exportBackup 백업 파일을 Object Storage로 내보내기
createImportedBackup Object Storage의 백업 파일을 가져와 Imported Backup 생성
listImportedBackups Imported Backup 목록 조회
getImportedBackup Imported Backup 상세 정보 조회
deleteImportedBackup Imported Backup 삭제

Event

이벤트 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listEvents 이벤트 이력 조회

Operation

Operation 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listClusterOperations 클러스터 Operation 목록 조회
getClusterOperation 클러스터 Operation 진행 상태 조회
listProcessOperations 세션 종료 Operation 목록 조회
getProcessOperation 세션 종료 Operation 진행 상태 조회
listUserOperations DB 사용자 Operation 목록 조회
getUserOperation DB 사용자 Operation 진행 상태 조회
listDatabaseOperations Database Operation 목록 조회
getDatabaseOperation Database Operation 진행 상태 조회
listConfigOperations DB 파라미터 변경 Operation 목록 조회
getConfigOperation DB 파라미터 변경 Operation 진행 상태 조회
listLogOperations 로그 Operation 목록 조회
getLogOperation 로그 Operation 진행 상태 조회
listBackupOperations 백업 Operation 목록 조회
getBackupOperation 백업 Operation 진행 상태 조회
listImportedBackupOperations Imported Backup Operation 목록 조회
getImportedBackupOperation Imported Backup Operation 진행 상태 조회

Engine Version

엔진 버전 관련 API에 대한 설명은 다음과 같습니다.

API 설명
listEngineVersions 클러스터 생성 시 사용할 수 있는 DB 엔진 버전 목록 조회

Cloud DB Serverless 연관 리소스

Cloud DB Serverless API에 대한 사용자의 이해를 돕기 위해 다양한 연관 리소스를 제공하고 있습니다.