Domain name for API request: redis.intl.tencentcloudapi.com.
This API is used to enable or disable the shipping of instance logs to CLS.
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: ModifyInstanceLogDelivery. |
Version | Yes | String | Common Params. The value used for this API: 2018-04-12. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
InstanceId | Yes | String | Instance ID. Log in to the Redis console and copy it in the instance list. |
LogType | Yes | String | Log type. Currently, only slowlog is supported, indicating the slow query log. |
Enabled | Yes | Boolean | Whether log shopping is enabled. - true: enabled. - false: disabled. |
LogsetId | No | String | ID of the shipped logset, which can be obtained through the sub-parameter LogsetId of the response parameter SlowLog of the API DescribeInstanceLogDelivery. |
TopicId | No | String | ID of the shipped log topic, which can be obtained through the sub-parameter TopicId of the response parameter SlowLog of the API DescribeInstanceLogDelivery. |
LogsetName | No | String | Logset name. If LogsetId is not specified, this parameter needs to be configured and the system will automatically create a logset with the specified name. |
TopicName | No | String | Log topic name. This parameter is required when TopicId is empty, and the system will automatically create a log topic. |
LogRegion | No | String | Region where the logset is located. If it is not provided, the region where the instance is located will be used by default. |
Period | No | Integer | Log storage duration. Default value: 30 days. Value range: 1 to 3600 days. |
CreateIndex | No | Boolean | Whether to create an index when creating a log topic. |
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. |
This example shows you how to enable instance log shipping and use the created logset and log topic.
POST / HTTP/1.1
Host: redis.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyInstanceLogDelivery
<Common request parameters>
{
"InstanceId": "crs-ib4uuh7x",
"LogType": "slowlog",
"Enabled": true,
"LogsetName": "test-logset-name",
"TopicName": "test-topic-name",
"CreateIndex": true
}
{
"Response": {
"RequestId": "ac46037a-57a0-4fe2-a99d-93c10ef20883"
}
}
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 |
---|---|
InternalError.InternalError | Internal error. |
InvalidParameter.InvalidParameter | Invalid service parameter. |
InvalidParameter.NotSupported | The operation is unsupported due to incorrect parameters. |
ResourceNotFound.InstanceNotExists | No Redis instance is found by the serialId. |
Was this page helpful?