exportDbServerLogToObjectStorage

Prev Next

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

개요

Cloud DB 서버 로그 파일을 Object Storage로 전송합니다.

요청

요청 헤더

헤더명 설명
x-ncp-apigw-timestamp 1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(Millisecond)로 나타내며 API Gateway 서버와 시간 차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
x-ncp-apigw-timestamp:{Timestamp}
x-ncp-apigw-api-key APIGW에서 발급받은 키 값, v2를 사용할 경우 api-key는 사용하지 않음
x-ncp-apigw-api-key:{API Gateway API Key}
x-ncp-iam-access-key 네이버 클라우드 플랫폼 포털에서 발급받은 Access Key ID 값
x-ncp-iam-access-key:{Sub Account Access Key}
x-ncp-apigw-signature-v2 Access Key ID 값과 Secret Key로 암호화한 서명
x-ncp-apigw-signature-v2:{API Gateway Signature}
Content-Type Request body content type을 application/json으로 지정
Content-Type: application/json

요청 파라미터

파라미터명 필수 여부 타입 제약 사항 설명
regionNo No String - 리전 코드
- regionCode는 getRegionList 액션을 통해 획득 가능
Default : getRegionList 조회 결과의 첫 번째 리전을 선택
dbKindCode Yes String MYSQL DB 유형 코드
fileName Yes String - 데이터베이스 서버 로그 파일 이름
- fileName은 getDbServerLogList 액션을 통해 획득 가능
bucketName Yes String - Object Storage 버킷 이름
- bucketName은 ListBuckets 액션을 통해 획득 가능
cloudDBInstanceNo Yes String - 생성되어있는 MySQL 서버의 인스턴스 번호
- getCloudDBInstanceList 를 통해 취득 가능
cloudDBServerInstanceNo Yes String - Cloud DB for MySQL 서버 인스턴스 번호
- getCloudDBInstanceList 를 통해 취득 가능
logType Yes String - 데이터베이스 서버 로그 파일 타입
Options : BINARY | ERROR | SLOW | GENERAL
responseFormatType No String - 응답 결과의 포맷 타입
Options : xml | json
Default : xml

응답

필드명 타입 설명 비고
returnCode Integer
returnMessage String

예시

요청 예시

GET {API_URL}/exportDbServerLogToObjectStorage
?regionNo=1
&dbKindCode=MYSQL
&fileName=20220914
&bucketName=mysql-b
&cloudDBInstanceNo=553065
&cloudDBServerInstanceNo=553066
&logType=BINARY
&responseFormatType=XML

요청 샘플

{
  "regionNo": "1",
  "dbKindCode": "MYSQL",
  "fileName": "20220914",
  "bucketName": "mysql-b",
  "cloudDBInstanceNo": "553065",
  "cloudDBServerInstanceNo": "553066",
  "logType": "BINARY",
  "responseFormatType": "XML"
}

응답 예시

 connection: keep-alive 
 content-type: application/xml;charset=UTF-8 
 date: Wed, 14 Sep 2022 05:23:20 GMT 
 server: nginx 
 transfer-encoding: chunked 
 x-ncp-apigw-response-origin: ENDPOINT 
 x-ncp-trace-id: 3ap1occq3ge3568chncoojcp9i 
<exportDbServerLogToObjectStorageResponse>
 <requestId>cade908e-f13c-4085-aa4f-9ccaf0dd9f24</requestId>
 <returnCode>0</returnCode>
 <returnMessage>success</returnMessage>
</exportDbServerLogToObjectStorageResponse>