MetricMetadata
Provides a Datadog metric_metadata resource. This can be used to manage a metric’s metadata.
Example Usage
using Pulumi;
using Datadog = Pulumi.Datadog;
class MyStack : Stack
{
public MyStack()
{
// Manage a Datadog metric's metadata
var requestTime = new Datadog.MetricMetadata("requestTime", new Datadog.MetricMetadataArgs
{
Description = "99th percentile request time in millseconds",
Metric = "request.time",
ShortName = "Request time",
Type = "gauge",
Unit = "millisecond",
});
}
}
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v2/go/datadog"
"github.com/pulumi/pulumi/sdk/v2/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 millseconds"),
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
})
}
import pulumi
import pulumi_datadog as datadog
# Manage a Datadog metric's metadata
request_time = datadog.MetricMetadata("requestTime",
description="99th percentile request time in millseconds",
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("request_time", {
description: "99th percentile request time in millseconds",
metric: "request.time",
shortName: "Request time",
type: "gauge",
unit: "millisecond",
});
Create a MetricMetadata Resource
new MetricMetadata(name: string, args: MetricMetadataArgs, opts?: CustomResourceOptions);
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)
func NewMetricMetadata(ctx *Context, name string, args MetricMetadataArgs, opts ...ResourceOption) (*MetricMetadata, error)
public MetricMetadata(string name, MetricMetadataArgs args, CustomResourceOptions? opts = null)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
MetricMetadata Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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
Type of the metric.
- 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
Type of the metric.
- 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
Type of the metric.
- 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
Type of the metric.
- unit str
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 str
- The provider-assigned unique ID for this managed resource.
Look up an 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)
- 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.
The following state arguments are supported:
- 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
Type of the metric.
- 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
Type of the metric.
- 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
Type of the metric.
- 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
Type of the metric.
- unit str
Primary unit of the metric such as
byte
oroperation
.
Package Details
- Repository
- https://github.com/pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.