All Products
Search
Document Center

OpenSearch:ModifyClusterOfflineConfig

Last Updated:Oct 16, 2024

Modifies the configuration information of a cluster.

Operation description

Request syntax

PUT /openapi/ha3/instances/{instanceId}/cluster-offline-config

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
searchengine:ModifyClusterOfflineConfigupdate
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

PUT /openapi/ha3/instances/{instanceId}/cluster-offline-config HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-7mz2oy0bg01
bodyobjectNo

The request body.

dataSourceNamestringNo

The name of the data source.

test1
dataSourceTypestringNo

The type of the data source. Valid values: odps: MaxCompute. swift: Swift. unKnow: unknown type.

maxComputer
domainstringNo

The data center in which the data source is deployed.

vpc_hz_domain_1
configobjectNo

The configuration name, which is stored as a key.

integerNo

The configuration version, which is stored as a value.

1
partitionstringNo

This parameter is required when index building for full data in a MaxCompute data source is triggered.

20211202
dataTimeSecintegerNo

This parameter is required when index building by using API data sources is triggered.

1640867288
buildModestringNo

The reindexing method. Valid values: api: API data source. indexRecover: data recovery by using indexing.

indexRecover
generationlongNo

The ID of the full index version.

160142641
pushModestringNo

The push mode of the configuration. By default, only the configuration is pushed.

PUSH_ONLY
ParameterRequiredTypeDescription
dataSourceYesStringThe name of the data source.
domainYesStringThe domain where the data source is deployed.
indexesYesObjectThe description of the index structure.
advancedConfigVersionIdYesIntegerThe ID of the advanced configuration version.
triggerBuildYesbooleanIf this parameter is set to true, the configuration is pushed and reindexing is triggered. If this parameter is set to false, the configuration takes effect after the next reindexing.
buildModeNoIntegerThe mode of reindexing. api indicates the default mode, and indexRecover indicates that the data source is restored by using the index. This parameter is required only when the data source is of the HDFS type.
generationNoLongThe data restoration version.
partitionNoStringThe data partition of the data source selected for reindexing. This parameter is required when reindexing is triggered for the odps data source.
dataTimeSecNoIntegerThe time when reindexing is triggered for the API-pushed data source. The value of this parameter must be accurate to the second. This parameter is required when reindexing is triggered for the API-pushed data source.
dataSourceTypeNoEnumThis parameter is required when the triggerBuild parameter is set to true. Valid values: odps and swift.

Sample requests

PUT /openapi/ha3/instances/ha3_instance_name/cluster-offline-config

{
    "dataSource": "test1",
    "domain": "xx",
    "indexes": [
        {
            "name": "index1",
            "versionId": 1
        },
        {
            "name": "index2",
            "versionId": 1
        }
    ],
    "advancedConfigVersionId": 2,
    "triggerBuild": true,
    "partition": "20201010", // This parameter is required when reindexing is triggered for the odps data source.
    "dataSourceType": "odps", // This parameter is required. Set this parameter to odps or swift. An error message is returned if you do not set this parameter.
    "dataTimeSec": 1640867288 // This parameter specifies the time when reindexing is triggered for the API-pushed data source. The value of this parameter must be accurate to the second. This parameter is required when reindexing is triggered for the API-pushed data source.
  
}

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The ID of the request

E7B7D598-B080-5C8E-AA35-D43EC0D5F886
resultobject

The result

{}

Examples

Sample success responses

JSONformat

{
  "requestId": "E7B7D598-B080-5C8E-AA35-D43EC0D5F886",
  "result": {}
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-05-16The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-09-07The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-01-12Add OperationView Change Details