1. Packages
  2. Datadog Provider
  3. API Docs
  4. RumMetric
Datadog v4.48.1 published on Saturday, Apr 5, 2025 by Pulumi

datadog.RumMetric

Explore with Pulumi AI

Provides a Datadog RumMetric resource. This can be used to create and manage Datadog rum_metric.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.RumMetric;
import com.pulumi.datadog.RumMetricArgs;
import com.pulumi.datadog.inputs.RumMetricGroupByArgs;
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) {
        // Create new rum_metric resource
        var testingRumMetric = new RumMetric("testingRumMetric", RumMetricArgs.builder()
            .name("testing.rum.metric")
            .compute(RumMetricComputeArgs.builder()
                .aggregationType("distribution")
                .includePercentiles(true)
                .path("@duration")
                .build())
            .eventType("session")
            .filter(RumMetricFilterArgs.builder()
                .query("@service:web-ui")
                .build())
            .groupBies(RumMetricGroupByArgs.builder()
                .path("@browser.name")
                .tagName("browser_name")
                .build())
            .uniqueness(RumMetricUniquenessArgs.builder()
                .when("match")
                .build())
            .build());

    }
}
Copy
resources:
  # Create new rum_metric resource
  testingRumMetric:
    type: datadog:RumMetric
    name: testing_rum_metric
    properties:
      name: testing.rum.metric
      compute:
        - aggregationType: distribution
          includePercentiles: true
          path: '@duration'
      eventType: session
      filter:
        - query: '@service:web-ui'
      groupBies:
        - path: '@browser.name'
          tagName: browser_name
      uniqueness:
        - when: match
Copy

Create RumMetric Resource

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

Constructor syntax

new RumMetric(name: string, args: RumMetricArgs, opts?: CustomResourceOptions);
@overload
def RumMetric(resource_name: str,
              args: RumMetricArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def RumMetric(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              event_type: Optional[str] = None,
              name: Optional[str] = None,
              compute: Optional[RumMetricComputeArgs] = None,
              filter: Optional[RumMetricFilterArgs] = None,
              group_bies: Optional[Sequence[RumMetricGroupByArgs]] = None,
              uniqueness: Optional[RumMetricUniquenessArgs] = None)
func NewRumMetric(ctx *Context, name string, args RumMetricArgs, opts ...ResourceOption) (*RumMetric, error)
public RumMetric(string name, RumMetricArgs args, CustomResourceOptions? opts = null)
public RumMetric(String name, RumMetricArgs args)
public RumMetric(String name, RumMetricArgs args, CustomResourceOptions options)
type: datadog:RumMetric
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RumMetricArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RumMetricArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RumMetricArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RumMetricArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RumMetricArgs
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 rumMetricResource = new Datadog.RumMetric("rumMetricResource", new()
{
    EventType = "string",
    Name = "string",
    Compute = new Datadog.Inputs.RumMetricComputeArgs
    {
        AggregationType = "string",
        IncludePercentiles = false,
        Path = "string",
    },
    Filter = new Datadog.Inputs.RumMetricFilterArgs
    {
        Query = "string",
    },
    GroupBies = new[]
    {
        new Datadog.Inputs.RumMetricGroupByArgs
        {
            Path = "string",
            TagName = "string",
        },
    },
    Uniqueness = new Datadog.Inputs.RumMetricUniquenessArgs
    {
        When = "string",
    },
});
Copy
example, err := datadog.NewRumMetric(ctx, "rumMetricResource", &datadog.RumMetricArgs{
	EventType: pulumi.String("string"),
	Name:      pulumi.String("string"),
	Compute: &datadog.RumMetricComputeArgs{
		AggregationType:    pulumi.String("string"),
		IncludePercentiles: pulumi.Bool(false),
		Path:               pulumi.String("string"),
	},
	Filter: &datadog.RumMetricFilterArgs{
		Query: pulumi.String("string"),
	},
	GroupBies: datadog.RumMetricGroupByArray{
		&datadog.RumMetricGroupByArgs{
			Path:    pulumi.String("string"),
			TagName: pulumi.String("string"),
		},
	},
	Uniqueness: &datadog.RumMetricUniquenessArgs{
		When: pulumi.String("string"),
	},
})
Copy
var rumMetricResource = new RumMetric("rumMetricResource", RumMetricArgs.builder()
    .eventType("string")
    .name("string")
    .compute(RumMetricComputeArgs.builder()
        .aggregationType("string")
        .includePercentiles(false)
        .path("string")
        .build())
    .filter(RumMetricFilterArgs.builder()
        .query("string")
        .build())
    .groupBies(RumMetricGroupByArgs.builder()
        .path("string")
        .tagName("string")
        .build())
    .uniqueness(RumMetricUniquenessArgs.builder()
        .when("string")
        .build())
    .build());
Copy
rum_metric_resource = datadog.RumMetric("rumMetricResource",
    event_type="string",
    name="string",
    compute={
        "aggregation_type": "string",
        "include_percentiles": False,
        "path": "string",
    },
    filter={
        "query": "string",
    },
    group_bies=[{
        "path": "string",
        "tag_name": "string",
    }],
    uniqueness={
        "when": "string",
    })
Copy
const rumMetricResource = new datadog.RumMetric("rumMetricResource", {
    eventType: "string",
    name: "string",
    compute: {
        aggregationType: "string",
        includePercentiles: false,
        path: "string",
    },
    filter: {
        query: "string",
    },
    groupBies: [{
        path: "string",
        tagName: "string",
    }],
    uniqueness: {
        when: "string",
    },
});
Copy
type: datadog:RumMetric
properties:
    compute:
        aggregationType: string
        includePercentiles: false
        path: string
    eventType: string
    filter:
        query: string
    groupBies:
        - path: string
          tagName: string
    name: string
    uniqueness:
        when: string
Copy

RumMetric Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RumMetric resource accepts the following input properties:

EventType This property is required. string
The type of RUM events to filter on.
Name This property is required. string
The name of the RUM-based metric. This field can't be updated after creation.
Compute RumMetricCompute
Filter RumMetricFilter
GroupBies List<RumMetricGroupBy>
Uniqueness RumMetricUniqueness
EventType This property is required. string
The type of RUM events to filter on.
Name This property is required. string
The name of the RUM-based metric. This field can't be updated after creation.
Compute RumMetricComputeArgs
Filter RumMetricFilterArgs
GroupBies []RumMetricGroupByArgs
Uniqueness RumMetricUniquenessArgs
eventType This property is required. String
The type of RUM events to filter on.
name This property is required. String
The name of the RUM-based metric. This field can't be updated after creation.
compute RumMetricCompute
filter RumMetricFilter
groupBies List<RumMetricGroupBy>
uniqueness RumMetricUniqueness
eventType This property is required. string
The type of RUM events to filter on.
name This property is required. string
The name of the RUM-based metric. This field can't be updated after creation.
compute RumMetricCompute
filter RumMetricFilter
groupBies RumMetricGroupBy[]
uniqueness RumMetricUniqueness
event_type This property is required. str
The type of RUM events to filter on.
name This property is required. str
The name of the RUM-based metric. This field can't be updated after creation.
compute RumMetricComputeArgs
filter RumMetricFilterArgs
group_bies Sequence[RumMetricGroupByArgs]
uniqueness RumMetricUniquenessArgs
eventType This property is required. String
The type of RUM events to filter on.
name This property is required. String
The name of the RUM-based metric. This field can't be updated after creation.
compute Property Map
filter Property Map
groupBies List<Property Map>
uniqueness Property Map

Outputs

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

Get an existing RumMetric 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?: RumMetricState, opts?: CustomResourceOptions): RumMetric
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compute: Optional[RumMetricComputeArgs] = None,
        event_type: Optional[str] = None,
        filter: Optional[RumMetricFilterArgs] = None,
        group_bies: Optional[Sequence[RumMetricGroupByArgs]] = None,
        name: Optional[str] = None,
        uniqueness: Optional[RumMetricUniquenessArgs] = None) -> RumMetric
func GetRumMetric(ctx *Context, name string, id IDInput, state *RumMetricState, opts ...ResourceOption) (*RumMetric, error)
public static RumMetric Get(string name, Input<string> id, RumMetricState? state, CustomResourceOptions? opts = null)
public static RumMetric get(String name, Output<String> id, RumMetricState state, CustomResourceOptions options)
resources:  _:    type: datadog:RumMetric    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Compute RumMetricCompute
EventType string
The type of RUM events to filter on.
Filter RumMetricFilter
GroupBies List<RumMetricGroupBy>
Name string
The name of the RUM-based metric. This field can't be updated after creation.
Uniqueness RumMetricUniqueness
Compute RumMetricComputeArgs
EventType string
The type of RUM events to filter on.
Filter RumMetricFilterArgs
GroupBies []RumMetricGroupByArgs
Name string
The name of the RUM-based metric. This field can't be updated after creation.
Uniqueness RumMetricUniquenessArgs
compute RumMetricCompute
eventType String
The type of RUM events to filter on.
filter RumMetricFilter
groupBies List<RumMetricGroupBy>
name String
The name of the RUM-based metric. This field can't be updated after creation.
uniqueness RumMetricUniqueness
compute RumMetricCompute
eventType string
The type of RUM events to filter on.
filter RumMetricFilter
groupBies RumMetricGroupBy[]
name string
The name of the RUM-based metric. This field can't be updated after creation.
uniqueness RumMetricUniqueness
compute RumMetricComputeArgs
event_type str
The type of RUM events to filter on.
filter RumMetricFilterArgs
group_bies Sequence[RumMetricGroupByArgs]
name str
The name of the RUM-based metric. This field can't be updated after creation.
uniqueness RumMetricUniquenessArgs
compute Property Map
eventType String
The type of RUM events to filter on.
filter Property Map
groupBies List<Property Map>
name String
The name of the RUM-based metric. This field can't be updated after creation.
uniqueness Property Map

Supporting Types

RumMetricCompute
, RumMetricComputeArgs

AggregationType This property is required. string
The type of aggregation to use.
IncludePercentiles bool
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
Path string
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.
AggregationType This property is required. string
The type of aggregation to use.
IncludePercentiles bool
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
Path string
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.
aggregationType This property is required. String
The type of aggregation to use.
includePercentiles Boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
path String
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.
aggregationType This property is required. string
The type of aggregation to use.
includePercentiles boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
path string
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.
aggregation_type This property is required. str
The type of aggregation to use.
include_percentiles bool
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
path str
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.
aggregationType This property is required. String
The type of aggregation to use.
includePercentiles Boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregation_type is distribution.
path String
The path to the value the RUM-based metric will aggregate on. Only present when aggregation_type is distribution.

RumMetricFilter
, RumMetricFilterArgs

Query string
The search query. Follows RUM search syntax.
Query string
The search query. Follows RUM search syntax.
query String
The search query. Follows RUM search syntax.
query string
The search query. Follows RUM search syntax.
query str
The search query. Follows RUM search syntax.
query String
The search query. Follows RUM search syntax.

RumMetricGroupBy
, RumMetricGroupByArgs

Path string
The path to the value the RUM-based metric will be aggregated over.
TagName string
Name of the tag that gets created. By default, path is used as the tag name.
Path string
The path to the value the RUM-based metric will be aggregated over.
TagName string
Name of the tag that gets created. By default, path is used as the tag name.
path String
The path to the value the RUM-based metric will be aggregated over.
tagName String
Name of the tag that gets created. By default, path is used as the tag name.
path string
The path to the value the RUM-based metric will be aggregated over.
tagName string
Name of the tag that gets created. By default, path is used as the tag name.
path str
The path to the value the RUM-based metric will be aggregated over.
tag_name str
Name of the tag that gets created. By default, path is used as the tag name.
path String
The path to the value the RUM-based metric will be aggregated over.
tagName String
Name of the tag that gets created. By default, path is used as the tag name.

RumMetricUniqueness
, RumMetricUniquenessArgs

When string
When to count updatable events. match when the event is first seen, or end when the event is complete.
When string
When to count updatable events. match when the event is first seen, or end when the event is complete.
when String
When to count updatable events. match when the event is first seen, or end when the event is complete.
when string
When to count updatable events. match when the event is first seen, or end when the event is complete.
when str
When to count updatable events. match when the event is first seen, or end when the event is complete.
when String
When to count updatable events. match when the event is first seen, or end when the event is complete.

Import

$ pulumi import datadog:index/rumMetric:RumMetric testing_rum_metric "testing.rum.metric"
Copy

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.