1. Registry
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. ClsMetricSubscribe
Viewing docs for tencentcloud 1.83.32
published on Thursday, Sep 17, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.32
published on Thursday, Sep 17, 2026 by tencentcloudstack

    Provides a resource to create a CLS metric subscribe

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.ClsMetricSubscribe("example", {
        name: "tf-example",
        topicId: "da978f4a-b205-4286-830c-86d0ca45d7f3",
        namespace: "qce/cvm",
        enable: 2,
        metrics: [
            {
                metricName: "BaseCpuUsage",
                periods: [10],
                metricLabels: [{
                    key: "label_key",
                    value: "label_value",
                }],
            },
            {
                metricName: "CbsVolumeFsUsage",
                periods: [10],
                metricLabels: [{
                    key: "label_key",
                    value: "label_value",
                }],
            },
            {
                metricName: "MemUsed",
                periods: [10],
                metricLabels: [{
                    key: "label_key",
                    value: "label_value",
                }],
            },
        ],
        instanceInfo: {
            instanceDimensions: [
                "InstanceId",
                "diskid",
            ],
            instances: [{
                values: [
                    "ins-ly9ibb5w",
                    "disk-781trig2",
                ],
            }],
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.ClsMetricSubscribe("example",
        name="tf-example",
        topic_id="da978f4a-b205-4286-830c-86d0ca45d7f3",
        namespace="qce/cvm",
        enable=2,
        metrics=[
            {
                "metric_name": "BaseCpuUsage",
                "periods": [10],
                "metric_labels": [{
                    "key": "label_key",
                    "value": "label_value",
                }],
            },
            {
                "metric_name": "CbsVolumeFsUsage",
                "periods": [10],
                "metric_labels": [{
                    "key": "label_key",
                    "value": "label_value",
                }],
            },
            {
                "metric_name": "MemUsed",
                "periods": [10],
                "metric_labels": [{
                    "key": "label_key",
                    "value": "label_value",
                }],
            },
        ],
        instance_info={
            "instance_dimensions": [
                "InstanceId",
                "diskid",
            ],
            "instances": [{
                "values": [
                    "ins-ly9ibb5w",
                    "disk-781trig2",
                ],
            }],
        })
    
    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.NewClsMetricSubscribe(ctx, "example", &tencentcloud.ClsMetricSubscribeArgs{
    			Name:      pulumi.String("tf-example"),
    			TopicId:   pulumi.String("da978f4a-b205-4286-830c-86d0ca45d7f3"),
    			Namespace: pulumi.String("qce/cvm"),
    			Enable:    pulumi.Float64(2),
    			Metrics: tencentcloud.ClsMetricSubscribeMetricArray{
    				&tencentcloud.ClsMetricSubscribeMetricArgs{
    					MetricName: pulumi.String("BaseCpuUsage"),
    					Periods: pulumi.Float64Array{
    						pulumi.Float64(10),
    					},
    					MetricLabels: tencentcloud.ClsMetricSubscribeMetricMetricLabelArray{
    						&tencentcloud.ClsMetricSubscribeMetricMetricLabelArgs{
    							Key:   pulumi.String("label_key"),
    							Value: pulumi.String("label_value"),
    						},
    					},
    				},
    				&tencentcloud.ClsMetricSubscribeMetricArgs{
    					MetricName: pulumi.String("CbsVolumeFsUsage"),
    					Periods: pulumi.Float64Array{
    						pulumi.Float64(10),
    					},
    					MetricLabels: tencentcloud.ClsMetricSubscribeMetricMetricLabelArray{
    						&tencentcloud.ClsMetricSubscribeMetricMetricLabelArgs{
    							Key:   pulumi.String("label_key"),
    							Value: pulumi.String("label_value"),
    						},
    					},
    				},
    				&tencentcloud.ClsMetricSubscribeMetricArgs{
    					MetricName: pulumi.String("MemUsed"),
    					Periods: pulumi.Float64Array{
    						pulumi.Float64(10),
    					},
    					MetricLabels: tencentcloud.ClsMetricSubscribeMetricMetricLabelArray{
    						&tencentcloud.ClsMetricSubscribeMetricMetricLabelArgs{
    							Key:   pulumi.String("label_key"),
    							Value: pulumi.String("label_value"),
    						},
    					},
    				},
    			},
    			InstanceInfo: &tencentcloud.ClsMetricSubscribeInstanceInfoArgs{
    				InstanceDimensions: pulumi.StringArray{
    					pulumi.String("InstanceId"),
    					pulumi.String("diskid"),
    				},
    				Instances: tencentcloud.ClsMetricSubscribeInstanceInfoInstanceArray{
    					&tencentcloud.ClsMetricSubscribeInstanceInfoInstanceArgs{
    						Values: pulumi.StringArray{
    							pulumi.String("ins-ly9ibb5w"),
    							pulumi.String("disk-781trig2"),
    						},
    					},
    				},
    			},
    		})
    		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.ClsMetricSubscribe("example", new()
        {
            Name = "tf-example",
            TopicId = "da978f4a-b205-4286-830c-86d0ca45d7f3",
            Namespace = "qce/cvm",
            Enable = 2,
            Metrics = new[]
            {
                new Tencentcloud.Inputs.ClsMetricSubscribeMetricArgs
                {
                    MetricName = "BaseCpuUsage",
                    Periods = new[]
                    {
                        10,
                    },
                    MetricLabels = new[]
                    {
                        new Tencentcloud.Inputs.ClsMetricSubscribeMetricMetricLabelArgs
                        {
                            Key = "label_key",
                            Value = "label_value",
                        },
                    },
                },
                new Tencentcloud.Inputs.ClsMetricSubscribeMetricArgs
                {
                    MetricName = "CbsVolumeFsUsage",
                    Periods = new[]
                    {
                        10,
                    },
                    MetricLabels = new[]
                    {
                        new Tencentcloud.Inputs.ClsMetricSubscribeMetricMetricLabelArgs
                        {
                            Key = "label_key",
                            Value = "label_value",
                        },
                    },
                },
                new Tencentcloud.Inputs.ClsMetricSubscribeMetricArgs
                {
                    MetricName = "MemUsed",
                    Periods = new[]
                    {
                        10,
                    },
                    MetricLabels = new[]
                    {
                        new Tencentcloud.Inputs.ClsMetricSubscribeMetricMetricLabelArgs
                        {
                            Key = "label_key",
                            Value = "label_value",
                        },
                    },
                },
            },
            InstanceInfo = new Tencentcloud.Inputs.ClsMetricSubscribeInstanceInfoArgs
            {
                InstanceDimensions = new[]
                {
                    "InstanceId",
                    "diskid",
                },
                Instances = new[]
                {
                    new Tencentcloud.Inputs.ClsMetricSubscribeInstanceInfoInstanceArgs
                    {
                        Values = new[]
                        {
                            "ins-ly9ibb5w",
                            "disk-781trig2",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsMetricSubscribe;
    import com.pulumi.tencentcloud.ClsMetricSubscribeArgs;
    import com.pulumi.tencentcloud.inputs.ClsMetricSubscribeMetricArgs;
    import com.pulumi.tencentcloud.inputs.ClsMetricSubscribeInstanceInfoArgs;
    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 ClsMetricSubscribe("example", ClsMetricSubscribeArgs.builder()
                .name("tf-example")
                .topicId("da978f4a-b205-4286-830c-86d0ca45d7f3")
                .namespace("qce/cvm")
                .enable(2.0)
                .metrics(            
                    ClsMetricSubscribeMetricArgs.builder()
                        .metricName("BaseCpuUsage")
                        .periods(10.0)
                        .metricLabels(ClsMetricSubscribeMetricMetricLabelArgs.builder()
                            .key("label_key")
                            .value("label_value")
                            .build())
                        .build(),
                    ClsMetricSubscribeMetricArgs.builder()
                        .metricName("CbsVolumeFsUsage")
                        .periods(10.0)
                        .metricLabels(ClsMetricSubscribeMetricMetricLabelArgs.builder()
                            .key("label_key")
                            .value("label_value")
                            .build())
                        .build(),
                    ClsMetricSubscribeMetricArgs.builder()
                        .metricName("MemUsed")
                        .periods(10.0)
                        .metricLabels(ClsMetricSubscribeMetricMetricLabelArgs.builder()
                            .key("label_key")
                            .value("label_value")
                            .build())
                        .build())
                .instanceInfo(ClsMetricSubscribeInstanceInfoArgs.builder()
                    .instanceDimensions(                
                        "InstanceId",
                        "diskid")
                    .instances(ClsMetricSubscribeInstanceInfoInstanceArgs.builder()
                        .values(                    
                            "ins-ly9ibb5w",
                            "disk-781trig2")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:ClsMetricSubscribe
        properties:
          name: tf-example
          topicId: da978f4a-b205-4286-830c-86d0ca45d7f3
          namespace: qce/cvm
          enable: 2
          metrics:
            - metricName: BaseCpuUsage
              periods:
                - 10
              metricLabels:
                - key: label_key
                  value: label_value
            - metricName: CbsVolumeFsUsage
              periods:
                - 10
              metricLabels:
                - key: label_key
                  value: label_value
            - metricName: MemUsed
              periods:
                - 10
              metricLabels:
                - key: label_key
                  value: label_value
          instanceInfo:
            instanceDimensions:
              - InstanceId
              - diskid
            instances:
              - values:
                  - ins-ly9ibb5w
                  - disk-781trig2
    
    Example coming soon!
    

    Create ClsMetricSubscribe Resource

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

    Constructor syntax

    new ClsMetricSubscribe(name: string, args: ClsMetricSubscribeArgs, opts?: CustomResourceOptions);
    @overload
    def ClsMetricSubscribe(resource_name: str,
                           args: ClsMetricSubscribeArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClsMetricSubscribe(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           instance_info: Optional[ClsMetricSubscribeInstanceInfoArgs] = None,
                           metrics: Optional[Sequence[ClsMetricSubscribeMetricArgs]] = None,
                           namespace: Optional[str] = None,
                           topic_id: Optional[str] = None,
                           cls_metric_subscribe_id: Optional[str] = None,
                           enable: Optional[float] = None,
                           name: Optional[str] = None)
    func NewClsMetricSubscribe(ctx *Context, name string, args ClsMetricSubscribeArgs, opts ...ResourceOption) (*ClsMetricSubscribe, error)
    public ClsMetricSubscribe(string name, ClsMetricSubscribeArgs args, CustomResourceOptions? opts = null)
    public ClsMetricSubscribe(String name, ClsMetricSubscribeArgs args)
    public ClsMetricSubscribe(String name, ClsMetricSubscribeArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClsMetricSubscribe
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_cls_metric_subscribe" "name" {
        # resource properties
    }

    Parameters

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

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

    InstanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    Metrics List<ClsMetricSubscribeMetric>
    Metric config info list.
    Namespace string
    Cloud product namespace.
    TopicId string
    Log topic id.
    ClsMetricSubscribeId string
    ID of the resource.
    Enable double
    Task switch, 1: pause, 2: enable.
    Name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    InstanceInfo ClsMetricSubscribeInstanceInfoArgs
    Instance config info.
    Metrics []ClsMetricSubscribeMetricArgs
    Metric config info list.
    Namespace string
    Cloud product namespace.
    TopicId string
    Log topic id.
    ClsMetricSubscribeId string
    ID of the resource.
    Enable float64
    Task switch, 1: pause, 2: enable.
    Name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    instance_info object
    Instance config info.
    metrics list(object)
    Metric config info list.
    namespace string
    Cloud product namespace.
    topic_id string
    Log topic id.
    cls_metric_subscribe_id string
    ID of the resource.
    enable number
    Task switch, 1: pause, 2: enable.
    name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    instanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    metrics List<ClsMetricSubscribeMetric>
    Metric config info list.
    namespace String
    Cloud product namespace.
    topicId String
    Log topic id.
    clsMetricSubscribeId String
    ID of the resource.
    enable Double
    Task switch, 1: pause, 2: enable.
    name String
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    instanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    metrics ClsMetricSubscribeMetric[]
    Metric config info list.
    namespace string
    Cloud product namespace.
    topicId string
    Log topic id.
    clsMetricSubscribeId string
    ID of the resource.
    enable number
    Task switch, 1: pause, 2: enable.
    name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    instance_info ClsMetricSubscribeInstanceInfoArgs
    Instance config info.
    metrics Sequence[ClsMetricSubscribeMetricArgs]
    Metric config info list.
    namespace str
    Cloud product namespace.
    topic_id str
    Log topic id.
    cls_metric_subscribe_id str
    ID of the resource.
    enable float
    Task switch, 1: pause, 2: enable.
    name str
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    instanceInfo Property Map
    Instance config info.
    metrics List<Property Map>
    Metric config info list.
    namespace String
    Cloud product namespace.
    topicId String
    Log topic id.
    clsMetricSubscribeId String
    ID of the resource.
    enable Number
    Task switch, 1: pause, 2: enable.
    name String
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClsMetricSubscribe resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status double
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    TaskId string
    Subscribe task id.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status float64
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    TaskId string
    Subscribe task id.
    id string
    The provider-assigned unique ID for this managed resource.
    status number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    task_id string
    Subscribe task id.
    id String
    The provider-assigned unique ID for this managed resource.
    status Double
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId String
    Subscribe task id.
    id string
    The provider-assigned unique ID for this managed resource.
    status number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId string
    Subscribe task id.
    id str
    The provider-assigned unique ID for this managed resource.
    status float
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    task_id str
    Subscribe task id.
    id String
    The provider-assigned unique ID for this managed resource.
    status Number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId String
    Subscribe task id.

    Look up Existing ClsMetricSubscribe Resource

    Get an existing ClsMetricSubscribe 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?: ClsMetricSubscribeState, opts?: CustomResourceOptions): ClsMetricSubscribe
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cls_metric_subscribe_id: Optional[str] = None,
            enable: Optional[float] = None,
            instance_info: Optional[ClsMetricSubscribeInstanceInfoArgs] = None,
            metrics: Optional[Sequence[ClsMetricSubscribeMetricArgs]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            status: Optional[float] = None,
            task_id: Optional[str] = None,
            topic_id: Optional[str] = None) -> ClsMetricSubscribe
    func GetClsMetricSubscribe(ctx *Context, name string, id IDInput, state *ClsMetricSubscribeState, opts ...ResourceOption) (*ClsMetricSubscribe, error)
    public static ClsMetricSubscribe Get(string name, Input<string> id, ClsMetricSubscribeState? state, CustomResourceOptions? opts = null)
    public static ClsMetricSubscribe get(String name, Output<String> id, ClsMetricSubscribeState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClsMetricSubscribe    get:      id: ${id}
    import {
      to = tencentcloud_cls_metric_subscribe.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:
    ClsMetricSubscribeId string
    ID of the resource.
    Enable double
    Task switch, 1: pause, 2: enable.
    InstanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    Metrics List<ClsMetricSubscribeMetric>
    Metric config info list.
    Name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    Namespace string
    Cloud product namespace.
    Status double
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    TaskId string
    Subscribe task id.
    TopicId string
    Log topic id.
    ClsMetricSubscribeId string
    ID of the resource.
    Enable float64
    Task switch, 1: pause, 2: enable.
    InstanceInfo ClsMetricSubscribeInstanceInfoArgs
    Instance config info.
    Metrics []ClsMetricSubscribeMetricArgs
    Metric config info list.
    Name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    Namespace string
    Cloud product namespace.
    Status float64
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    TaskId string
    Subscribe task id.
    TopicId string
    Log topic id.
    cls_metric_subscribe_id string
    ID of the resource.
    enable number
    Task switch, 1: pause, 2: enable.
    instance_info object
    Instance config info.
    metrics list(object)
    Metric config info list.
    name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    namespace string
    Cloud product namespace.
    status number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    task_id string
    Subscribe task id.
    topic_id string
    Log topic id.
    clsMetricSubscribeId String
    ID of the resource.
    enable Double
    Task switch, 1: pause, 2: enable.
    instanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    metrics List<ClsMetricSubscribeMetric>
    Metric config info list.
    name String
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    namespace String
    Cloud product namespace.
    status Double
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId String
    Subscribe task id.
    topicId String
    Log topic id.
    clsMetricSubscribeId string
    ID of the resource.
    enable number
    Task switch, 1: pause, 2: enable.
    instanceInfo ClsMetricSubscribeInstanceInfo
    Instance config info.
    metrics ClsMetricSubscribeMetric[]
    Metric config info list.
    name string
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    namespace string
    Cloud product namespace.
    status number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId string
    Subscribe task id.
    topicId string
    Log topic id.
    cls_metric_subscribe_id str
    ID of the resource.
    enable float
    Task switch, 1: pause, 2: enable.
    instance_info ClsMetricSubscribeInstanceInfoArgs
    Instance config info.
    metrics Sequence[ClsMetricSubscribeMetricArgs]
    Metric config info list.
    name str
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    namespace str
    Cloud product namespace.
    status float
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    task_id str
    Subscribe task id.
    topic_id str
    Log topic id.
    clsMetricSubscribeId String
    ID of the resource.
    enable Number
    Task switch, 1: pause, 2: enable.
    instanceInfo Property Map
    Instance config info.
    metrics List<Property Map>
    Metric config info list.
    name String
    Subscribe task name, up to 64 characters, start with a letter, support 0-9, a-z, A-Z, _, -, Chinese characters.
    namespace String
    Cloud product namespace.
    status Number
    Subscribe task running status. 0: creating, 1: paused, 2: running, 3: abnormal.
    taskId String
    Subscribe task id.
    topicId String
    Log topic id.

    Supporting Types

    ClsMetricSubscribeInstanceInfo, ClsMetricSubscribeInstanceInfoArgs

    InstanceDimensions List<string>
    Instance dimension.
    Instances List<ClsMetricSubscribeInstanceInfoInstance>
    Instance value list.
    InstanceDimensions []string
    Instance dimension.
    Instances []ClsMetricSubscribeInstanceInfoInstance
    Instance value list.
    instance_dimensions list(string)
    Instance dimension.
    instances list(object)
    Instance value list.
    instanceDimensions List<String>
    Instance dimension.
    instances List<ClsMetricSubscribeInstanceInfoInstance>
    Instance value list.
    instanceDimensions string[]
    Instance dimension.
    instances ClsMetricSubscribeInstanceInfoInstance[]
    Instance value list.
    instance_dimensions Sequence[str]
    Instance dimension.
    instances Sequence[ClsMetricSubscribeInstanceInfoInstance]
    Instance value list.
    instanceDimensions List<String>
    Instance dimension.
    instances List<Property Map>
    Instance value list.

    ClsMetricSubscribeInstanceInfoInstance, ClsMetricSubscribeInstanceInfoInstanceArgs

    Values List<string>
    Instance info value list.
    Values []string
    Instance info value list.
    values list(string)
    Instance info value list.
    values List<String>
    Instance info value list.
    values string[]
    Instance info value list.
    values Sequence[str]
    Instance info value list.
    values List<String>
    Instance info value list.

    ClsMetricSubscribeMetric, ClsMetricSubscribeMetricArgs

    MetricName string
    Metric name.
    Periods List<double>
    Statistical period, unit: second(s).
    MetricLabels List<ClsMetricSubscribeMetricMetricLabel>
    Custom metric labels.
    MetricName string
    Metric name.
    Periods []float64
    Statistical period, unit: second(s).
    MetricLabels []ClsMetricSubscribeMetricMetricLabel
    Custom metric labels.
    metric_name string
    Metric name.
    periods list(number)
    Statistical period, unit: second(s).
    metric_labels list(object)
    Custom metric labels.
    metricName String
    Metric name.
    periods List<Double>
    Statistical period, unit: second(s).
    metricLabels List<ClsMetricSubscribeMetricMetricLabel>
    Custom metric labels.
    metricName string
    Metric name.
    periods number[]
    Statistical period, unit: second(s).
    metricLabels ClsMetricSubscribeMetricMetricLabel[]
    Custom metric labels.
    metric_name str
    Metric name.
    periods Sequence[float]
    Statistical period, unit: second(s).
    metric_labels Sequence[ClsMetricSubscribeMetricMetricLabel]
    Custom metric labels.
    metricName String
    Metric name.
    periods List<Number>
    Statistical period, unit: second(s).
    metricLabels List<Property Map>
    Custom metric labels.

    ClsMetricSubscribeMetricMetricLabel, ClsMetricSubscribeMetricMetricLabelArgs

    Key string
    Metric label name.
    Value string
    Metric label content.
    Key string
    Metric label name.
    Value string
    Metric label content.
    key string
    Metric label name.
    value string
    Metric label content.
    key String
    Metric label name.
    value String
    Metric label content.
    key string
    Metric label name.
    value string
    Metric label content.
    key str
    Metric label name.
    value str
    Metric label content.
    key String
    Metric label name.
    value String
    Metric label content.

    Import

    CLS metric subscribe can be imported using the composite id, e.g. the composite id is topicId#taskId formatted by topicId and taskId joined with #:

    $ pulumi import tencentcloud:index/clsMetricSubscribe:ClsMetricSubscribe example da978f4a-b205-4286-830c-86d0ca45d7f3#bc28af29-b274-4a69-ba77-6e665db26850
    

    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.83.32
    published on Thursday, Sep 17, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial