Modifies the configuration information of a cluster.
Operation description
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
searchengine:ModifyClusterOfflineConfig | update |
|
| none |
Request syntax
PUT /openapi/ha3/instances/{instanceId}/cluster-offline-config HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
instanceId | string | Yes | The instance ID. | ha-cn-7mz2oy0bg01 |
body | object | No | The request body. | |
dataSourceName | string | No | The name of the data source. | test1 |
dataSourceType | string | No | The type of the data source. Valid values: odps: MaxCompute. swift: Swift. unKnow: unknown type. | maxComputer |
domain | string | No | The data center in which the data source is deployed. | vpc_hz_domain_1 |
config | object | No | The configuration name, which is stored as a key. | |
integer | No | The configuration version, which is stored as a value. | 1 | |
partition | string | No | This parameter is required when index building for full data in a MaxCompute data source is triggered. | 20211202 |
dataTimeSec | integer | No | This parameter is required when index building by using API data sources is triggered. | 1640867288 |
buildMode | string | No | The reindexing method. Valid values: api: API data source. indexRecover: data recovery by using indexing. | indexRecover |
generation | long | No | The ID of the full index version. | 160142641 |
pushMode | string | No | The push mode of the configuration. By default, only the configuration is pushed. | PUSH_ONLY |
Parameter | Required | Type | Description |
---|---|---|---|
dataSource | Yes | String | The name of the data source. |
domain | Yes | String | The domain where the data source is deployed. |
indexes | Yes | Object | The description of the index structure. |
advancedConfigVersionId | Yes | Integer | The ID of the advanced configuration version. |
triggerBuild | Yes | boolean | If 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. |
buildMode | No | Integer | The 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. |
generation | No | Long | The data restoration version. |
partition | No | String | The data partition of the data source selected for reindexing. This parameter is required when reindexing is triggered for the odps data source. |
dataTimeSec | No | Integer | 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. |
dataSourceType | No | Enum | This 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
Examples
Sample success responses
JSON
format
{
"requestId": "E7B7D598-B080-5C8E-AA35-D43EC0D5F886",
"result": {}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-16 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-09-07 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-01-12 | Add Operation | View Change Details |