published on Monday, May 11, 2026 by tencentcloudstack
published on Monday, May 11, 2026 by tencentcloudstack
Provides a resource to manage Redis audit log configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.RedisAuditLog("example", {
instanceId: "crs-6eqwe3lt",
logSubType: "all",
logExpireDay: 7,
highLogExpireDay: 7,
degradeStrategy: 500,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.RedisAuditLog("example",
instance_id="crs-6eqwe3lt",
log_sub_type="all",
log_expire_day=7,
high_log_expire_day=7,
degrade_strategy=500)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewRedisAuditLog(ctx, "example", &tencentcloud.RedisAuditLogArgs{
InstanceId: pulumi.String("crs-6eqwe3lt"),
LogSubType: pulumi.String("all"),
LogExpireDay: pulumi.Float64(7),
HighLogExpireDay: pulumi.Float64(7),
DegradeStrategy: pulumi.Float64(500),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.RedisAuditLog("example", new()
{
InstanceId = "crs-6eqwe3lt",
LogSubType = "all",
LogExpireDay = 7,
HighLogExpireDay = 7,
DegradeStrategy = 500,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.RedisAuditLog;
import com.pulumi.tencentcloud.RedisAuditLogArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new RedisAuditLog("example", RedisAuditLogArgs.builder()
.instanceId("crs-6eqwe3lt")
.logSubType("all")
.logExpireDay(7.0)
.highLogExpireDay(7.0)
.degradeStrategy(500.0)
.build());
}
}
resources:
example:
type: tencentcloud:RedisAuditLog
properties:
instanceId: crs-6eqwe3lt
logSubType: all
logExpireDay: 7
highLogExpireDay: 7
degradeStrategy: 500
Example coming soon!
Create RedisAuditLog Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RedisAuditLog(name: string, args: RedisAuditLogArgs, opts?: CustomResourceOptions);@overload
def RedisAuditLog(resource_name: str,
args: RedisAuditLogArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RedisAuditLog(resource_name: str,
opts: Optional[ResourceOptions] = None,
high_log_expire_day: Optional[float] = None,
instance_id: Optional[str] = None,
log_expire_day: Optional[float] = None,
log_sub_type: Optional[str] = None,
degrade_strategy: Optional[float] = None,
redis_audit_log_id: Optional[str] = None)func NewRedisAuditLog(ctx *Context, name string, args RedisAuditLogArgs, opts ...ResourceOption) (*RedisAuditLog, error)public RedisAuditLog(string name, RedisAuditLogArgs args, CustomResourceOptions? opts = null)
public RedisAuditLog(String name, RedisAuditLogArgs args)
public RedisAuditLog(String name, RedisAuditLogArgs args, CustomResourceOptions options)
type: tencentcloud:RedisAuditLog
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_redisauditlog" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RedisAuditLogArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RedisAuditLogArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RedisAuditLogArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RedisAuditLogArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RedisAuditLogArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
RedisAuditLog Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RedisAuditLog resource accepts the following input properties:
- High
Log doubleExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - Instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- Log
Expire doubleDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - Log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - Degrade
Strategy double - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - Redis
Audit stringLog Id - ID of the resource.
- High
Log float64Expire Day - High-frequency log retention period in days. Valid values:
7(7 days). - Instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- Log
Expire float64Day - Log retention period in days. Valid values:
7(7 days),30(30 days). - Log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - Degrade
Strategy float64 - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - Redis
Audit stringLog Id - ID of the resource.
- high_
log_ numberexpire_ day - High-frequency log retention period in days. Valid values:
7(7 days). - instance_
id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log_
expire_ numberday - Log retention period in days. Valid values:
7(7 days),30(30 days). - log_
sub_ stringtype - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - degrade_
strategy number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - redis_
audit_ stringlog_ id - ID of the resource.
- high
Log DoubleExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id String - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire DoubleDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub StringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - degrade
Strategy Double - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - redis
Audit StringLog Id - ID of the resource.
- high
Log numberExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire numberDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - degrade
Strategy number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - redis
Audit stringLog Id - ID of the resource.
- high_
log_ floatexpire_ day - High-frequency log retention period in days. Valid values:
7(7 days). - instance_
id str - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log_
expire_ floatday - Log retention period in days. Valid values:
7(7 days),30(30 days). - log_
sub_ strtype - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - degrade_
strategy float - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - redis_
audit_ strlog_ id - ID of the resource.
- high
Log NumberExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id String - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire NumberDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub StringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - degrade
Strategy Number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - redis
Audit StringLog Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RedisAuditLog resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RedisAuditLog Resource
Get an existing RedisAuditLog resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RedisAuditLogState, opts?: CustomResourceOptions): RedisAuditLog@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
degrade_strategy: Optional[float] = None,
high_log_expire_day: Optional[float] = None,
instance_id: Optional[str] = None,
log_expire_day: Optional[float] = None,
log_sub_type: Optional[str] = None,
redis_audit_log_id: Optional[str] = None) -> RedisAuditLogfunc GetRedisAuditLog(ctx *Context, name string, id IDInput, state *RedisAuditLogState, opts ...ResourceOption) (*RedisAuditLog, error)public static RedisAuditLog Get(string name, Input<string> id, RedisAuditLogState? state, CustomResourceOptions? opts = null)public static RedisAuditLog get(String name, Output<String> id, RedisAuditLogState state, CustomResourceOptions options)resources: _: type: tencentcloud:RedisAuditLog get: id: ${id}import {
to = tencentcloud_redisauditlog.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Degrade
Strategy double - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - High
Log doubleExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - Instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- Log
Expire doubleDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - Log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - Redis
Audit stringLog Id - ID of the resource.
- Degrade
Strategy float64 - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - High
Log float64Expire Day - High-frequency log retention period in days. Valid values:
7(7 days). - Instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- Log
Expire float64Day - Log retention period in days. Valid values:
7(7 days),30(30 days). - Log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - Redis
Audit stringLog Id - ID of the resource.
- degrade_
strategy number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - high_
log_ numberexpire_ day - High-frequency log retention period in days. Valid values:
7(7 days). - instance_
id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log_
expire_ numberday - Log retention period in days. Valid values:
7(7 days),30(30 days). - log_
sub_ stringtype - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - redis_
audit_ stringlog_ id - ID of the resource.
- degrade
Strategy Double - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - high
Log DoubleExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id String - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire DoubleDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub StringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - redis
Audit StringLog Id - ID of the resource.
- degrade
Strategy number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - high
Log numberExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id string - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire numberDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub stringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - redis
Audit stringLog Id - ID of the resource.
- degrade_
strategy float - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - high_
log_ floatexpire_ day - High-frequency log retention period in days. Valid values:
7(7 days). - instance_
id str - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log_
expire_ floatday - Log retention period in days. Valid values:
7(7 days),30(30 days). - log_
sub_ strtype - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - redis_
audit_ strlog_ id - ID of the resource.
- degrade
Strategy Number - Degradation strategy threshold in milliseconds. When the instance P99 latency reaches this threshold, audit logs will be automatically discarded to ensure business availability. Value range: [300, 1000]. Default value:
500. - high
Log NumberExpire Day - High-frequency log retention period in days. Valid values:
7(7 days). - instance
Id String - Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
- log
Expire NumberDay - Log retention period in days. Valid values:
7(7 days),30(30 days). - log
Sub StringType - Log sub-type. Valid values:
write(write commands),read(read commands),all(read and write commands). - redis
Audit StringLog Id - ID of the resource.
Import
Redis audit log can be imported using the instance id, e.g.
$ pulumi import tencentcloud:index/redisAuditLog:RedisAuditLog example crs-6eqwe3lt
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Monday, May 11, 2026 by tencentcloudstack
