1. Packages
  2. Datadog Provider
  3. API Docs
  4. Dataset
Datadog v4.55.0 published on Friday, Sep 5, 2025 by Pulumi

datadog.Dataset

Explore with Pulumi AI

datadog logo
Datadog v4.55.0 published on Friday, Sep 5, 2025 by Pulumi

    Provides a Datadog Dataset resource. This can be used to create and manage Datadog datasets.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    // Create new dataset resource
    const foo = new datadog.Dataset("foo", {
        name: "HR Dataset",
        principals: ["role:00000000-0000-1111-0000-000000000000"],
        productFilters: [{
            product: "rum",
            filters: ["@application.id:123"],
        }],
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    # Create new dataset resource
    foo = datadog.Dataset("foo",
        name="HR Dataset",
        principals=["role:00000000-0000-1111-0000-000000000000"],
        product_filters=[{
            "product": "rum",
            "filters": ["@application.id:123"],
        }])
    
    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 dataset resource
    		_, err := datadog.NewDataset(ctx, "foo", &datadog.DatasetArgs{
    			Name: pulumi.String("HR Dataset"),
    			Principals: pulumi.StringArray{
    				pulumi.String("role:00000000-0000-1111-0000-000000000000"),
    			},
    			ProductFilters: datadog.DatasetProductFilterArray{
    				&datadog.DatasetProductFilterArgs{
    					Product: pulumi.String("rum"),
    					Filters: pulumi.StringArray{
    						pulumi.String("@application.id:123"),
    					},
    				},
    			},
    		})
    		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 dataset resource
        var foo = new Datadog.Dataset("foo", new()
        {
            Name = "HR Dataset",
            Principals = new[]
            {
                "role:00000000-0000-1111-0000-000000000000",
            },
            ProductFilters = new[]
            {
                new Datadog.Inputs.DatasetProductFilterArgs
                {
                    Product = "rum",
                    Filters = new[]
                    {
                        "@application.id:123",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.Dataset;
    import com.pulumi.datadog.DatasetArgs;
    import com.pulumi.datadog.inputs.DatasetProductFilterArgs;
    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 dataset resource
            var foo = new Dataset("foo", DatasetArgs.builder()
                .name("HR Dataset")
                .principals("role:00000000-0000-1111-0000-000000000000")
                .productFilters(DatasetProductFilterArgs.builder()
                    .product("rum")
                    .filters("@application.id:123")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Create new dataset resource
      foo:
        type: datadog:Dataset
        properties:
          name: HR Dataset
          principals:
            - role:00000000-0000-1111-0000-000000000000
          productFilters:
            - product: rum
              filters:
                - '@application.id:123'
    

    Create Dataset Resource

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

    Constructor syntax

    new Dataset(name: string, args: DatasetArgs, opts?: CustomResourceOptions);
    @overload
    def Dataset(resource_name: str,
                args: DatasetArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Dataset(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                name: Optional[str] = None,
                principals: Optional[Sequence[str]] = None,
                product_filters: Optional[Sequence[DatasetProductFilterArgs]] = None)
    func NewDataset(ctx *Context, name string, args DatasetArgs, opts ...ResourceOption) (*Dataset, error)
    public Dataset(string name, DatasetArgs args, CustomResourceOptions? opts = null)
    public Dataset(String name, DatasetArgs args)
    public Dataset(String name, DatasetArgs args, CustomResourceOptions options)
    
    type: datadog:Dataset
    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 DatasetArgs
    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 DatasetArgs
    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 DatasetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatasetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatasetArgs
    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 datasetResource = new Datadog.Dataset("datasetResource", new()
    {
        Name = "string",
        Principals = new[]
        {
            "string",
        },
        ProductFilters = new[]
        {
            new Datadog.Inputs.DatasetProductFilterArgs
            {
                Filters = new[]
                {
                    "string",
                },
                Product = "string",
            },
        },
    });
    
    example, err := datadog.NewDataset(ctx, "datasetResource", &datadog.DatasetArgs{
    	Name: pulumi.String("string"),
    	Principals: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProductFilters: datadog.DatasetProductFilterArray{
    		&datadog.DatasetProductFilterArgs{
    			Filters: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Product: pulumi.String("string"),
    		},
    	},
    })
    
    var datasetResource = new Dataset("datasetResource", DatasetArgs.builder()
        .name("string")
        .principals("string")
        .productFilters(DatasetProductFilterArgs.builder()
            .filters("string")
            .product("string")
            .build())
        .build());
    
    dataset_resource = datadog.Dataset("datasetResource",
        name="string",
        principals=["string"],
        product_filters=[{
            "filters": ["string"],
            "product": "string",
        }])
    
    const datasetResource = new datadog.Dataset("datasetResource", {
        name: "string",
        principals: ["string"],
        productFilters: [{
            filters: ["string"],
            product: "string",
        }],
    });
    
    type: datadog:Dataset
    properties:
        name: string
        principals:
            - string
        productFilters:
            - filters:
                - string
              product: string
    

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

    Name string
    The name of the dataset.
    Principals List<string>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    ProductFilters List<DatasetProductFilter>
    Name string
    The name of the dataset.
    Principals []string
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    ProductFilters []DatasetProductFilterArgs
    name String
    The name of the dataset.
    principals List<String>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters List<DatasetProductFilter>
    name string
    The name of the dataset.
    principals string[]
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters DatasetProductFilter[]
    name str
    The name of the dataset.
    principals Sequence[str]
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    product_filters Sequence[DatasetProductFilterArgs]
    name String
    The name of the dataset.
    principals List<String>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Dataset resource produces the following output properties:

    CreatedAt string
    Indicates when the dataset was created (in ISO 8601).
    CreatedBy string
    Indicates who created the dataset.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt string
    Indicates when the dataset was created (in ISO 8601).
    CreatedBy string
    Indicates who created the dataset.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt String
    Indicates when the dataset was created (in ISO 8601).
    createdBy String
    Indicates who created the dataset.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt string
    Indicates when the dataset was created (in ISO 8601).
    createdBy string
    Indicates who created the dataset.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at str
    Indicates when the dataset was created (in ISO 8601).
    created_by str
    Indicates who created the dataset.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt String
    Indicates when the dataset was created (in ISO 8601).
    createdBy String
    Indicates who created the dataset.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Dataset Resource

    Get an existing Dataset 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?: DatasetState, opts?: CustomResourceOptions): Dataset
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            name: Optional[str] = None,
            principals: Optional[Sequence[str]] = None,
            product_filters: Optional[Sequence[DatasetProductFilterArgs]] = None) -> Dataset
    func GetDataset(ctx *Context, name string, id IDInput, state *DatasetState, opts ...ResourceOption) (*Dataset, error)
    public static Dataset Get(string name, Input<string> id, DatasetState? state, CustomResourceOptions? opts = null)
    public static Dataset get(String name, Output<String> id, DatasetState state, CustomResourceOptions options)
    resources:  _:    type: datadog:Dataset    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:
    CreatedAt string
    Indicates when the dataset was created (in ISO 8601).
    CreatedBy string
    Indicates who created the dataset.
    Name string
    The name of the dataset.
    Principals List<string>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    ProductFilters List<DatasetProductFilter>
    CreatedAt string
    Indicates when the dataset was created (in ISO 8601).
    CreatedBy string
    Indicates who created the dataset.
    Name string
    The name of the dataset.
    Principals []string
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    ProductFilters []DatasetProductFilterArgs
    createdAt String
    Indicates when the dataset was created (in ISO 8601).
    createdBy String
    Indicates who created the dataset.
    name String
    The name of the dataset.
    principals List<String>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters List<DatasetProductFilter>
    createdAt string
    Indicates when the dataset was created (in ISO 8601).
    createdBy string
    Indicates who created the dataset.
    name string
    The name of the dataset.
    principals string[]
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters DatasetProductFilter[]
    created_at str
    Indicates when the dataset was created (in ISO 8601).
    created_by str
    Indicates who created the dataset.
    name str
    The name of the dataset.
    principals Sequence[str]
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    product_filters Sequence[DatasetProductFilterArgs]
    createdAt String
    Indicates when the dataset was created (in ISO 8601).
    createdBy String
    Indicates who created the dataset.
    name String
    The name of the dataset.
    principals List<String>
    An array of principals. A principal is a subject or group of subjects. Each principal is formatted as type:id. Supported types: role and team.
    productFilters List<Property Map>

    Supporting Types

    DatasetProductFilter, DatasetProductFilterArgs

    Filters List<string>
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    Product string
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.
    Filters []string
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    Product string
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.
    filters List<String>
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    product String
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.
    filters string[]
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    product string
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.
    filters Sequence[str]
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    product str
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.
    filters List<String>
    A list of tag-based filters used to restrict access to the product type. Each filter is formatted as @tag.key:value.
    product String
    The product type of the dataset. Supported types: apm, rum, synthetics, metrics, logs, sd_repoinfo, error_tracking, cloud_cost, and ml_obs.

    Import

    The pulumi import command can be used, for example:

    $ pulumi import datadog:index/dataset:Dataset foo "<dataset_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.55.0 published on Friday, Sep 5, 2025 by Pulumi