From e2a1d02a99f206f8042d5e44d4f88d883005db5f Mon Sep 17 00:00:00 2001 From: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:46:32 -0500 Subject: [PATCH] Update create-repository.md --- _api-reference/snapshots/create-repository.md | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/_api-reference/snapshots/create-repository.md b/_api-reference/snapshots/create-repository.md index 63740e36d0..5f421218e6 100644 --- a/_api-reference/snapshots/create-repository.md +++ b/_api-reference/snapshots/create-repository.md @@ -30,16 +30,19 @@ PUT /_snapshot/my-first-repo/ Parameter | Data type | Description :--- | :--- | :--- -repository | String | Repository name | +`repository` | String | Repository name | ## Request parameters Request parameters depend on the type of repository: `fs` or `s3`. -### common parameters +### Common parameters + +The following table lists parameters that can be used with both the `fs` and `s3` repositories. + Request field | Description :--- | :--- -`prefix_mode_verification` | When enabled, it will add hashed value of a random seed to the prefix for repository verification. For remote store enabled clusters, a user can add `setting.prefix_mode_verification` to the node attributes for the supplied repository. This will also work for existing repository when supplied. Optional. +`prefix_mode_verification` | When enabled, adds a hashed value of a random seed to the prefix for repository verification. For remote store enabled clusters, you can add the `setting.prefix_mode_verification` setting to the node attributes for the supplied repository. This field works with both existing and new repositories. Optional. ### fs repository @@ -53,20 +56,6 @@ Request field | Description `remote_store_index_shallow_copy` | Boolean | Determines whether the snapshot of the remote store indexes are captured as a shallow copy. Default is `false`. `readonly` | Whether the repository is read-only. Useful when migrating from one cluster (`"readonly": false` when registering) to another cluster (`"readonly": true` when registering). Optional. -## Example request - -The following example registers an `fs` repository using the local directory `/mnt/snapshots` as `location`. - -```json -PUT /_snapshot/my-fs-repository -{ - "type": "fs", - "settings": { - "location": "/mnt/snapshots" - } -} -``` -{% include copy-curl.html %} #### s3 repository @@ -90,7 +79,25 @@ Request field | Description For the `base_path` parameter, do not enter the `s3://` prefix when entering your S3 bucket details. Only the name of the bucket is required. {: .note} -## Example request +## Example requests + +### `fs` + +The following example registers an `fs` repository using the local directory `/mnt/snapshots` as `location`. + +```json +PUT /_snapshot/my-fs-repository +{ + "type": "fs", + "settings": { + "location": "/mnt/snapshots" + } +} +``` +{% include copy-curl.html %} + +### `s3` + The following request registers a new S3 repository called `my-opensearch-repo` in an existing bucket called `my-open-search-bucket`. By default, all snapshots are stored in the `my/snapshot/directory`.