1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ClbClsLogAttachment
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack

tencentcloud.ClbClsLogAttachment

Get Started
tencentcloud logo
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack

    Provides a resource to create a CLB cls log attachment

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClbLogTopic("example", {
        logSetId: "2ed70190-bf06-4777-980d-2d8a327a2554",
        topicName: "tf-example",
        status: true,
    });
    const exampleClbClsLogAttachment = new tencentcloud.ClbClsLogAttachment("example", {
        loadBalancerId: "lb-n26tx0bm",
        logSetId: "2ed70190-bf06-4777-980d-2d8a327a2554",
        logTopicId: example.clbLogTopicId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClbLogTopic("example",
        log_set_id="2ed70190-bf06-4777-980d-2d8a327a2554",
        topic_name="tf-example",
        status=True)
    example_clb_cls_log_attachment = tencentcloud.ClbClsLogAttachment("example",
        load_balancer_id="lb-n26tx0bm",
        log_set_id="2ed70190-bf06-4777-980d-2d8a327a2554",
        log_topic_id=example.clb_log_topic_id)
    
    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 {
    		example, err := tencentcloud.NewClbLogTopic(ctx, "example", &tencentcloud.ClbLogTopicArgs{
    			LogSetId:  pulumi.String("2ed70190-bf06-4777-980d-2d8a327a2554"),
    			TopicName: pulumi.String("tf-example"),
    			Status:    pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewClbClsLogAttachment(ctx, "example", &tencentcloud.ClbClsLogAttachmentArgs{
    			LoadBalancerId: pulumi.String("lb-n26tx0bm"),
    			LogSetId:       pulumi.String("2ed70190-bf06-4777-980d-2d8a327a2554"),
    			LogTopicId:     example.ClbLogTopicId,
    		})
    		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.ClbLogTopic("example", new()
        {
            LogSetId = "2ed70190-bf06-4777-980d-2d8a327a2554",
            TopicName = "tf-example",
            Status = true,
        });
    
        var exampleClbClsLogAttachment = new Tencentcloud.ClbClsLogAttachment("example", new()
        {
            LoadBalancerId = "lb-n26tx0bm",
            LogSetId = "2ed70190-bf06-4777-980d-2d8a327a2554",
            LogTopicId = example.ClbLogTopicId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClbLogTopic;
    import com.pulumi.tencentcloud.ClbLogTopicArgs;
    import com.pulumi.tencentcloud.ClbClsLogAttachment;
    import com.pulumi.tencentcloud.ClbClsLogAttachmentArgs;
    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 ClbLogTopic("example", ClbLogTopicArgs.builder()
                .logSetId("2ed70190-bf06-4777-980d-2d8a327a2554")
                .topicName("tf-example")
                .status(true)
                .build());
    
            var exampleClbClsLogAttachment = new ClbClsLogAttachment("exampleClbClsLogAttachment", ClbClsLogAttachmentArgs.builder()
                .loadBalancerId("lb-n26tx0bm")
                .logSetId("2ed70190-bf06-4777-980d-2d8a327a2554")
                .logTopicId(example.clbLogTopicId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClbLogTopic
        properties:
          logSetId: 2ed70190-bf06-4777-980d-2d8a327a2554
          topicName: tf-example
          status: true
      exampleClbClsLogAttachment:
        type: tencentcloud:ClbClsLogAttachment
        name: example
        properties:
          loadBalancerId: lb-n26tx0bm
          logSetId: 2ed70190-bf06-4777-980d-2d8a327a2554
          logTopicId: ${example.clbLogTopicId}
    

    Create ClbClsLogAttachment Resource

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

    Constructor syntax

    new ClbClsLogAttachment(name: string, args: ClbClsLogAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def ClbClsLogAttachment(resource_name: str,
                            args: ClbClsLogAttachmentArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClbClsLogAttachment(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            load_balancer_id: Optional[str] = None,
                            log_set_id: Optional[str] = None,
                            log_topic_id: Optional[str] = None,
                            clb_cls_log_attachment_id: Optional[str] = None)
    func NewClbClsLogAttachment(ctx *Context, name string, args ClbClsLogAttachmentArgs, opts ...ResourceOption) (*ClbClsLogAttachment, error)
    public ClbClsLogAttachment(string name, ClbClsLogAttachmentArgs args, CustomResourceOptions? opts = null)
    public ClbClsLogAttachment(String name, ClbClsLogAttachmentArgs args)
    public ClbClsLogAttachment(String name, ClbClsLogAttachmentArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClbClsLogAttachment
    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 ClbClsLogAttachmentArgs
    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 ClbClsLogAttachmentArgs
    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 ClbClsLogAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClbClsLogAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClbClsLogAttachmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    LoadBalancerId string
    CLB instance ID.
    LogSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    LogTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    ClbClsLogAttachmentId string
    ID of the resource.
    LoadBalancerId string
    CLB instance ID.
    LogSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    LogTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    ClbClsLogAttachmentId string
    ID of the resource.
    loadBalancerId String
    CLB instance ID.
    logSetId String
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId String
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId String
    ID of the resource.
    loadBalancerId string
    CLB instance ID.
    logSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId string
    ID of the resource.
    load_balancer_id str
    CLB instance ID.
    log_set_id str
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    log_topic_id str
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clb_cls_log_attachment_id str
    ID of the resource.
    loadBalancerId String
    CLB instance ID.
    logSetId String
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId String
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClbClsLogAttachment 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 ClbClsLogAttachment Resource

    Get an existing ClbClsLogAttachment 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?: ClbClsLogAttachmentState, opts?: CustomResourceOptions): ClbClsLogAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            clb_cls_log_attachment_id: Optional[str] = None,
            load_balancer_id: Optional[str] = None,
            log_set_id: Optional[str] = None,
            log_topic_id: Optional[str] = None) -> ClbClsLogAttachment
    func GetClbClsLogAttachment(ctx *Context, name string, id IDInput, state *ClbClsLogAttachmentState, opts ...ResourceOption) (*ClbClsLogAttachment, error)
    public static ClbClsLogAttachment Get(string name, Input<string> id, ClbClsLogAttachmentState? state, CustomResourceOptions? opts = null)
    public static ClbClsLogAttachment get(String name, Output<String> id, ClbClsLogAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClbClsLogAttachment    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:
    ClbClsLogAttachmentId string
    ID of the resource.
    LoadBalancerId string
    CLB instance ID.
    LogSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    LogTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    ClbClsLogAttachmentId string
    ID of the resource.
    LoadBalancerId string
    CLB instance ID.
    LogSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    LogTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId String
    ID of the resource.
    loadBalancerId String
    CLB instance ID.
    logSetId String
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId String
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId string
    ID of the resource.
    loadBalancerId string
    CLB instance ID.
    logSetId string
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId string
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clb_cls_log_attachment_id str
    ID of the resource.
    load_balancer_id str
    CLB instance ID.
    log_set_id str
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    log_topic_id str
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..
    clbClsLogAttachmentId String
    ID of the resource.
    loadBalancerId String
    CLB instance ID.
    logSetId String
    Logset ID of the Cloud Log Service (CLS).When adding or updating a log topic, call the DescribeLogsets API to obtain the logset ID.When deleting a log topic, set this parameter to null..
    logTopicId String
    Log topic ID of the CLS.When adding or updating a log topic, call the DescribeTopics API to obtain the log topic ID.When deleting a log topic, set this parameter to null..

    Import

    CLB cls log attachment can be imported using the loadBalancerId#logSetId#logTopicId, e.g.

    $ pulumi import tencentcloud:index/clbClsLogAttachment:ClbClsLogAttachment example lb-n26tx0bm#2ed70190-bf06-4777-980d-2d8a327a2554#ac2fda28-3e79-4b51-b193-bfcf1aeece24
    

    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.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
      Meet Neo: Your AI Platform Teammate