Triggers reindexing.
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:BuildIndex | update |
|
| none |
Request syntax
POST /openapi/ha3/instances/{instanceId}/actions/build-index HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
instanceId | string | Yes | The instance ID. | ha-cn-7mz2iv7sq01 |
body | object | No | The request body, which is a JSON string. For more information, see the following parameters. | |
dataSourceName | string | No | The name of the data source. | my_data_source |
domain | string | No | The data center in which the data source is deployed. | test |
dataSourceType | string | No | The type of the data source. | swift |
partition | string | No | The partition in the MaxCompute table. This parameter is required if type is set to odps. | 20201010 |
dataTimeSec | integer | No | The timestamp in seconds. The value must be of the INTEGER type. This parameter is required if you specify an API data source. | 1640867288 |
buildMode | string | No | The reindexing method. Valid values: api: API data source. indexRecover: data recovery by using indexing. | indexRecover |
generation | long | No | The data restoration version. | 160131146 |
Sample requests
POST /openapi/ha3/instances/ha3_instance_name/actions/build-index
{
"dataSourceName": "my_data_source",
"domain": "test", // Specifies where the data source is deployed.
"indexes": [
"index1",
"index2"
],
"dataSourceType": "odps", // Set this parameter to odps or swift. This parameter is required.
"partition": "20201010", // This parameter is required for the odps data source.
"dataTimeSec": 1640867288 // The timestamp in seconds. It is of the INT type. This parameter is required for the API-pushed data source.
}
{
"dataSourceName": "my_data_source",
"domain": "test", // Specifies where the data source is deployed.
"indexes": [
"index1",
"index2"
],
"dataSourceType": "swift", // Set this parameter to odps or swift. This parameter is required.
"partition": "20201010", // This parameter is required for the odps data source.
"dataTimeSec": 1640867288 // The timestamp in seconds. It is of the INT type. This parameter is required for the API-pushed data source.
}
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "407BFD91-DE7D-50BA-8F88-CDE52A3B5E46",
"result": {}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-01-12 | Add Operation | View Change Details |