1. Packages
  2. Datadog Provider
  3. API Docs
  4. RumRetentionFilter
Datadog v4.49.1 published on Saturday, Apr 26, 2025 by Pulumi

datadog.RumRetentionFilter

Explore with Pulumi AI

datadog logo
Datadog v4.49.1 published on Saturday, Apr 26, 2025 by Pulumi

    Provides a Datadog RumRetentionFilter resource. This can be used to create and manage Datadog rum_retention_filter.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Create new rum_retention_filter resource
    const testingRumRetentionFilter = new datadog.RumRetentionFilter("testing_rum_retention_filter", {
        applicationId: "<APPLICATION_ID>",
        name: "testing.rum.retention_filter",
        eventType: "session",
        sampleRate: 41,
        query: "@session.has_replay:true",
        enabled: false,
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Create new rum_retention_filter resource
    testing_rum_retention_filter = datadog.RumRetentionFilter("testing_rum_retention_filter",
        application_id="<APPLICATION_ID>",
        name="testing.rum.retention_filter",
        event_type="session",
        sample_rate=41,
        query="@session.has_replay:true",
        enabled=False)
    
    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 {
    		// Create new rum_retention_filter resource
    		_, err := datadog.NewRumRetentionFilter(ctx, "testing_rum_retention_filter", &datadog.RumRetentionFilterArgs{
    			ApplicationId: pulumi.String("<APPLICATION_ID>"),
    			Name:          pulumi.String("testing.rum.retention_filter"),
    			EventType:     pulumi.String("session"),
    			SampleRate:    pulumi.Int(41),
    			Query:         pulumi.String("@session.has_replay:true"),
    			Enabled:       pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        // Create new rum_retention_filter resource
        var testingRumRetentionFilter = new Datadog.RumRetentionFilter("testing_rum_retention_filter", new()
        {
            ApplicationId = "<APPLICATION_ID>",
            Name = "testing.rum.retention_filter",
            EventType = "session",
            SampleRate = 41,
            Query = "@session.has_replay:true",
            Enabled = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.RumRetentionFilter;
    import com.pulumi.datadog.RumRetentionFilterArgs;
    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_retention_filter resource
            var testingRumRetentionFilter = new RumRetentionFilter("testingRumRetentionFilter", RumRetentionFilterArgs.builder()
                .applicationId("<APPLICATION_ID>")
                .name("testing.rum.retention_filter")
                .eventType("session")
                .sampleRate(41)
                .query("@session.has_replay:true")
                .enabled(false)
                .build());
    
        }
    }
    
    resources:
      # Create new rum_retention_filter resource
      testingRumRetentionFilter:
        type: datadog:RumRetentionFilter
        name: testing_rum_retention_filter
        properties:
          applicationId: <APPLICATION_ID>
          name: testing.rum.retention_filter
          eventType: session
          sampleRate: 41
          query: '@session.has_replay:true'
          enabled: false
    

    Create RumRetentionFilter Resource

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

    Constructor syntax

    new RumRetentionFilter(name: string, args: RumRetentionFilterArgs, opts?: CustomResourceOptions);
    @overload
    def RumRetentionFilter(resource_name: str,
                           args: RumRetentionFilterArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def RumRetentionFilter(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           application_id: Optional[str] = None,
                           event_type: Optional[str] = None,
                           name: Optional[str] = None,
                           sample_rate: Optional[int] = None,
                           enabled: Optional[bool] = None,
                           query: Optional[str] = None)
    func NewRumRetentionFilter(ctx *Context, name string, args RumRetentionFilterArgs, opts ...ResourceOption) (*RumRetentionFilter, error)
    public RumRetentionFilter(string name, RumRetentionFilterArgs args, CustomResourceOptions? opts = null)
    public RumRetentionFilter(String name, RumRetentionFilterArgs args)
    public RumRetentionFilter(String name, RumRetentionFilterArgs args, CustomResourceOptions options)
    
    type: datadog:RumRetentionFilter
    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 RumRetentionFilterArgs
    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 RumRetentionFilterArgs
    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 RumRetentionFilterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RumRetentionFilterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RumRetentionFilterArgs
    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 rumRetentionFilterResource = new Datadog.RumRetentionFilter("rumRetentionFilterResource", new()
    {
        ApplicationId = "string",
        EventType = "string",
        Name = "string",
        SampleRate = 0,
        Enabled = false,
        Query = "string",
    });
    
    example, err := datadog.NewRumRetentionFilter(ctx, "rumRetentionFilterResource", &datadog.RumRetentionFilterArgs{
    	ApplicationId: pulumi.String("string"),
    	EventType:     pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	SampleRate:    pulumi.Int(0),
    	Enabled:       pulumi.Bool(false),
    	Query:         pulumi.String("string"),
    })
    
    var rumRetentionFilterResource = new RumRetentionFilter("rumRetentionFilterResource", RumRetentionFilterArgs.builder()
        .applicationId("string")
        .eventType("string")
        .name("string")
        .sampleRate(0)
        .enabled(false)
        .query("string")
        .build());
    
    rum_retention_filter_resource = datadog.RumRetentionFilter("rumRetentionFilterResource",
        application_id="string",
        event_type="string",
        name="string",
        sample_rate=0,
        enabled=False,
        query="string")
    
    const rumRetentionFilterResource = new datadog.RumRetentionFilter("rumRetentionFilterResource", {
        applicationId: "string",
        eventType: "string",
        name: "string",
        sampleRate: 0,
        enabled: false,
        query: "string",
    });
    
    type: datadog:RumRetentionFilter
    properties:
        applicationId: string
        enabled: false
        eventType: string
        name: string
        query: string
        sampleRate: 0
    

    RumRetentionFilter 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 RumRetentionFilter resource accepts the following input properties:

    ApplicationId string
    RUM application ID.
    EventType string
    The type of RUM events to filter on.
    Name string
    The name of a RUM retention filter.
    SampleRate int
    The sample rate for a RUM retention filter, between 0 and 100.
    Enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    Query string
    The Query string for a RUM retention filter. Defaults to "".
    ApplicationId string
    RUM application ID.
    EventType string
    The type of RUM events to filter on.
    Name string
    The name of a RUM retention filter.
    SampleRate int
    The sample rate for a RUM retention filter, between 0 and 100.
    Enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    Query string
    The Query string for a RUM retention filter. Defaults to "".
    applicationId String
    RUM application ID.
    eventType String
    The type of RUM events to filter on.
    name String
    The name of a RUM retention filter.
    sampleRate Integer
    The sample rate for a RUM retention filter, between 0 and 100.
    enabled Boolean
    Whether the retention filter is to be enabled. Defaults to true.
    query String
    The Query string for a RUM retention filter. Defaults to "".
    applicationId string
    RUM application ID.
    eventType string
    The type of RUM events to filter on.
    name string
    The name of a RUM retention filter.
    sampleRate number
    The sample rate for a RUM retention filter, between 0 and 100.
    enabled boolean
    Whether the retention filter is to be enabled. Defaults to true.
    query string
    The Query string for a RUM retention filter. Defaults to "".
    application_id str
    RUM application ID.
    event_type str
    The type of RUM events to filter on.
    name str
    The name of a RUM retention filter.
    sample_rate int
    The sample rate for a RUM retention filter, between 0 and 100.
    enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    query str
    The Query string for a RUM retention filter. Defaults to "".
    applicationId String
    RUM application ID.
    eventType String
    The type of RUM events to filter on.
    name String
    The name of a RUM retention filter.
    sampleRate Number
    The sample rate for a RUM retention filter, between 0 and 100.
    enabled Boolean
    Whether the retention filter is to be enabled. Defaults to true.
    query String
    The Query string for a RUM retention filter. Defaults to "".

    Outputs

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

    Get an existing RumRetentionFilter 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?: RumRetentionFilterState, opts?: CustomResourceOptions): RumRetentionFilter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            enabled: Optional[bool] = None,
            event_type: Optional[str] = None,
            name: Optional[str] = None,
            query: Optional[str] = None,
            sample_rate: Optional[int] = None) -> RumRetentionFilter
    func GetRumRetentionFilter(ctx *Context, name string, id IDInput, state *RumRetentionFilterState, opts ...ResourceOption) (*RumRetentionFilter, error)
    public static RumRetentionFilter Get(string name, Input<string> id, RumRetentionFilterState? state, CustomResourceOptions? opts = null)
    public static RumRetentionFilter get(String name, Output<String> id, RumRetentionFilterState state, CustomResourceOptions options)
    resources:  _:    type: datadog:RumRetentionFilter    get:      id: ${id}
    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:
    ApplicationId string
    RUM application ID.
    Enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    EventType string
    The type of RUM events to filter on.
    Name string
    The name of a RUM retention filter.
    Query string
    The Query string for a RUM retention filter. Defaults to "".
    SampleRate int
    The sample rate for a RUM retention filter, between 0 and 100.
    ApplicationId string
    RUM application ID.
    Enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    EventType string
    The type of RUM events to filter on.
    Name string
    The name of a RUM retention filter.
    Query string
    The Query string for a RUM retention filter. Defaults to "".
    SampleRate int
    The sample rate for a RUM retention filter, between 0 and 100.
    applicationId String
    RUM application ID.
    enabled Boolean
    Whether the retention filter is to be enabled. Defaults to true.
    eventType String
    The type of RUM events to filter on.
    name String
    The name of a RUM retention filter.
    query String
    The Query string for a RUM retention filter. Defaults to "".
    sampleRate Integer
    The sample rate for a RUM retention filter, between 0 and 100.
    applicationId string
    RUM application ID.
    enabled boolean
    Whether the retention filter is to be enabled. Defaults to true.
    eventType string
    The type of RUM events to filter on.
    name string
    The name of a RUM retention filter.
    query string
    The Query string for a RUM retention filter. Defaults to "".
    sampleRate number
    The sample rate for a RUM retention filter, between 0 and 100.
    application_id str
    RUM application ID.
    enabled bool
    Whether the retention filter is to be enabled. Defaults to true.
    event_type str
    The type of RUM events to filter on.
    name str
    The name of a RUM retention filter.
    query str
    The Query string for a RUM retention filter. Defaults to "".
    sample_rate int
    The sample rate for a RUM retention filter, between 0 and 100.
    applicationId String
    RUM application ID.
    enabled Boolean
    Whether the retention filter is to be enabled. Defaults to true.
    eventType String
    The type of RUM events to filter on.
    name String
    The name of a RUM retention filter.
    query String
    The Query string for a RUM retention filter. Defaults to "".
    sampleRate Number
    The sample rate for a RUM retention filter, between 0 and 100.

    Import

    $ pulumi import datadog:index/rumRetentionFilter:RumRetentionFilter testing_rum_retention_filter "<application_id>:<retention_filter_id>"
    

    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.49.1 published on Saturday, Apr 26, 2025 by Pulumi