Help Center/ Cloud Search Service/ API Reference/ APIs/ Snapshot Management/ Modifying Basic Configurations of a Cluster Snapshot

Modifying Basic Configurations of a Cluster Snapshot

Updated on 2025-05-22 GMT+08:00

Function

This API is used to modify the basic configurations for a cluster snapshot, including OBS buckets and IAM agency.

You can also use this API to enable the snapshot function.

URI

POST /v1.0/{project_id}/clusters/{cluster_id}/index_snapshot/setting

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

cluster_id

Yes

String

ID of the cluster whose snapshot basic configuration you want to modify.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

bucket

Yes

String

Name of the OBS bucket used for backup.

agency

Yes

String

Agency name. You can create an agency to allow CSS to call other cloud services. The value can contain only letters (a-z and A-Z), digits (0-9), hyphens (-), and underscores (_). It cannot contain Chinese characters or other special characters.

basePath

No

String

Storage path of the snapshot in the OBS bucket.

The backup path cannot contain the following characters: \:*?"<>|'{}. Additionally, it cannot:

Start with a slash (/).

Start or end with a period (.).

Contain more than two consecutive slashes (/) or periods (.).

Exceed 512 characters.

maxSnapshotBytesPerSeconds

No

String

Maximum recovery speed (per second). Parameter description: This parameter sets the maximum recovery speed per node. When it is exceeded, flow control is triggered to prevent excessive resource usage and ensure system stability. The actual recovery speed may not reach the configured value, as it depends on many factors, such as OBS performance and disk I/O.

Constraints: For OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter. If Maximum recovery speed (per second) is lower than indices.recovery.max_bytes_per_sec, flow control is triggered when the former is reached. If Maximum recovery speed (per second) is higher than indices.recovery.max_bytes_per_sec, flow control is triggered when the latter is reached.

The following values and formats are allowed:

Format 1: a number followed by a unit

The number ranges from 0 to 9999. The unit can be k, kb, m, mb, g, gb, t, tb, p, pb, or b (case-insensitive). 0mb means there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Format 2: 0, indicating there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Format 3: -1, indicating there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Default: For Elasticsearch clusters of 7.6.2 or earlier, the default setting is 40mb. For OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the default setting is no limit, but the recovery speed is still limited by the indices.recovery.max_bytes_per_sec parameter. If this parameter is left blank, the default setting is used.

maxRestoreBytesPerSeconds

No

String

Maximum recovery speed (per second). Parameter description:

This parameter sets the maximum recovery speed per node. When it is exceeded, flow control is triggered to prevent excessive resource usage and ensure system stability. The actual recovery speed may not reach the configured value, as it depends on many factors, such as OBS performance and disk I/O.

Constraints:

For OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter. If Maximum recovery speed (per second) is lower than indices.recovery.max_bytes_per_sec, flow control is triggered when the former is reached. If Maximum recovery speed (per second) is higher than indices.recovery.max_bytes_per_sec, flow control is triggered when the latter is reached.

Value:

The following values and formats are allowed:

Format 1: a number followed by a unit

The number ranges from 0 to 9999. The unit can be k, kb, m, mb, g, gb, t, tb, p, pb, or b (case-insensitive). 0mb means there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Format 2: 0, indicating there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Format 3: -1, indicating there is no speed limit. (However, for OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the recovery speed is also limited by the indices.recovery.max_bytes_per_sec parameter.) An overly high recovery speed may lead to excessive resource usage, which may impact system stability. Therefore, set this parameter carefully.

Default:

For Elasticsearch clusters of 7.6.2 or earlier, the default setting is 40mb. For OpenSearch clusters and Elasticsearch clusters later than 7.6.2, the default setting is no limit, but the recovery speed is still limited by the indices.recovery.max_bytes_per_sec parameter. If this parameter is left blank, the default setting is used.

Response Parameters

None

Example Requests

Enable the snapshot function.

POST /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/index_snapshot/setting

{
  "bucket" : "test-bucket",
  "agency" : "usearch",
  "basePath" : "css_repository/Es-name",
  "maxSnapshotBytesPerSeconds" : 0,
  "maxRestoreBytesPerSeconds" : 0
}

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

406

The server could not fulfill the request according to the content characteristics of the request.

412

The server did not meet one of the preconditions contained in the request.

504

A gateway timeout error occurred.

Error Codes

See Error Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback