1. Packages
  2. Datadog
  3. API Docs
  4. WebhookCustomVariable
Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi

datadog.WebhookCustomVariable

Explore with Pulumi AI

datadog logo
Datadog v4.27.0 published on Thursday, Mar 14, 2024 by Pulumi

    Provides a Datadog webhooks custom variable resource. This can be used to create and manage Datadog webhooks custom variables.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const foo = new datadog.WebhookCustomVariable("foo", {
        isSecret: true,
        name: "EXAMPLE_VARIABLE",
        value: "EXAMPLE-VALUE",
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    foo = datadog.WebhookCustomVariable("foo",
        is_secret=True,
        name="EXAMPLE_VARIABLE",
        value="EXAMPLE-VALUE")
    
    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.NewWebhookCustomVariable(ctx, "foo", &datadog.WebhookCustomVariableArgs{
    			IsSecret: pulumi.Bool(true),
    			Name:     pulumi.String("EXAMPLE_VARIABLE"),
    			Value:    pulumi.String("EXAMPLE-VALUE"),
    		})
    		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 foo = new Datadog.WebhookCustomVariable("foo", new()
        {
            IsSecret = true,
            Name = "EXAMPLE_VARIABLE",
            Value = "EXAMPLE-VALUE",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.WebhookCustomVariable;
    import com.pulumi.datadog.WebhookCustomVariableArgs;
    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 foo = new WebhookCustomVariable("foo", WebhookCustomVariableArgs.builder()        
                .isSecret(true)
                .name("EXAMPLE_VARIABLE")
                .value("EXAMPLE-VALUE")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: datadog:WebhookCustomVariable
        properties:
          isSecret: true
          name: EXAMPLE_VARIABLE
          value: EXAMPLE-VALUE
    

    Create WebhookCustomVariable Resource

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

    Constructor syntax

    new WebhookCustomVariable(name: string, args: WebhookCustomVariableArgs, opts?: CustomResourceOptions);
    @overload
    def WebhookCustomVariable(resource_name: str,
                              args: WebhookCustomVariableArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def WebhookCustomVariable(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              is_secret: Optional[bool] = None,
                              name: Optional[str] = None,
                              value: Optional[str] = None)
    func NewWebhookCustomVariable(ctx *Context, name string, args WebhookCustomVariableArgs, opts ...ResourceOption) (*WebhookCustomVariable, error)
    public WebhookCustomVariable(string name, WebhookCustomVariableArgs args, CustomResourceOptions? opts = null)
    public WebhookCustomVariable(String name, WebhookCustomVariableArgs args)
    public WebhookCustomVariable(String name, WebhookCustomVariableArgs args, CustomResourceOptions options)
    
    type: datadog:WebhookCustomVariable
    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 WebhookCustomVariableArgs
    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 WebhookCustomVariableArgs
    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 WebhookCustomVariableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookCustomVariableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookCustomVariableArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var webhookCustomVariableResource = new Datadog.WebhookCustomVariable("webhookCustomVariableResource", new()
    {
        IsSecret = false,
        Name = "string",
        Value = "string",
    });
    
    example, err := datadog.NewWebhookCustomVariable(ctx, "webhookCustomVariableResource", &datadog.WebhookCustomVariableArgs{
    	IsSecret: pulumi.Bool(false),
    	Name:     pulumi.String("string"),
    	Value:    pulumi.String("string"),
    })
    
    var webhookCustomVariableResource = new WebhookCustomVariable("webhookCustomVariableResource", WebhookCustomVariableArgs.builder()        
        .isSecret(false)
        .name("string")
        .value("string")
        .build());
    
    webhook_custom_variable_resource = datadog.WebhookCustomVariable("webhookCustomVariableResource",
        is_secret=False,
        name="string",
        value="string")
    
    const webhookCustomVariableResource = new datadog.WebhookCustomVariable("webhookCustomVariableResource", {
        isSecret: false,
        name: "string",
        value: "string",
    });
    
    type: datadog:WebhookCustomVariable
    properties:
        isSecret: false
        name: string
        value: string
    

    WebhookCustomVariable Resource Properties

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

    Inputs

    The WebhookCustomVariable resource accepts the following input properties:

    IsSecret bool
    Whether the custom variable is secret or not.
    Name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    Value string
    The value of the custom variable.
    IsSecret bool
    Whether the custom variable is secret or not.
    Name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    Value string
    The value of the custom variable.
    isSecret Boolean
    Whether the custom variable is secret or not.
    name String
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value String
    The value of the custom variable.
    isSecret boolean
    Whether the custom variable is secret or not.
    name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value string
    The value of the custom variable.
    is_secret bool
    Whether the custom variable is secret or not.
    name str
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value str
    The value of the custom variable.
    isSecret Boolean
    Whether the custom variable is secret or not.
    name String
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value String
    The value of the custom variable.

    Outputs

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

    Get an existing WebhookCustomVariable 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?: WebhookCustomVariableState, opts?: CustomResourceOptions): WebhookCustomVariable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            is_secret: Optional[bool] = None,
            name: Optional[str] = None,
            value: Optional[str] = None) -> WebhookCustomVariable
    func GetWebhookCustomVariable(ctx *Context, name string, id IDInput, state *WebhookCustomVariableState, opts ...ResourceOption) (*WebhookCustomVariable, error)
    public static WebhookCustomVariable Get(string name, Input<string> id, WebhookCustomVariableState? state, CustomResourceOptions? opts = null)
    public static WebhookCustomVariable get(String name, Output<String> id, WebhookCustomVariableState 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:
    IsSecret bool
    Whether the custom variable is secret or not.
    Name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    Value string
    The value of the custom variable.
    IsSecret bool
    Whether the custom variable is secret or not.
    Name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    Value string
    The value of the custom variable.
    isSecret Boolean
    Whether the custom variable is secret or not.
    name String
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value String
    The value of the custom variable.
    isSecret boolean
    Whether the custom variable is secret or not.
    name string
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value string
    The value of the custom variable.
    is_secret bool
    Whether the custom variable is secret or not.
    name str
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value str
    The value of the custom variable.
    isSecret Boolean
    Whether the custom variable is secret or not.
    name String
    The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>.
    value String
    The value of the custom variable.

    Import

    $ pulumi import datadog:index/webhookCustomVariable:WebhookCustomVariable foo EXAMPLE_VARIABLE
    

    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.27.0 published on Thursday, Mar 14, 2024 by Pulumi