Domain name for API request: cls.intl.tencentcloudapi.com.
This API is used to create an index.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateIndex. |
| Version | Yes | String | Common Params. The value used for this API: 2020-10-16. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| TopicId | Yes | String | Log topic Id. -Obtain the log topic Id through Get Log Topic List. |
| Rule | Yes | RuleInfo | Index rule |
| Status | No | Boolean | Whether to take effect. Default value: true |
| IncludeInternalFields | No | Boolean | Whether full-text indexing includes internal fields (__FILENAME__, __HOSTNAME__, and __SOURCE__). Default value: false. Recommended value: true.* false: Full-text indexing does not include internal fields.* true: Full-text indexing includes internal fields. |
| MetadataFlag | No | Integer | Whether full-text indexing includes metadata fields (which are prefixed with __TAG__). Default value: 0. Recommended value: 1.* 0: Full-text indexing includes only the metadata fields with key-value indexing enabled.* 1: Full-text indexing includes all metadata fields.* 2: Full-text indexing does not include metadata fields. |
| CoverageField | No | String | Custom log parsing exception storage fields |
| Parameter Name | Type | Description |
|---|---|---|
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateIndex
<Common request parameters>
{
"TopicId": "75f531f6-3644-45e5-8717-af1dc294cc93",
"Status": true,
"Rule": {
"FullText": {
"CaseSensitive": true,
"Tokenizer": "@&?|#()='\",;:<>[]{}/ \n\t\r\\"
},
"KeyValue": {
"CaseSensitive": true,
"KeyValues": [
{
"Key": "age",
"Value": {
"Type": "long",
"Tokenizer": "",
"SqlFlag": false
}
}
]
},
"Tag": {
"CaseSensitive": true,
"KeyValues": [
{
"Key": "tag",
"Value": {
"Type": "text",
"Tokenizer": "@&?|#()='\",;:<>[]{}/ \n\t\r\\",
"SqlFlag": false
}
}
]
}
}
}
{
"Response": {
"RequestId": "8d3c9e9e-0c2f-4d9a-bb17-71e4f42f89fd"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InValidIndexRuleForSearchLow | IA storage does not support key-value or tag index configuration. |
| FailedOperation.Timeout | Operation timed out |
| FailedOperation.TopicIsolated | The log topic has been isolated. |
| InternalError | Internal error. |
| InvalidParameter | Incorrect parameter. |
| InvalidParameter.InValidIndexRuleForSearchLow | IA storage does not support key-value or tag index configuration. |
| InvalidParameter.IndexConflict | An index rule already exists for the specified log topic. |
| LimitExceeded | The quota limit has been reached. |
| LimitExceeded.IndexKeyOverLimit | The number of key-value indices exceeds the limit |
| LimitExceeded.IndexOperating | Index operations exceed the frequency limit. |
| MissingParameter | Missing parameter. |
| OperationDenied | Operation denied. |
| OperationDenied.AccountDestroy | The account has been terminated. |
| OperationDenied.AccountIsolate | The account has overdue payments. |
| OperationDenied.AccountNotExists | The account does not exist. |
| ResourceNotFound.IndexNotExist | The index does not exist. |
| ResourceNotFound.TopicNotExist | The log topic does not exist. |
| UnsupportedOperation | Unsupported operation. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback