클러스터 모드 사용 시
다음 API는 클러스터 모드를 사용으로 설정한 클러스터에 사용할 수 있습니다.
주의
user.password 필드의 값은 암호화한 값을 넣어야지만 정상적으로 생성이 가능합니다.
클러스터 생성
새로운 클러스터를 생성합니다. 생성 시, 최소 샤드 개수는 1개, 최대 샤드 개수는 12개입니다.
Request
클러스터 생성 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/clusters" \
-H "X-Auth-Token: {token-id}" \
-H "Content-Type: application/json" \
-d '{Body}'
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| Header | {token-id}* | String | API 인증 토큰 참고 |
| Content-Type* | String | 콘텐츠 유형 기본값: application/json | |
| Body | name* | String | 클러스터 이름 |
| description | String | 클러스터 설명 | |
| version* | String | Redis 버전 | |
| port* | Integer | Redis 포트 번호, 2000 ~ 50000 내 입력 | |
| shardCount* | Integer | 샤드 수 | |
| nodeCountPerShard* | Integer | 샤드당 노드 수 | |
| flavorId* | String | 플레이버 ID | |
| parameterGroupId* | String | 클러스터에 연결할 파라미터 그룹 ID | |
| subnets[]* | Object Array | 배치 가능한 서브넷 목록 | |
| subnets[].id* | String | 서브넷 ID - 서브넷 ID는 콘솔 > VPC > 서브넷에서 확인 | |
| subnetAssignments[]* | Object Array | 서브넷 배치 목록 | |
| subnetAssignments[].primary* | Object | Primary에 배치할 서브넷 | |
| subnetAssignments[].primary.id* | String | Primary에 배치할 서브넷 ID | |
| subnetAssignments[].replicas[]* | Object Array | Replica에 배치할 서브넷 목록 | |
| subnetAssignments[].replicas[].id* | String | Replica에 배치할 서브넷 ID | |
| tlsEnabled | Boolean | TLS 활성화 여부 | |
| backupSchedule | Object | 자동 백업 정책, 해당 필드가 없으면 자동 백업 사용하지 않음 | |
| backupSchedule.cron | String | 백업 일정의 크론 표현 시간만 설정 가능, 5자리 크론 표현식 사용 | |
| backupSchedule.retentionLimit | Integer | 백업의 보존 기간(단위: 일) | |
| user | Object | 데이터베이스 사용자 정보 - db 접근 시 계정 정보 | |
| user.name | String | 데이터베이스 사용자 이름 | |
| user.password | String | 데이터베이스 사용자 암호 (암호화된 형태 또는 암호 해시) 데이터베이스 사용자 암호 암호화 방법 | |
| securityGroups[]* | Object Array | 클러스터에 연결할 보안 그룹 목록 | |
| securityGroups[].id* | String | 클러스터에 연결할 보안 그룹 ID - 보안 그룹 ID는 콘솔 > Networking > VPC > 보안 그룹에서 확인 가능 |
클러스터 생성 Request Body Example
{
"name": "test-cluster",
"description": "test-cluster",
"version": "6.2.5",
"port": 6379,
"shardCount": 2,
"nodeCountPerShard": 3,
"flavorId": "3830ebad-ea2f-4822-8a7d-9e301c86a58d",
"parameterGroupId": "bbbbcccc-1234-1234-5678-e705e91db2fb",
"subnets": [
{"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
],
"subnetAssignments": [
{
"primary": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"replicas": [
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
]
},
{
"primary": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"replicas": [
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
]
}
],
"user": {
"name": "testuser",
"password": "if2iOwJYiklliJIT8tvqoY~~~~",
},
"tlsEnabled": false,
"restoreSource": {
"backupName": "{restore-source-backup-name-env}"
},
"backupSchedule": {
"cron": "* 1 * * *",
"retentionLimit": 7
},
"securityGroups": [
{"id": "abcdxxxx-4870-4c4e-a267-2de13e38c2ea"},
{"id": "qwergggg-4870-4c4e-a267-2de13e38c2ea"}
]
}
Response
| 상태 코드 | 설명 |
|---|---|
201 | 리소스 생성 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
409 | 현재 서버의 상태에 중복된 요청이 발생한 경우 |
422 | 사용자의 요청 구문은 유효하지만 작업을 진행할 수 없는 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
클러스터 생성 Response Example
201 Created
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
기존 백업 이름으로 클러스터 생성(복원)
기존 백업 이름으로 클러스터를 복원합니다.
안내
선택한 백업의 클러스터 모드와 동일한 모드로만 복원할 수 있으며, 선택한 백업 Redis 엔진 버전과 같거나 상위 버전으로만 복원 가능
주의
소스 백업의 캐시 크기가 복원할 클러스터 플레이버의 메모리의 60% 이상인 경우, 복원에 실패할 수 있습니다.
Request
기존 백업 이름으로 클러스터 생성 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/clusters" \
-H "X-Auth-Token: {token-id}" \
-H "Content-Type: application/json" \
-d '{Body}'
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| Header | {token-id}* | String | API 인증 토큰 참고 |
| Content-Type* | String | 콘텐츠 유형 기본값: application/json | |
| Body | name* | String | 클러스터 이름 |
| description | String | 클러스터 설명 | |
| version* | String | Redis 버전 | |
| port* | Integer | Redis 포트 번호, 2000 ~ 50000 내 입력 | |
| shardCount* | Integer | 샤드 수 - 복원하려는 백업의 샤드수와 동일한 값 입력 필요 | |
| nodeCountPerShard* | Integer | 샤드당 노드 수 | |
| flavorId* | String | 플레이버 ID | |
| parameterGroupId* | String | 클러스터에 연결할 파라미터 그룹 ID | |
| subnets[]* | Object Array | 배치 가능한 서브넷 목록 | |
| subnets[].id* | String | 서브넷 ID - 서브넷 ID는 콘솔 > VPC > 서브넷에서 확인 | |
| subnetAssignments[]* | Object Array | 서브넷 배치 목록 | |
| subnetAssignments[].primary* | Object | Primary에 배치할 서브넷 | |
| subnetAssignments[].primary.id* | String | Primary에 배치할 서브넷 ID | |
| subnetAssignments[].replicas[]* | Object Array | Replica에 배치할 서브넷 목록 | |
| subnetAssignments[].replicas[].id* | String | Replica에 배치할 서브넷 ID | |
| tlsEnabled | Boolean | TLS 활성화 여부 | |
| restoreSource | Object | 복원 소스 정보 - 소스 정보를 입력하지 않으면 복원이 아닌 신규 클러스터가 생성 | |
| restoreSource.backupNames | String | Redis 백업 목록의 이름 | |
| backupSchedule | Object | 자동 백업 정책, 해당 필드가 없으면 자동 백업 사용하지 않음 | |
| backupSchedule.cron | String | 백업 일정의 크론 표현 시간만 설정 가능, 5자리 크론 표현식 사용 | |
| backupSchedule.retentionLimit | Integer | 백업의 보존 기간(단위: 일) | |
| user | Object | 데이터베이스 사용자 정보 - db 접근 시 계정 정보 | |
| user.name | String | 데이터베이스 사용자 이름 | |
| user.password | String | 데이터베이스 사용자 암호 (암호화된 형태 또는 암호 해시) 데이터베이스 사용자 암호 암호화 방법 | |
| securityGroups[]* | Object Array | 클러스터에 연결할 보안 그룹 목록 | |
| securityGroups[].id* | String | 클러스터에 연결할 보안 그룹 ID - 보안 그룹 ID는 콘솔 > Networking > VPC > 보안 그룹에서 확인 가능 |
기존 백업 이름으로 클러스터 생성 Request Body Example
{
"name": "test-cluster",
"description": "test-cluster",
"version": "6.2.5",
"port": 6379,
"shardCount": 2,
"nodeCountPerShard": 3,
"flavorId": "3830ebad-ea2f-4822-8a7d-9e301c86a58d",
"parameterGroupId": "bbbbcccc-1234-1234-5678-e705e91db2fb",
"subnets": [
{"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
],
"subnetAssignments": [
{
"primary": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"replicas": [
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
]
},
{
"primary": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"replicas": [
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
]
}
],
"user": {
"name": "testuser",
"password": "if2iOwJYiklliJIT8tvqoY~~~~",
},
"tlsEnabled": false,
"restoreSource": {
"backupName": "{restore-source-backup-name-env}"
},
"backupSchedule": {
"cron": "* 1 * * *",
"retentionLimit": 7
},
"securityGroups": [
{"id": "abcdxxxx-4870-4c4e-a267-2de13e38c2ea"},
{"id": "qwergggg-4870-4c4e-a267-2de13e38c2ea"}
]
}
Response
| 상태 코드 | 설명 |
|---|---|
201 | 리소스 생성 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
409 | 현재 서버의 상태에 중복된 요청이 발생한 경우 |
422 | 사용자의 요청 구문은 유효하지만 작업을 진행할 수 없는 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
기존 백업 이름으로 클러스터 생성 Response Example
201 Created
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
클러스터 정보 수정
특정 클러스터의 일부 정보를 변경합니다.
Request
클러스터 정보 수정 Request Syntax
curl -X PATCH "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}" \
-H "accept: application/json" \
-H "X-Auth-Token: {token-id}" \
-d '{
"backupSchedule": {
"cron": "* 3 * * *",
"retentionLimit": 15
},
"description": "modify description",
"parameterGroupId": "bbbbcccc-1234-1234-5678-e705e91db2fb",
"securityGroups": [
{
"id: "ba9a0303-024a-47a4-b1c6-90ada7ca74fb"
}, {
"id: "2133fb76-8dda-492f-afce-9a9bc5f1cb9f"
}
]
}'
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
| Header | {token-id}* | String | API 인증 토큰 참고 |
| Body | backupSchedule | Object | 백업 스케줄 설정 |
| backupSchedule.cron | String | 백업 일정의 크론 표현, 시간만 설정 가능, 5자리 크론 표현식 사용 - cron 값을 ""으로 넘겨주면 백업이 삭제됨 | |
| backupSchedule.retentionLimit | Integer | 백업의 보존 기간(단위: 일) | |
| description | String | 변경할 정보(클러스터 설명) | |
| parameterGroupId | String | 클러스터에 연결할 파라미터 그룹 ID - parameterGroupId 값을 ""으로 수정 불가능 | |
| securityGroups[] | Object Array | 변경할 보안 그룹 ID 목록 | |
| securityGroups[].id | String | 보안 그룹 ID |
클러스터 정보 수정 Request Body Example
{
"backupSchedule": {
"cron": "* 3 * * *",
"retentionLimit": 15
},
"description": "modify description",
"parameterGroupId": "bbbbcccc-1234-1234-5678-e705e91db2fb",
"securityGroups": [
{
"id: "ba9a0303-024a-47a4-b1c6-90ada7ca74fb"
}, {
"id: "2133fb76-8dda-492f-afce-9a9bc5f1cb9f"
}
]
}
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 수정 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
클러스터 정보 수정 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
클러스터 삭제
특정 클러스터를 삭제합니다.
Request
클러스터 삭제 Request Syntax
curl -X DELETE "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}?keepAutomaticBackups={keep-auto-backup}" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
| Query | {keep-auto-backup} | Boolean | 자동 백업 보관 유무 - 자동백업이 생성되어 있는 경우 필수 입력 - true: 해당 클러스터로 만든 자동 백업은 보관되며 지정된 만료일에 삭제- false: 인스턴스 세트와 함께 자동 백업 삭제 |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
클러스터 삭제 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
샤드 추가
특정 클러스터에 샤드를 추가합니다.
Request
샤드 추가 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
| Header | {token-id} | String | API 인증 토큰 참고 |
| Body | nodeCount* | Integer | 샤드에 추가되는 노드 수 |
| subnetAssignments[]* | Object | 서브넷 배치 목록 | |
| subnetAssignments[].primary* | Object | Primary에 배치할 서브넷 | |
| subnetAssignments[].primary.id* | String | Primary에 배치할 서브넷 ID | |
| subnetAssignments[].replicas[]* | Array | Replica에 배치할 서브넷 목록 | |
| subnetAssignments[].replicas[].id* | String | Replica에 배치할 서브넷 ID |
샤드 추가 Request Body Example
{
"nodeCount": 3,
"subnetAssignments": {
"primary": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"replicas": [
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
{"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
]
}
}
Response
| 상태 코드 | 설명 |
|---|---|
201 | 리소스 생성 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
샤드 추가 Response Example
201 Created
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "875bb16f-7347-4d87-a49f-e705e91db2fb"
}
클러스터의 샤드 목록 조회
특정 클러스터의 샤드 목록을 조회합니다.
Request
샤드 목록 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
| Header | {token-id} | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| shards[] | Object Array | 샤드 목록 |
| shards[].id | String | 샤드 ID |
| shards[].name | String | 샤드 이름 |
| shards[].slots | String | 할당된 슬롯 범위 |
| shards[].nodes[] | Object Array | 노드 목록 |
| shards[].nodes[].id | String | 노드 ID |
| shards[].nodes[].name | String | 노드 이름 |
| shards[].nodes[].subnet | Object | 노드에 배치된 서브넷 정보 |
| shards[].nodes[].subnet.id | String | 노드에 배치된 서브넷 ID |
| shards[].nodes[].endpoint | String | 노드 엔드포인트 (프라이빗 IP) |
| shards[].nodes[].role | String | 노드 역할 (primary/replica) |
| shards[].nodes[].status | String | 노드 상태 |
| shards[].nodes[].createdAt | String | 노드 생성 시간 (RFC3339) |
| shards[].status | String | 샤드 상태 |
| shards[].createdAt | String | 샤드 생성 시간 (RFC3339) |
샤드 목록 조회 Response Example
200 OK
content-type: application/json; charset=UTF-8
{
"shards": [
{
"id": "001",
"name": "test-cluster-001",
"slots": "0-8191",
"nodes": [
{
"id": "aaaaaaaa-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-001",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "primary",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "bbbbbbbb-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-002",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "cccccccc-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-003",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
],
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "002",
"name": "test-cluster-002",
"slots": "8192-16383",
"nodes": [
{
"id": "dddddddd-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-002-001",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "primary",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "eeeeeeee-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-002-002",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "ffffffff-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-002-003",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
],
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
]
}
샤드 상세 정보 조회
특정 클러스터의 특정 샤드의 상세 정보를 조회합니다.
Request
샤드 상세 정보 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| id | String | 샤드 ID |
| name | String | 샤드 이름 |
| slots | String | 할당된 슬롯 범위 |
| nodes[] | Object Array | 노드 목록 |
| nodes[].id | String | 노드 ID |
| nodes[].name | String | 노드 이름 |
| nodes[].subnet | Object | 노드에 배치된 서브넷 정보 |
| nodes[].subnet.id | String | 노드에 배치된 서브넷 ID |
| nodes[].endpoint | String | 노드 엔드포인트 (프라이빗 IP) |
| nodes[].role | String | 노드 역할 (primary/replica) |
| nodes[].status | String | 노드 상태 |
| nodes[].createdAt | String | 노드 생성 시간 (RFC3339) |
| status | String | 샤드 상태 |
| createdAt | String | 샤드 생성 시간 (RFC3339) |
샤드 상세 정보 조회 Response Example
200 OK
content-type: application/json; charset=UTF-8
{
"id": "001",
"name": "test-cluster-001",
"slots": "0-8191",
"nodes": [
{
"id": "aaaaaaaa-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-001",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "primary",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "bbbbbbbb-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-002",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "cccccccc-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-003",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
],
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
샤드 삭제
특정 클러스터의 특정 샤드를 삭제합니다.
Request
샤드 삭제 Request Syntax
curl -X DELETE "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
샤드 삭제 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb",
}
샤드에 Replica 추가
특정 클러스터의 특정 샤드에 Replica(복제본)를 추가합니다.
Request
샤드에 Replica 추가 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}/nodes" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
| Body | subnet* | Object | 서브넷 배치 정보 |
| subnet.id* | String | 배치할 서브넷 ID |
샤드에 Replica 추가 Request Body Example
{
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"}
}
Response
| 상태 코드 | 설명 |
|---|---|
201 | 리소스 생성 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
샤드에 Replica 추가 Response Example
201 Created
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
샤드의 인스턴스(노드) 목록 조회
특정 클러스터의 특정 샤드의 인스턴스(node) 목록을 조회합니다.
Request
샤드의 인스턴스(노드) 목록 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}/nodes" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| nodes[] | Object Array | 노드 목록 |
| nodes[].id | String | 노드 ID |
| nodes[].name | String | 노드 이름 |
| nodes[].subnet | Object | 노드에 배치된 서브넷 정보 |
| nodes[].subnet.id | String | 노드에 배치된 서브넷 ID |
| nodes[].endpoint | String | 노드 엔드포인트 (프라이빗 IP) |
| nodes[].role | String | 노드 역할 (primary/replica) |
| nodes[].status | String | 노드 상태 |
| nodes[].createdAt | String | 노드 생성 시간 (RFC3339) |
샤드의 인스턴스(노드) 목록 조회 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"nodes": [
{
"id": "aaaaaaaa-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-001",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "primary",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "bbbbbbbb-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-002",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
},
{
"id": "cccccccc-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-003",
"subnet": {"id": "yyyyyyyy-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "replica",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
]
}
인스턴스(노드)의 상세 정보 조회
특정 클러스터의 특정 샤드의 특정 인스턴스(노드)의 상세 정보를 조회합니다.
Request
인스턴스(노드)의 상세 정보 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}/nodes/{node-id}" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
{node-id}* | String | 노드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| id | String | 노드 ID |
| name | String | 노드 이름 |
| subnet | Object | 노드에 배치된 서브넷 정보 |
| subnet.id | String | 노드에 배치된 서브넷 ID |
| endpoint | String | 노드 엔드포인트 (프라이빗 IP) |
| role | String | 노드 역할 (primary/replica) |
| status | String | 노드 상태 |
| createdAt | String | 노드 생성 시간 (RFC3339) |
인스턴스(노드)의 상세 정보 조회 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"id": "aaaaaaaa-c12e-46f9-81a0-60ab1950a480",
"name": "test-cluster-001-001",
"subnet": {"id": "xxxxxxxx-0a69-4f8b-b56d-59ce12b4d55b"},
"endpoint": "10.184.x.x",
"role": "primary",
"status": "Modifying",
"createdAt": "2024-03-06T02:35:13Z"
}
인스턴스(노드) 삭제
특정 클러스터의 특정 샤드의 특정 인스턴스(노드)를 삭제합니다. 단, Primary 노드는 삭제할 수 없습니다.
Request
인스턴스(노드) 삭제 Request Syntax
curl -X DELETE "https://redis.kr-central-2.kakaocloud.com/v1/clusters/{cluster-id}/shards/{shard-id}/nodes/{node-id}" \
-H "X-Auth-Token: {token-id}"
| 종류 | 파라미터 | 유형 | 설명 |
|---|---|---|---|
| URL | {cluster-id}* | String | 클러스터 ID |
{shard-id}* | String | 샤드 ID | |
{node-id}* | String | 노드 ID | |
| Header | {token-id}* | String | API 인증 토큰 참고 |
Response
| 상태 코드 | 설명 |
|---|---|
200 | 리소스 조회/삭제 요청에 대한 성공 응답 |
400 | 사용자의 요청이 유효하지 않아 작업을 진행할 수 없음 |
401 | 인증되지 않은 사용자가 요청한 경우 |
403 | 권한이 없는 사용자가 요청한 경우 |
404 | 사용자가 요청한 리소스가 존재하지 않은 경우 |
500 | 내부 에러로 작업을 진행할 수 없는 경우 |
| 필드 | 유형 | 설명 |
|---|---|---|
| objectId | String | 클러스터 ID |
인스턴스(노드) 삭제 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb" /* cluster id */
}