본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Get Snapshot Repository API

원문 보기 위키 갱신

스냅샷 저장소에 대한 정보를 검색해요.

저장소에 대해 더 알아보려면 Register repository를 참고하세요.

스냅샷 생성 중이나 생성 후에도 스냅샷에 대한 세부 정보를 얻을 수 있어요. Get snapshot status를 참고하세요.

출처: OpenSearch 문서

본문

엔드포인트 (Endpoints)

GET /_snapshot/{repository}

경로 매개변수 (Path parameters)

| Parameter | Data type | Description | | repository | String | A comma-separated list of snapshot repository names to retrieve. Wildcard (*) expressions are supported including combining wildcards with exclude patterns starting with -. |

쿼리 매개변수 (Query parameters)

| Parameter | Data type | Description | | local | Boolean | Whether to get information from the local node. Optional, defaults to false. | | cluster_manager_timeout | Time | Amount of time to wait for a connection to the cluster manager node. Optional, defaults to 30 seconds. |

예제 요청 (Example request)

다음 요청은 my-opensearch-repo 저장소에 대한 정보를 검색해요.

GET /_snapshot/my-opensearch-repo
response = client.snapshot.get_repository(
repository = "my-opensearch-repo"
)

예제 응답 (Example response)

성공하면 응답은 저장소 정보를 반환해요. 이 샘플은 s3 저장소 유형에 대한 것이에요.

{
"my-opensearch-repo" : {
"type" : "s3",
"settings" : {
"bucket" : "my-open-search-bucket",
"base_path" : "snapshots"
}
}
}

응답 본문 필드 (Response body fields)

| Field | Data type | Description | | type | String | Bucket type: fs (file system) or s3 (s3 bucket) | | bucket | String | S3 bucket name. | | base_path | String | Folder within the bucket where snapshots are stored. |

필요한 권한 (Required permissions)

Security 플러그인을 사용한다면 적절한 권한을 확인하세요: cluster:admin/repository/get

더 알아보기 (Learn more)