1. Packages
  2. Datadog Provider
  3. API Docs
  4. DomainAllowlist
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

datadog.DomainAllowlist

Explore with Pulumi AI

datadog logo
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

    Provides the Datadog Email Domain Allowlist resource. This can be used to manage the Datadog Email Domain Allowlist.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const example = new datadog.DomainAllowlist("example", {
        enabled: true,
        domains: ["@gmail.com"],
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    example = datadog.DomainAllowlist("example",
        enabled=True,
        domains=["@gmail.com"])
    
    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.NewDomainAllowlist(ctx, "example", &datadog.DomainAllowlistArgs{
    			Enabled: pulumi.Bool(true),
    			Domains: pulumi.StringArray{
    				pulumi.String("@gmail.com"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Datadog.DomainAllowlist("example", new()
        {
            Enabled = true,
            Domains = new[]
            {
                "@gmail.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DomainAllowlist;
    import com.pulumi.datadog.DomainAllowlistArgs;
    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 example = new DomainAllowlist("example", DomainAllowlistArgs.builder()
                .enabled(true)
                .domains("@gmail.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: datadog:DomainAllowlist
        properties:
          enabled: true
          domains:
            - '@gmail.com'
    

    Create DomainAllowlist Resource

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

    Constructor syntax

    new DomainAllowlist(name: string, args: DomainAllowlistArgs, opts?: CustomResourceOptions);
    @overload
    def DomainAllowlist(resource_name: str,
                        args: DomainAllowlistArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainAllowlist(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        domains: Optional[Sequence[str]] = None,
                        enabled: Optional[bool] = None)
    func NewDomainAllowlist(ctx *Context, name string, args DomainAllowlistArgs, opts ...ResourceOption) (*DomainAllowlist, error)
    public DomainAllowlist(string name, DomainAllowlistArgs args, CustomResourceOptions? opts = null)
    public DomainAllowlist(String name, DomainAllowlistArgs args)
    public DomainAllowlist(String name, DomainAllowlistArgs args, CustomResourceOptions options)
    
    type: datadog:DomainAllowlist
    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 DomainAllowlistArgs
    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 DomainAllowlistArgs
    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 DomainAllowlistArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainAllowlistArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainAllowlistArgs
    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 domainAllowlistResource = new Datadog.DomainAllowlist("domainAllowlistResource", new()
    {
        Domains = new[]
        {
            "string",
        },
        Enabled = false,
    });
    
    example, err := datadog.NewDomainAllowlist(ctx, "domainAllowlistResource", &datadog.DomainAllowlistArgs{
    	Domains: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Enabled: pulumi.Bool(false),
    })
    
    var domainAllowlistResource = new DomainAllowlist("domainAllowlistResource", DomainAllowlistArgs.builder()
        .domains("string")
        .enabled(false)
        .build());
    
    domain_allowlist_resource = datadog.DomainAllowlist("domainAllowlistResource",
        domains=["string"],
        enabled=False)
    
    const domainAllowlistResource = new datadog.DomainAllowlist("domainAllowlistResource", {
        domains: ["string"],
        enabled: false,
    });
    
    type: datadog:DomainAllowlist
    properties:
        domains:
            - string
        enabled: false
    

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

    Domains List<string>
    The domains within the domain allowlist.
    Enabled bool
    Whether the Email Domain Allowlist is enabled.
    Domains []string
    The domains within the domain allowlist.
    Enabled bool
    Whether the Email Domain Allowlist is enabled.
    domains List<String>
    The domains within the domain allowlist.
    enabled Boolean
    Whether the Email Domain Allowlist is enabled.
    domains string[]
    The domains within the domain allowlist.
    enabled boolean
    Whether the Email Domain Allowlist is enabled.
    domains Sequence[str]
    The domains within the domain allowlist.
    enabled bool
    Whether the Email Domain Allowlist is enabled.
    domains List<String>
    The domains within the domain allowlist.
    enabled Boolean
    Whether the Email Domain Allowlist is enabled.

    Outputs

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

    Get an existing DomainAllowlist 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?: DomainAllowlistState, opts?: CustomResourceOptions): DomainAllowlist
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domains: Optional[Sequence[str]] = None,
            enabled: Optional[bool] = None) -> DomainAllowlist
    func GetDomainAllowlist(ctx *Context, name string, id IDInput, state *DomainAllowlistState, opts ...ResourceOption) (*DomainAllowlist, error)
    public static DomainAllowlist Get(string name, Input<string> id, DomainAllowlistState? state, CustomResourceOptions? opts = null)
    public static DomainAllowlist get(String name, Output<String> id, DomainAllowlistState 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.
    The following state arguments are supported:
    Domains List<string>
    The domains within the domain allowlist.
    Enabled bool
    Whether the Email Domain Allowlist is enabled.
    Domains []string
    The domains within the domain allowlist.
    Enabled bool
    Whether the Email Domain Allowlist is enabled.
    domains List<String>
    The domains within the domain allowlist.
    enabled Boolean
    Whether the Email Domain Allowlist is enabled.
    domains string[]
    The domains within the domain allowlist.
    enabled boolean
    Whether the Email Domain Allowlist is enabled.
    domains Sequence[str]
    The domains within the domain allowlist.
    enabled bool
    Whether the Email Domain Allowlist is enabled.
    domains List<String>
    The domains within the domain allowlist.
    enabled Boolean
    Whether the Email Domain Allowlist is enabled.

    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.36.1 published on Friday, Nov 15, 2024 by Pulumi