1. Packages
  2. Datadog
  3. API Docs
  4. MetricMetadata
Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi

datadog.MetricMetadata

Explore with Pulumi AI

datadog logo
Datadog v4.28.1 published on Monday, Jun 24, 2024 by Pulumi

    Provides a Datadog metric_metadata resource. This can be used to manage a metric’s metadata.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Manage a Datadog metric's metadata
    const requestTime = new datadog.MetricMetadata("request_time", {
        metric: "request.time",
        shortName: "Request time",
        description: "99th percentile request time in milliseconds",
        type: "gauge",
        unit: "millisecond",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Manage a Datadog metric's metadata
    request_time = datadog.MetricMetadata("request_time",
        metric="request.time",
        short_name="Request time",
        description="99th percentile request time in milliseconds",
        type="gauge",
        unit="millisecond")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Manage a Datadog metric's metadata
    		_, err := datadog.NewMetricMetadata(ctx, "request_time", &datadog.MetricMetadataArgs{
    			Metric:      pulumi.String("request.time"),
    			ShortName:   pulumi.String("Request time"),
    			Description: pulumi.String("99th percentile request time in milliseconds"),
    			Type:        pulumi.String("gauge"),
    			Unit:        pulumi.String("millisecond"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Manage a Datadog metric's metadata
        var requestTime = new Datadog.MetricMetadata("request_time", new()
        {
            Metric = "request.time",
            ShortName = "Request time",
            Description = "99th percentile request time in milliseconds",
            Type = "gauge",
            Unit = "millisecond",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.MetricMetadata;
    import com.pulumi.datadog.MetricMetadataArgs;
    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) {
            // Manage a Datadog metric's metadata
            var requestTime = new MetricMetadata("requestTime", MetricMetadataArgs.builder()
                .metric("request.time")
                .shortName("Request time")
                .description("99th percentile request time in milliseconds")
                .type("gauge")
                .unit("millisecond")
                .build());
    
        }
    }
    
    resources:
      # Manage a Datadog metric's metadata
      requestTime:
        type: datadog:MetricMetadata
        name: request_time
        properties:
          metric: request.time
          shortName: Request time
          description: 99th percentile request time in milliseconds
          type: gauge
          unit: millisecond
    

    Create MetricMetadata Resource

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

    Constructor syntax

    new MetricMetadata(name: string, args: MetricMetadataArgs, opts?: CustomResourceOptions);
    @overload
    def MetricMetadata(resource_name: str,
                       args: MetricMetadataArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricMetadata(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       metric: Optional[str] = None,
                       description: Optional[str] = None,
                       per_unit: Optional[str] = None,
                       short_name: Optional[str] = None,
                       statsd_interval: Optional[int] = None,
                       type: Optional[str] = None,
                       unit: Optional[str] = None)
    func NewMetricMetadata(ctx *Context, name string, args MetricMetadataArgs, opts ...ResourceOption) (*MetricMetadata, error)
    public MetricMetadata(string name, MetricMetadataArgs args, CustomResourceOptions? opts = null)
    public MetricMetadata(String name, MetricMetadataArgs args)
    public MetricMetadata(String name, MetricMetadataArgs args, CustomResourceOptions options)
    
    type: datadog:MetricMetadata
    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 MetricMetadataArgs
    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 MetricMetadataArgs
    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 MetricMetadataArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricMetadataArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricMetadataArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var metricMetadataResource = new Datadog.MetricMetadata("metricMetadataResource", new()
    {
        Metric = "string",
        Description = "string",
        PerUnit = "string",
        ShortName = "string",
        StatsdInterval = 0,
        Type = "string",
        Unit = "string",
    });
    
    example, err := datadog.NewMetricMetadata(ctx, "metricMetadataResource", &datadog.MetricMetadataArgs{
    	Metric:         pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	PerUnit:        pulumi.String("string"),
    	ShortName:      pulumi.String("string"),
    	StatsdInterval: pulumi.Int(0),
    	Type:           pulumi.String("string"),
    	Unit:           pulumi.String("string"),
    })
    
    var metricMetadataResource = new MetricMetadata("metricMetadataResource", MetricMetadataArgs.builder()
        .metric("string")
        .description("string")
        .perUnit("string")
        .shortName("string")
        .statsdInterval(0)
        .type("string")
        .unit("string")
        .build());
    
    metric_metadata_resource = datadog.MetricMetadata("metricMetadataResource",
        metric="string",
        description="string",
        per_unit="string",
        short_name="string",
        statsd_interval=0,
        type="string",
        unit="string")
    
    const metricMetadataResource = new datadog.MetricMetadata("metricMetadataResource", {
        metric: "string",
        description: "string",
        perUnit: "string",
        shortName: "string",
        statsdInterval: 0,
        type: "string",
        unit: "string",
    });
    
    type: datadog:MetricMetadata
    properties:
        description: string
        metric: string
        perUnit: string
        shortName: string
        statsdInterval: 0
        type: string
        unit: string
    

    MetricMetadata Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The MetricMetadata resource accepts the following input properties:

    Metric string
    The name of the metric.
    Description string
    A description of the metric.
    PerUnit string
    Per unit of the metric such as second in bytes per second.
    ShortName string
    A short name of the metric.
    StatsdInterval int
    If applicable, statsd flush interval in seconds for the metric.
    Type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    Unit string
    Primary unit of the metric such as byte or operation.
    Metric string
    The name of the metric.
    Description string
    A description of the metric.
    PerUnit string
    Per unit of the metric such as second in bytes per second.
    ShortName string
    A short name of the metric.
    StatsdInterval int
    If applicable, statsd flush interval in seconds for the metric.
    Type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    Unit string
    Primary unit of the metric such as byte or operation.
    metric String
    The name of the metric.
    description String
    A description of the metric.
    perUnit String
    Per unit of the metric such as second in bytes per second.
    shortName String
    A short name of the metric.
    statsdInterval Integer
    If applicable, statsd flush interval in seconds for the metric.
    type String
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit String
    Primary unit of the metric such as byte or operation.
    metric string
    The name of the metric.
    description string
    A description of the metric.
    perUnit string
    Per unit of the metric such as second in bytes per second.
    shortName string
    A short name of the metric.
    statsdInterval number
    If applicable, statsd flush interval in seconds for the metric.
    type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit string
    Primary unit of the metric such as byte or operation.
    metric str
    The name of the metric.
    description str
    A description of the metric.
    per_unit str
    Per unit of the metric such as second in bytes per second.
    short_name str
    A short name of the metric.
    statsd_interval int
    If applicable, statsd flush interval in seconds for the metric.
    type str
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit str
    Primary unit of the metric such as byte or operation.
    metric String
    The name of the metric.
    description String
    A description of the metric.
    perUnit String
    Per unit of the metric such as second in bytes per second.
    shortName String
    A short name of the metric.
    statsdInterval Number
    If applicable, statsd flush interval in seconds for the metric.
    type String
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit String
    Primary unit of the metric such as byte or operation.

    Outputs

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

    Get an existing MetricMetadata 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?: MetricMetadataState, opts?: CustomResourceOptions): MetricMetadata
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            metric: Optional[str] = None,
            per_unit: Optional[str] = None,
            short_name: Optional[str] = None,
            statsd_interval: Optional[int] = None,
            type: Optional[str] = None,
            unit: Optional[str] = None) -> MetricMetadata
    func GetMetricMetadata(ctx *Context, name string, id IDInput, state *MetricMetadataState, opts ...ResourceOption) (*MetricMetadata, error)
    public static MetricMetadata Get(string name, Input<string> id, MetricMetadataState? state, CustomResourceOptions? opts = null)
    public static MetricMetadata get(String name, Output<String> id, MetricMetadataState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Description string
    A description of the metric.
    Metric string
    The name of the metric.
    PerUnit string
    Per unit of the metric such as second in bytes per second.
    ShortName string
    A short name of the metric.
    StatsdInterval int
    If applicable, statsd flush interval in seconds for the metric.
    Type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    Unit string
    Primary unit of the metric such as byte or operation.
    Description string
    A description of the metric.
    Metric string
    The name of the metric.
    PerUnit string
    Per unit of the metric such as second in bytes per second.
    ShortName string
    A short name of the metric.
    StatsdInterval int
    If applicable, statsd flush interval in seconds for the metric.
    Type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    Unit string
    Primary unit of the metric such as byte or operation.
    description String
    A description of the metric.
    metric String
    The name of the metric.
    perUnit String
    Per unit of the metric such as second in bytes per second.
    shortName String
    A short name of the metric.
    statsdInterval Integer
    If applicable, statsd flush interval in seconds for the metric.
    type String
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit String
    Primary unit of the metric such as byte or operation.
    description string
    A description of the metric.
    metric string
    The name of the metric.
    perUnit string
    Per unit of the metric such as second in bytes per second.
    shortName string
    A short name of the metric.
    statsdInterval number
    If applicable, statsd flush interval in seconds for the metric.
    type string
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit string
    Primary unit of the metric such as byte or operation.
    description str
    A description of the metric.
    metric str
    The name of the metric.
    per_unit str
    Per unit of the metric such as second in bytes per second.
    short_name str
    A short name of the metric.
    statsd_interval int
    If applicable, statsd flush interval in seconds for the metric.
    type str
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit str
    Primary unit of the metric such as byte or operation.
    description String
    A description of the metric.
    metric String
    The name of the metric.
    perUnit String
    Per unit of the metric such as second in bytes per second.
    shortName String
    A short name of the metric.
    statsdInterval Number
    If applicable, statsd flush interval in seconds for the metric.
    type String
    Metric type such as count, gauge, or rate. Updating a metric of type distribution is not supported. If you would like to see the distribution type returned, contact Datadog support.
    unit String
    Primary unit of the metric such as byte or operation.

    Import

    $ pulumi import datadog:index/metricMetadata:MetricMetadata request_time request.time
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.28.1 published on Monday, Jun 24, 2024 by Pulumi