1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. RedisLogDelivery
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.RedisLogDelivery

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create Redis instance log delivery land set its attributes.

    NOTE: When you use an existing cls logset and topic to enable logging, there is no need to set parameters such as period, create_index, log_region, etc.

    Example Usage

    Use cls logset and topic which existed

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.RedisLogDelivery("example", {
        instanceId: "crs-dmjj8en7",
        logsetId: "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
        topicId: "5c2333e9-0bab-41fd-9f75-c602b3f9545f",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.RedisLogDelivery("example",
        instance_id="crs-dmjj8en7",
        logset_id="cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
        topic_id="5c2333e9-0bab-41fd-9f75-c602b3f9545f")
    
    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.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
    			InstanceId: pulumi.String("crs-dmjj8en7"),
    			LogsetId:   pulumi.String("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c"),
    			TopicId:    pulumi.String("5c2333e9-0bab-41fd-9f75-c602b3f9545f"),
    		})
    		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.RedisLogDelivery("example", new()
        {
            InstanceId = "crs-dmjj8en7",
            LogsetId = "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
            TopicId = "5c2333e9-0bab-41fd-9f75-c602b3f9545f",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.RedisLogDelivery;
    import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
    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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
                .instanceId("crs-dmjj8en7")
                .logsetId("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c")
                .topicId("5c2333e9-0bab-41fd-9f75-c602b3f9545f")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:RedisLogDelivery
        properties:
          instanceId: crs-dmjj8en7
          logsetId: cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c
          topicId: 5c2333e9-0bab-41fd-9f75-c602b3f9545f
    

    Use exist cls logset and create new topic

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.RedisLogDelivery("example", {
        createIndex: true,
        instanceId: "crs-dmjj8en7",
        logsetId: "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
        period: 20,
        topicName: "tf-example",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.RedisLogDelivery("example",
        create_index=True,
        instance_id="crs-dmjj8en7",
        logset_id="cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
        period=20,
        topic_name="tf-example")
    
    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.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
    			CreateIndex: pulumi.Bool(true),
    			InstanceId:  pulumi.String("crs-dmjj8en7"),
    			LogsetId:    pulumi.String("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c"),
    			Period:      pulumi.Float64(20),
    			TopicName:   pulumi.String("tf-example"),
    		})
    		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.RedisLogDelivery("example", new()
        {
            CreateIndex = true,
            InstanceId = "crs-dmjj8en7",
            LogsetId = "cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c",
            Period = 20,
            TopicName = "tf-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.RedisLogDelivery;
    import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
    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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
                .createIndex(true)
                .instanceId("crs-dmjj8en7")
                .logsetId("cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c")
                .period(20)
                .topicName("tf-example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:RedisLogDelivery
        properties:
          createIndex: true
          instanceId: crs-dmjj8en7
          logsetId: cc31d9d6-74c0-4888-8b2f-b8148c3bcc5c
          period: 20
          topicName: tf-example
    

    Create new cls logset and topic

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.RedisLogDelivery("example", {
        createIndex: true,
        instanceId: "crs-dmjj8en7",
        logRegion: "ap-guangzhou",
        logsetName: "tf-example",
        period: 20,
        topicName: "tf-example",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.RedisLogDelivery("example",
        create_index=True,
        instance_id="crs-dmjj8en7",
        log_region="ap-guangzhou",
        logset_name="tf-example",
        period=20,
        topic_name="tf-example")
    
    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.NewRedisLogDelivery(ctx, "example", &tencentcloud.RedisLogDeliveryArgs{
    			CreateIndex: pulumi.Bool(true),
    			InstanceId:  pulumi.String("crs-dmjj8en7"),
    			LogRegion:   pulumi.String("ap-guangzhou"),
    			LogsetName:  pulumi.String("tf-example"),
    			Period:      pulumi.Float64(20),
    			TopicName:   pulumi.String("tf-example"),
    		})
    		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.RedisLogDelivery("example", new()
        {
            CreateIndex = true,
            InstanceId = "crs-dmjj8en7",
            LogRegion = "ap-guangzhou",
            LogsetName = "tf-example",
            Period = 20,
            TopicName = "tf-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.RedisLogDelivery;
    import com.pulumi.tencentcloud.RedisLogDeliveryArgs;
    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 RedisLogDelivery("example", RedisLogDeliveryArgs.builder()
                .createIndex(true)
                .instanceId("crs-dmjj8en7")
                .logRegion("ap-guangzhou")
                .logsetName("tf-example")
                .period(20)
                .topicName("tf-example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:RedisLogDelivery
        properties:
          createIndex: true
          instanceId: crs-dmjj8en7
          logRegion: ap-guangzhou
          logsetName: tf-example
          period: 20
          topicName: tf-example
    

    Create RedisLogDelivery Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RedisLogDelivery(name: string, args: RedisLogDeliveryArgs, opts?: CustomResourceOptions);
    @overload
    def RedisLogDelivery(resource_name: str,
                         args: RedisLogDeliveryArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedisLogDelivery(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         instance_id: Optional[str] = None,
                         create_index: Optional[bool] = None,
                         log_region: Optional[str] = None,
                         logset_id: Optional[str] = None,
                         logset_name: Optional[str] = None,
                         period: Optional[float] = None,
                         redis_log_delivery_id: Optional[str] = None,
                         topic_id: Optional[str] = None,
                         topic_name: Optional[str] = None)
    func NewRedisLogDelivery(ctx *Context, name string, args RedisLogDeliveryArgs, opts ...ResourceOption) (*RedisLogDelivery, error)
    public RedisLogDelivery(string name, RedisLogDeliveryArgs args, CustomResourceOptions? opts = null)
    public RedisLogDelivery(String name, RedisLogDeliveryArgs args)
    public RedisLogDelivery(String name, RedisLogDeliveryArgs args, CustomResourceOptions options)
    
    type: tencentcloud:RedisLogDelivery
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RedisLogDeliveryArgs
    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 RedisLogDeliveryArgs
    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 RedisLogDeliveryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedisLogDeliveryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedisLogDeliveryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RedisLogDelivery 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 RedisLogDelivery resource accepts the following input properties:

    InstanceId string
    Instance ID.
    CreateIndex bool
    Whether to create an index when creating a log topic.
    LogRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    LogsetId string
    The ID of the log set being delivered.
    LogsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    Period double
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    RedisLogDeliveryId string
    ID of the resource.
    TopicId string
    The ID of the topic being delivered.
    TopicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    InstanceId string
    Instance ID.
    CreateIndex bool
    Whether to create an index when creating a log topic.
    LogRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    LogsetId string
    The ID of the log set being delivered.
    LogsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    Period float64
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    RedisLogDeliveryId string
    ID of the resource.
    TopicId string
    The ID of the topic being delivered.
    TopicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    instanceId String
    Instance ID.
    createIndex Boolean
    Whether to create an index when creating a log topic.
    logRegion String
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId String
    The ID of the log set being delivered.
    logsetName String
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period Double
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId String
    ID of the resource.
    topicId String
    The ID of the topic being delivered.
    topicName String
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    instanceId string
    Instance ID.
    createIndex boolean
    Whether to create an index when creating a log topic.
    logRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId string
    The ID of the log set being delivered.
    logsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period number
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId string
    ID of the resource.
    topicId string
    The ID of the topic being delivered.
    topicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    instance_id str
    Instance ID.
    create_index bool
    Whether to create an index when creating a log topic.
    log_region str
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logset_id str
    The ID of the log set being delivered.
    logset_name str
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period float
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redis_log_delivery_id str
    ID of the resource.
    topic_id str
    The ID of the topic being delivered.
    topic_name str
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    instanceId String
    Instance ID.
    createIndex Boolean
    Whether to create an index when creating a log topic.
    logRegion String
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId String
    The ID of the log set being delivered.
    logsetName String
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period Number
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId String
    ID of the resource.
    topicId String
    The ID of the topic being delivered.
    topicName String
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RedisLogDelivery 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RedisLogDelivery Resource

    Get an existing RedisLogDelivery 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?: RedisLogDeliveryState, opts?: CustomResourceOptions): RedisLogDelivery
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_index: Optional[bool] = None,
            instance_id: Optional[str] = None,
            log_region: Optional[str] = None,
            logset_id: Optional[str] = None,
            logset_name: Optional[str] = None,
            period: Optional[float] = None,
            redis_log_delivery_id: Optional[str] = None,
            topic_id: Optional[str] = None,
            topic_name: Optional[str] = None) -> RedisLogDelivery
    func GetRedisLogDelivery(ctx *Context, name string, id IDInput, state *RedisLogDeliveryState, opts ...ResourceOption) (*RedisLogDelivery, error)
    public static RedisLogDelivery Get(string name, Input<string> id, RedisLogDeliveryState? state, CustomResourceOptions? opts = null)
    public static RedisLogDelivery get(String name, Output<String> id, RedisLogDeliveryState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:RedisLogDelivery    get:      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:
    CreateIndex bool
    Whether to create an index when creating a log topic.
    InstanceId string
    Instance ID.
    LogRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    LogsetId string
    The ID of the log set being delivered.
    LogsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    Period double
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    RedisLogDeliveryId string
    ID of the resource.
    TopicId string
    The ID of the topic being delivered.
    TopicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    CreateIndex bool
    Whether to create an index when creating a log topic.
    InstanceId string
    Instance ID.
    LogRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    LogsetId string
    The ID of the log set being delivered.
    LogsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    Period float64
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    RedisLogDeliveryId string
    ID of the resource.
    TopicId string
    The ID of the topic being delivered.
    TopicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    createIndex Boolean
    Whether to create an index when creating a log topic.
    instanceId String
    Instance ID.
    logRegion String
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId String
    The ID of the log set being delivered.
    logsetName String
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period Double
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId String
    ID of the resource.
    topicId String
    The ID of the topic being delivered.
    topicName String
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    createIndex boolean
    Whether to create an index when creating a log topic.
    instanceId string
    Instance ID.
    logRegion string
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId string
    The ID of the log set being delivered.
    logsetName string
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period number
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId string
    ID of the resource.
    topicId string
    The ID of the topic being delivered.
    topicName string
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    create_index bool
    Whether to create an index when creating a log topic.
    instance_id str
    Instance ID.
    log_region str
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logset_id str
    The ID of the log set being delivered.
    logset_name str
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period float
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redis_log_delivery_id str
    ID of the resource.
    topic_id str
    The ID of the topic being delivered.
    topic_name str
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.
    createIndex Boolean
    Whether to create an index when creating a log topic.
    instanceId String
    Instance ID.
    logRegion String
    The region where the log set is located; if not specified, the region where the instance is located will be used by default.
    logsetId String
    The ID of the log set being delivered.
    logsetName String
    Log set name. If LogsetId does not specify a specific log set ID, please configure this parameter to set the log set name, and the system will automatically create a new log set with the specified name.
    period Number
    Log storage time, defaults to 30 days, with an optional range of 1-3600 days.
    redisLogDeliveryId String
    ID of the resource.
    topicId String
    The ID of the topic being delivered.
    topicName String
    Log topic name, required when TopicId is empty, a new log topic will be automatically created.

    Import

    Redis log delivery can be imported, e.g.

    $ pulumi import tencentcloud:index/redisLogDelivery:RedisLogDelivery example crs-dmjj8en7
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack