1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. RedisAuditLog
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.82.93
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:

    HighLogExpireDay double
    High-frequency log retention period in days. Valid values: 7 (7 days).
    InstanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    LogExpireDay double
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    LogSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    DegradeStrategy 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.
    RedisAuditLogId string
    ID of the resource.
    HighLogExpireDay float64
    High-frequency log retention period in days. Valid values: 7 (7 days).
    InstanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    LogExpireDay float64
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    LogSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    DegradeStrategy 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.
    RedisAuditLogId string
    ID of the resource.
    high_log_expire_day number
    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_day number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    log_sub_type string
    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_log_id string
    ID of the resource.
    highLogExpireDay Double
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId String
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay Double
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType String
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    degradeStrategy 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.
    redisAuditLogId String
    ID of the resource.
    highLogExpireDay number
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    degradeStrategy 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.
    redisAuditLogId string
    ID of the resource.
    high_log_expire_day float
    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_day float
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    log_sub_type str
    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_log_id str
    ID of the resource.
    highLogExpireDay Number
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId String
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay Number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType String
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    degradeStrategy 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.
    redisAuditLogId String
    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) -> RedisAuditLog
    func 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.
    The following state arguments are supported:
    DegradeStrategy 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.
    HighLogExpireDay double
    High-frequency log retention period in days. Valid values: 7 (7 days).
    InstanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    LogExpireDay double
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    LogSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    RedisAuditLogId string
    ID of the resource.
    DegradeStrategy 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.
    HighLogExpireDay float64
    High-frequency log retention period in days. Valid values: 7 (7 days).
    InstanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    LogExpireDay float64
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    LogSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    RedisAuditLogId string
    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_expire_day number
    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_day number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    log_sub_type string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    redis_audit_log_id string
    ID of the resource.
    degradeStrategy 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.
    highLogExpireDay Double
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId String
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay Double
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType String
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    redisAuditLogId String
    ID of the resource.
    degradeStrategy 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.
    highLogExpireDay number
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId string
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType string
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    redisAuditLogId string
    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_expire_day float
    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_day float
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    log_sub_type str
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    redis_audit_log_id str
    ID of the resource.
    degradeStrategy 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.
    highLogExpireDay Number
    High-frequency log retention period in days. Valid values: 7 (7 days).
    instanceId String
    Instance ID, such as: crs-xjhsdj****, which can be copied from the instance list in the Redis console.
    logExpireDay Number
    Log retention period in days. Valid values: 7 (7 days), 30 (30 days).
    logSubType String
    Log sub-type. Valid values: write (write commands), read (read commands), all (read and write commands).
    redisAuditLogId String
    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 tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.82.93
    published on Monday, May 11, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.