datadog.MetricMetadata
Explore with Pulumi AI
Provides a Datadog metric_metadata resource. This can be used to manage a metric’s metadata.
Example Usage
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("requestTime", new()
{
Description = "99th percentile request time in milliseconds",
Metric = "request.time",
ShortName = "Request time",
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 {
_, err := datadog.NewMetricMetadata(ctx, "requestTime", &datadog.MetricMetadataArgs{
Description: pulumi.String("99th percentile request time in milliseconds"),
Metric: pulumi.String("request.time"),
ShortName: pulumi.String("Request time"),
Type: pulumi.String("gauge"),
Unit: pulumi.String("millisecond"),
})
if err != nil {
return err
}
return nil
})
}
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) {
var requestTime = new MetricMetadata("requestTime", MetricMetadataArgs.builder()
.description("99th percentile request time in milliseconds")
.metric("request.time")
.shortName("Request time")
.type("gauge")
.unit("millisecond")
.build());
}
}
import pulumi
import pulumi_datadog as datadog
# Manage a Datadog metric's metadata
request_time = datadog.MetricMetadata("requestTime",
description="99th percentile request time in milliseconds",
metric="request.time",
short_name="Request time",
type="gauge",
unit="millisecond")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Manage a Datadog metric's metadata
const requestTime = new datadog.MetricMetadata("requestTime", {
description: "99th percentile request time in milliseconds",
metric: "request.time",
shortName: "Request time",
type: "gauge",
unit: "millisecond",
});
resources:
# Manage a Datadog metric's metadata
requestTime:
type: datadog:MetricMetadata
properties:
description: 99th percentile request time in milliseconds
metric: request.time
shortName: Request time
type: gauge
unit: millisecond
Create MetricMetadata Resource
new MetricMetadata(name: string, args: MetricMetadataArgs, opts?: CustomResourceOptions);
@overload
def MetricMetadata(resource_name: 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)
@overload
def MetricMetadata(resource_name: str,
args: MetricMetadataArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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.
- Per
Unit string Per unit of the metric such as
second
inbytes per second
.- Short
Name string A short name of the metric.
- Statsd
Interval int If applicable, statsd flush interval in seconds for the metric.
- Type string
Metric type such as
gauge
orrate
.- Unit string
Primary unit of the metric such as
byte
oroperation
.
- Metric string
The name of the metric.
- Description string
A description of the metric.
- Per
Unit string Per unit of the metric such as
second
inbytes per second
.- Short
Name string A short name of the metric.
- Statsd
Interval int If applicable, statsd flush interval in seconds for the metric.
- Type string
Metric type such as
gauge
orrate
.- Unit string
Primary unit of the metric such as
byte
oroperation
.
- metric String
The name of the metric.
- description String
A description of the metric.
- per
Unit String Per unit of the metric such as
second
inbytes per second
.- short
Name String A short name of the metric.
- statsd
Interval Integer If applicable, statsd flush interval in seconds for the metric.
- type String
Metric type such as
gauge
orrate
.- unit String
Primary unit of the metric such as
byte
oroperation
.
- metric string
The name of the metric.
- description string
A description of the metric.
- per
Unit string Per unit of the metric such as
second
inbytes per second
.- short
Name string A short name of the metric.
- statsd
Interval number If applicable, statsd flush interval in seconds for the metric.
- type string
Metric type such as
gauge
orrate
.- unit string
Primary unit of the metric such as
byte
oroperation
.
- 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
inbytes 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
gauge
orrate
.- unit str
Primary unit of the metric such as
byte
oroperation
.
- metric String
The name of the metric.
- description String
A description of the metric.
- per
Unit String Per unit of the metric such as
second
inbytes per second
.- short
Name String A short name of the metric.
- statsd
Interval Number If applicable, statsd flush interval in seconds for the metric.
- type String
Metric type such as
gauge
orrate
.- unit String
Primary unit of the metric such as
byte
oroperation
.
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.
- Description string
A description of the metric.
- Metric string
The name of the metric.
- Per
Unit string Per unit of the metric such as
second
inbytes per second
.- Short
Name string A short name of the metric.
- Statsd
Interval int If applicable, statsd flush interval in seconds for the metric.
- Type string
Metric type such as
gauge
orrate
.- Unit string
Primary unit of the metric such as
byte
oroperation
.
- Description string
A description of the metric.
- Metric string
The name of the metric.
- Per
Unit string Per unit of the metric such as
second
inbytes per second
.- Short
Name string A short name of the metric.
- Statsd
Interval int If applicable, statsd flush interval in seconds for the metric.
- Type string
Metric type such as
gauge
orrate
.- Unit string
Primary unit of the metric such as
byte
oroperation
.
- description String
A description of the metric.
- metric String
The name of the metric.
- per
Unit String Per unit of the metric such as
second
inbytes per second
.- short
Name String A short name of the metric.
- statsd
Interval Integer If applicable, statsd flush interval in seconds for the metric.
- type String
Metric type such as
gauge
orrate
.- unit String
Primary unit of the metric such as
byte
oroperation
.
- description string
A description of the metric.
- metric string
The name of the metric.
- per
Unit string Per unit of the metric such as
second
inbytes per second
.- short
Name string A short name of the metric.
- statsd
Interval number If applicable, statsd flush interval in seconds for the metric.
- type string
Metric type such as
gauge
orrate
.- unit string
Primary unit of the metric such as
byte
oroperation
.
- 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
inbytes 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
gauge
orrate
.- unit str
Primary unit of the metric such as
byte
oroperation
.
- description String
A description of the metric.
- metric String
The name of the metric.
- per
Unit String Per unit of the metric such as
second
inbytes per second
.- short
Name String A short name of the metric.
- statsd
Interval Number If applicable, statsd flush interval in seconds for the metric.
- type String
Metric type such as
gauge
orrate
.- unit String
Primary unit of the metric such as
byte
oroperation
.
Import
$ pulumi import datadog:index/metricMetadata:MetricMetadata request_time request.time
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
datadog
Terraform Provider.