1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCatMetricData
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.getCatMetricData

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

    Use this data source to query detailed information of cat metric_data

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const metricData = tencentcloud.getCatMetricData({
        analyzeTaskType: "AnalyzeTaskType_Network",
        field: "avg(\"ping_time\")",
        filters: [
            "\"host\" = 'www.qq.com'",
            "time >= now()-1h",
        ],
        metricType: "gauge",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    metric_data = tencentcloud.get_cat_metric_data(analyze_task_type="AnalyzeTaskType_Network",
        field="avg(\"ping_time\")",
        filters=[
            "\"host\" = 'www.qq.com'",
            "time >= now()-1h",
        ],
        metric_type="gauge")
    
    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.GetCatMetricData(ctx, &tencentcloud.GetCatMetricDataArgs{
    			AnalyzeTaskType: "AnalyzeTaskType_Network",
    			Field:           "avg(\"ping_time\")",
    			Filters: []string{
    				"\"host\" = 'www.qq.com'",
    				"time >= now()-1h",
    			},
    			MetricType: "gauge",
    		}, nil)
    		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 metricData = Tencentcloud.GetCatMetricData.Invoke(new()
        {
            AnalyzeTaskType = "AnalyzeTaskType_Network",
            Field = "avg(\"ping_time\")",
            Filters = new[]
            {
                "\"host\" = 'www.qq.com'",
                "time >= now()-1h",
            },
            MetricType = "gauge",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetCatMetricDataArgs;
    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) {
            final var metricData = TencentcloudFunctions.getCatMetricData(GetCatMetricDataArgs.builder()
                .analyzeTaskType("AnalyzeTaskType_Network")
                .field("avg(\"ping_time\")")
                .filters(            
                    "\"host\" = 'www.qq.com'",
                    "time >= now()-1h")
                .metricType("gauge")
                .build());
    
        }
    }
    
    variables:
      metricData:
        fn::invoke:
          function: tencentcloud:getCatMetricData
          arguments:
            analyzeTaskType: AnalyzeTaskType_Network
            field: avg("ping_time")
            filters:
              - '"host" = ''www.qq.com'''
              - time >= now()-1h
            metricType: gauge
    

    Using getCatMetricData

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCatMetricData(args: GetCatMetricDataArgs, opts?: InvokeOptions): Promise<GetCatMetricDataResult>
    function getCatMetricDataOutput(args: GetCatMetricDataOutputArgs, opts?: InvokeOptions): Output<GetCatMetricDataResult>
    def get_cat_metric_data(analyze_task_type: Optional[str] = None,
                            field: Optional[str] = None,
                            filter: Optional[str] = None,
                            filters: Optional[Sequence[str]] = None,
                            group_by: Optional[str] = None,
                            id: Optional[str] = None,
                            metric_type: Optional[str] = None,
                            result_output_file: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetCatMetricDataResult
    def get_cat_metric_data_output(analyze_task_type: Optional[pulumi.Input[str]] = None,
                            field: Optional[pulumi.Input[str]] = None,
                            filter: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            group_by: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            metric_type: Optional[pulumi.Input[str]] = None,
                            result_output_file: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetCatMetricDataResult]
    func GetCatMetricData(ctx *Context, args *GetCatMetricDataArgs, opts ...InvokeOption) (*GetCatMetricDataResult, error)
    func GetCatMetricDataOutput(ctx *Context, args *GetCatMetricDataOutputArgs, opts ...InvokeOption) GetCatMetricDataResultOutput

    > Note: This function is named GetCatMetricData in the Go SDK.

    public static class GetCatMetricData 
    {
        public static Task<GetCatMetricDataResult> InvokeAsync(GetCatMetricDataArgs args, InvokeOptions? opts = null)
        public static Output<GetCatMetricDataResult> Invoke(GetCatMetricDataInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCatMetricDataResult> getCatMetricData(GetCatMetricDataArgs args, InvokeOptions options)
    public static Output<GetCatMetricDataResult> getCatMetricData(GetCatMetricDataArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCatMetricData:getCatMetricData
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AnalyzeTaskType string
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    Field string
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    Filters List<string>
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    MetricType string
    Metric type, metrics queries are passed with gauge by default.
    Filter string
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    GroupBy string
    Aggregation time, such as 1m, 1d, 30d, and so on.
    Id string
    ResultOutputFile string
    Used to save results.
    AnalyzeTaskType string
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    Field string
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    Filters []string
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    MetricType string
    Metric type, metrics queries are passed with gauge by default.
    Filter string
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    GroupBy string
    Aggregation time, such as 1m, 1d, 30d, and so on.
    Id string
    ResultOutputFile string
    Used to save results.
    analyzeTaskType String
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    field String
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    filters List<String>
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    metricType String
    Metric type, metrics queries are passed with gauge by default.
    filter String
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    groupBy String
    Aggregation time, such as 1m, 1d, 30d, and so on.
    id String
    resultOutputFile String
    Used to save results.
    analyzeTaskType string
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    field string
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    filters string[]
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    metricType string
    Metric type, metrics queries are passed with gauge by default.
    filter string
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    groupBy string
    Aggregation time, such as 1m, 1d, 30d, and so on.
    id string
    resultOutputFile string
    Used to save results.
    analyze_task_type str
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    field str
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    filters Sequence[str]
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    metric_type str
    Metric type, metrics queries are passed with gauge by default.
    filter str
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    group_by str
    Aggregation time, such as 1m, 1d, 30d, and so on.
    id str
    result_output_file str
    Used to save results.
    analyzeTaskType String
    Analysis of task type, supported types: AnalyzeTaskType_Network: network quality, AnalyzeTaskType_Browse: page performance, AnalyzeTaskType_Transport: port performance, AnalyzeTaskType_UploadDownload: file transport, AnalyzeTaskType_MediaStream: audiovisual experience.
    field String
    Detailed fields of metrics, specified metrics can be passed or aggregate metrics, such as avg(ping_time) means entire delay.
    filters List<String>
    Multiple condition filtering, supports combining multiple filtering conditions for query.
    metricType String
    Metric type, metrics queries are passed with gauge by default.
    filter String
    Filter conditions can be passed as a single filter or multiple parameters concatenated together.
    groupBy String
    Aggregation time, such as 1m, 1d, 30d, and so on.
    id String
    resultOutputFile String
    Used to save results.

    getCatMetricData Result

    The following output properties are available:

    AnalyzeTaskType string
    Field string
    Filters List<string>
    Id string
    MetricSet string
    Return JSON string.
    MetricType string
    Filter string
    GroupBy string
    ResultOutputFile string
    AnalyzeTaskType string
    Field string
    Filters []string
    Id string
    MetricSet string
    Return JSON string.
    MetricType string
    Filter string
    GroupBy string
    ResultOutputFile string
    analyzeTaskType String
    field String
    filters List<String>
    id String
    metricSet String
    Return JSON string.
    metricType String
    filter String
    groupBy String
    resultOutputFile String
    analyzeTaskType string
    field string
    filters string[]
    id string
    metricSet string
    Return JSON string.
    metricType string
    filter string
    groupBy string
    resultOutputFile string
    analyze_task_type str
    field str
    filters Sequence[str]
    id str
    metric_set str
    Return JSON string.
    metric_type str
    filter str
    group_by str
    result_output_file str
    analyzeTaskType String
    field String
    filters List<String>
    id String
    metricSet String
    Return JSON string.
    metricType String
    filter String
    groupBy String
    resultOutputFile String

    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.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack