1. Packages
  2. Datadog Provider
  3. API Docs
  4. getMetricTags
Datadog v4.50.0 published on Thursday, May 1, 2025 by Pulumi

datadog.getMetricTags

Explore with Pulumi AI

datadog logo
Datadog v4.50.0 published on Thursday, May 1, 2025 by Pulumi

    Use this data source to retrieve tags associated with a metric to use in other resources.

    Using getMetricTags

    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 getMetricTags(args: GetMetricTagsArgs, opts?: InvokeOptions): Promise<GetMetricTagsResult>
    function getMetricTagsOutput(args: GetMetricTagsOutputArgs, opts?: InvokeOptions): Output<GetMetricTagsResult>
    def get_metric_tags(metric: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetMetricTagsResult
    def get_metric_tags_output(metric: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetMetricTagsResult]
    func GetMetricTags(ctx *Context, args *GetMetricTagsArgs, opts ...InvokeOption) (*GetMetricTagsResult, error)
    func GetMetricTagsOutput(ctx *Context, args *GetMetricTagsOutputArgs, opts ...InvokeOption) GetMetricTagsResultOutput

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

    public static class GetMetricTags 
    {
        public static Task<GetMetricTagsResult> InvokeAsync(GetMetricTagsArgs args, InvokeOptions? opts = null)
        public static Output<GetMetricTagsResult> Invoke(GetMetricTagsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMetricTagsResult> getMetricTags(GetMetricTagsArgs args, InvokeOptions options)
    public static Output<GetMetricTagsResult> getMetricTags(GetMetricTagsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: datadog:index/getMetricTags:getMetricTags
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Metric string
    The metric for which to fetch tags.
    Metric string
    The metric for which to fetch tags.
    metric String
    The metric for which to fetch tags.
    metric string
    The metric for which to fetch tags.
    metric str
    The metric for which to fetch tags.
    metric String
    The metric for which to fetch tags.

    getMetricTags Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Metric string
    The metric for which to fetch tags.
    Tags List<string>
    The tags associated with the metric.
    Id string
    The ID of this resource.
    Metric string
    The metric for which to fetch tags.
    Tags []string
    The tags associated with the metric.
    id String
    The ID of this resource.
    metric String
    The metric for which to fetch tags.
    tags List<String>
    The tags associated with the metric.
    id string
    The ID of this resource.
    metric string
    The metric for which to fetch tags.
    tags string[]
    The tags associated with the metric.
    id str
    The ID of this resource.
    metric str
    The metric for which to fetch tags.
    tags Sequence[str]
    The tags associated with the metric.
    id String
    The ID of this resource.
    metric String
    The metric for which to fetch tags.
    tags List<String>
    The tags associated with the metric.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.50.0 published on Thursday, May 1, 2025 by Pulumi