Domain name for API request: cls.intl.tencentcloudapi.com.
This API is used to modify logs or metric topics.
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: ModifyTopic. |
| 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 | Topic ID - Obtain the topic Id through Get Topic List. |
| TopicName | No | String | Topic name
|
| Tags.N | No | Array of Tag | List of tag descriptions. By specifying this parameter, you can bind tags to the appropriate topic simultaneously. Supports up to 10 tag key-value pairs, and no duplicate key-value pairs are allowed. |
| Status | No | Boolean | Whether the topic has log collection enabled. true: start collection; false: disable collection. |
| AutoSplit | No | Boolean | Whether to enable auto-split |
| MaxSplitPartitions | No | Integer | If maximum split is enabled, the maximum number of partitions allowed for this topic; |
| Period | No | Integer | Lifecycle in days. Standard storage value range is 1-3600. Infrequent storage value range is 7-3600. A value of 3640 indicates permanent retention. |
| StorageType | No | String | Storage type: cold infrequent storage, hot standard storage |
| Describes | No | String | Topic description |
| HotPeriod | No | Integer | 0: The log topic disables log settlement. |
| IsWebTracking | No | Boolean | Free authentication switch. false: disabled; true: enabled. |
| Extends | No | TopicExtendInfo | Topic extended information |
| PartitionCount | No | Integer | Number of topic partitions.
|
| CancelTopicAsyncTaskID | No | String | id of the cancel switch storage task
|
| Encryption | No | Integer | Encryption-related parameters. Encrypted regions are supported and can be passed for allowlisted users. Cannot be passed in other scenarios. |
| IsSourceFrom | No | Boolean | Enable logging of public network source IP and server receipt time |
| BillingMode | No | Integer | Billing mode Enumeration value:
Default value: 0 |
| 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. |
Modify Log Topic
POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyTopic
<Common request parameters>
{
"TopicId": "866f8a15-ae8e-4ab4-afb2-4ff169fa3dc0",
"TopicName": "testname",
"Period": 10
}
{
"Response": {
"RequestId": "6ef60bec-0242-43af-bb20-270359fb54a7"
}
}
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.InvalidPeriod | The offline storage period cannot be less than 7 days. |
| FailedOperation.TagQpsLimit | The frequency of tag service requests is limited. |
| FailedOperation.TopicClosed | The log topic has been disabled. |
| FailedOperation.TopicIsolated | The log topic has been isolated. |
| InternalError | Internal error. |
| InvalidParameter | Incorrect parameter. |
| InvalidParameter.TopicConflict | There is already a log topic with the same name in the specified logset. |
| LimitExceeded | The quota limit has been reached. |
| OperationDenied | Operation denied. |
| OperationDenied.ACLFailed | ACL verification failed. |
| OperationDenied.AccountDestroy | The account has been terminated. |
| OperationDenied.AccountIsolate | The account has overdue payments. |
| OperationDenied.AccountNotExists | The account does not exist. |
| OperationDenied.TopicHasScheduleSqlTask | The topic is bound to the scheduleSql job. |
| ResourceNotFound | The resource does not exist. |
| ResourceNotFound.TopicNotExist | The log topic does not exist. |
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