1. Packages
  2. Datadog
  3. API Docs
  4. SyntheticsGlobalVariable
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.SyntheticsGlobalVariable

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

    Provides a Datadog synthetics global variable resource. This can be used to create and manage Datadog synthetics global variables.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var testVariable = new Datadog.SyntheticsGlobalVariable("testVariable", new()
        {
            Description = "Description of the variable",
            Name = "EXAMPLE_VARIABLE",
            Tags = new[]
            {
                "foo:bar",
                "env:test",
            },
            Value = "variable-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.NewSyntheticsGlobalVariable(ctx, "testVariable", &datadog.SyntheticsGlobalVariableArgs{
    			Description: pulumi.String("Description of the variable"),
    			Name:        pulumi.String("EXAMPLE_VARIABLE"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("env:test"),
    			},
    			Value: pulumi.String("variable-value"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.SyntheticsGlobalVariable;
    import com.pulumi.datadog.SyntheticsGlobalVariableArgs;
    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 testVariable = new SyntheticsGlobalVariable("testVariable", SyntheticsGlobalVariableArgs.builder()        
                .description("Description of the variable")
                .name("EXAMPLE_VARIABLE")
                .tags(            
                    "foo:bar",
                    "env:test")
                .value("variable-value")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_datadog as datadog
    
    test_variable = datadog.SyntheticsGlobalVariable("testVariable",
        description="Description of the variable",
        name="EXAMPLE_VARIABLE",
        tags=[
            "foo:bar",
            "env:test",
        ],
        value="variable-value")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const testVariable = new datadog.SyntheticsGlobalVariable("testVariable", {
        description: "Description of the variable",
        name: "EXAMPLE_VARIABLE",
        tags: [
            "foo:bar",
            "env:test",
        ],
        value: "variable-value",
    });
    
    resources:
      testVariable:
        type: datadog:SyntheticsGlobalVariable
        properties:
          description: Description of the variable
          name: EXAMPLE_VARIABLE
          tags:
            - foo:bar
            - env:test
          value: variable-value
    

    Create SyntheticsGlobalVariable Resource

    new SyntheticsGlobalVariable(name: string, args: SyntheticsGlobalVariableArgs, opts?: CustomResourceOptions);
    @overload
    def SyntheticsGlobalVariable(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 description: Optional[str] = None,
                                 name: Optional[str] = None,
                                 options: Optional[SyntheticsGlobalVariableOptionsArgs] = None,
                                 parse_test_id: Optional[str] = None,
                                 parse_test_options: Optional[SyntheticsGlobalVariableParseTestOptionsArgs] = None,
                                 restricted_roles: Optional[Sequence[str]] = None,
                                 secure: Optional[bool] = None,
                                 tags: Optional[Sequence[str]] = None,
                                 value: Optional[str] = None)
    @overload
    def SyntheticsGlobalVariable(resource_name: str,
                                 args: SyntheticsGlobalVariableArgs,
                                 opts: Optional[ResourceOptions] = None)
    func NewSyntheticsGlobalVariable(ctx *Context, name string, args SyntheticsGlobalVariableArgs, opts ...ResourceOption) (*SyntheticsGlobalVariable, error)
    public SyntheticsGlobalVariable(string name, SyntheticsGlobalVariableArgs args, CustomResourceOptions? opts = null)
    public SyntheticsGlobalVariable(String name, SyntheticsGlobalVariableArgs args)
    public SyntheticsGlobalVariable(String name, SyntheticsGlobalVariableArgs args, CustomResourceOptions options)
    
    type: datadog:SyntheticsGlobalVariable
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SyntheticsGlobalVariableArgs
    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 SyntheticsGlobalVariableArgs
    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 SyntheticsGlobalVariableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SyntheticsGlobalVariableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SyntheticsGlobalVariableArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Name string

    Synthetics global variable name.

    Value string

    The value of the global variable.

    Description string

    Description of the global variable.

    Options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    ParseTestId string

    Id of the Synthetics test to use for a variable from test.

    ParseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    RestrictedRoles List<string>

    A list of role identifiers to associate with the Synthetics global variable.

    Secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    Tags List<string>

    A list of tags to associate with your synthetics global variable.

    Name string

    Synthetics global variable name.

    Value string

    The value of the global variable.

    Description string

    Description of the global variable.

    Options SyntheticsGlobalVariableOptionsArgs

    Additional options for the variable, such as a MFA token.

    ParseTestId string

    Id of the Synthetics test to use for a variable from test.

    ParseTestOptions SyntheticsGlobalVariableParseTestOptionsArgs

    ID of the Synthetics test to use a source of the global variable value.

    RestrictedRoles []string

    A list of role identifiers to associate with the Synthetics global variable.

    Secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    Tags []string

    A list of tags to associate with your synthetics global variable.

    name String

    Synthetics global variable name.

    value String

    The value of the global variable.

    description String

    Description of the global variable.

    options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    parseTestId String

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles List<String>

    A list of role identifiers to associate with the Synthetics global variable.

    secure Boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags List<String>

    A list of tags to associate with your synthetics global variable.

    name string

    Synthetics global variable name.

    value string

    The value of the global variable.

    description string

    Description of the global variable.

    options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    parseTestId string

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles string[]

    A list of role identifiers to associate with the Synthetics global variable.

    secure boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags string[]

    A list of tags to associate with your synthetics global variable.

    name str

    Synthetics global variable name.

    value str

    The value of the global variable.

    description str

    Description of the global variable.

    options SyntheticsGlobalVariableOptionsArgs

    Additional options for the variable, such as a MFA token.

    parse_test_id str

    Id of the Synthetics test to use for a variable from test.

    parse_test_options SyntheticsGlobalVariableParseTestOptionsArgs

    ID of the Synthetics test to use a source of the global variable value.

    restricted_roles Sequence[str]

    A list of role identifiers to associate with the Synthetics global variable.

    secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags Sequence[str]

    A list of tags to associate with your synthetics global variable.

    name String

    Synthetics global variable name.

    value String

    The value of the global variable.

    description String

    Description of the global variable.

    options Property Map

    Additional options for the variable, such as a MFA token.

    parseTestId String

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions Property Map

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles List<String>

    A list of role identifiers to associate with the Synthetics global variable.

    secure Boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags List<String>

    A list of tags to associate with your synthetics global variable.

    Outputs

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

    Get an existing SyntheticsGlobalVariable 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?: SyntheticsGlobalVariableState, opts?: CustomResourceOptions): SyntheticsGlobalVariable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            options: Optional[SyntheticsGlobalVariableOptionsArgs] = None,
            parse_test_id: Optional[str] = None,
            parse_test_options: Optional[SyntheticsGlobalVariableParseTestOptionsArgs] = None,
            restricted_roles: Optional[Sequence[str]] = None,
            secure: Optional[bool] = None,
            tags: Optional[Sequence[str]] = None,
            value: Optional[str] = None) -> SyntheticsGlobalVariable
    func GetSyntheticsGlobalVariable(ctx *Context, name string, id IDInput, state *SyntheticsGlobalVariableState, opts ...ResourceOption) (*SyntheticsGlobalVariable, error)
    public static SyntheticsGlobalVariable Get(string name, Input<string> id, SyntheticsGlobalVariableState? state, CustomResourceOptions? opts = null)
    public static SyntheticsGlobalVariable get(String name, Output<String> id, SyntheticsGlobalVariableState 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:
    Description string

    Description of the global variable.

    Name string

    Synthetics global variable name.

    Options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    ParseTestId string

    Id of the Synthetics test to use for a variable from test.

    ParseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    RestrictedRoles List<string>

    A list of role identifiers to associate with the Synthetics global variable.

    Secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    Tags List<string>

    A list of tags to associate with your synthetics global variable.

    Value string

    The value of the global variable.

    Description string

    Description of the global variable.

    Name string

    Synthetics global variable name.

    Options SyntheticsGlobalVariableOptionsArgs

    Additional options for the variable, such as a MFA token.

    ParseTestId string

    Id of the Synthetics test to use for a variable from test.

    ParseTestOptions SyntheticsGlobalVariableParseTestOptionsArgs

    ID of the Synthetics test to use a source of the global variable value.

    RestrictedRoles []string

    A list of role identifiers to associate with the Synthetics global variable.

    Secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    Tags []string

    A list of tags to associate with your synthetics global variable.

    Value string

    The value of the global variable.

    description String

    Description of the global variable.

    name String

    Synthetics global variable name.

    options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    parseTestId String

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles List<String>

    A list of role identifiers to associate with the Synthetics global variable.

    secure Boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags List<String>

    A list of tags to associate with your synthetics global variable.

    value String

    The value of the global variable.

    description string

    Description of the global variable.

    name string

    Synthetics global variable name.

    options SyntheticsGlobalVariableOptions

    Additional options for the variable, such as a MFA token.

    parseTestId string

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions SyntheticsGlobalVariableParseTestOptions

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles string[]

    A list of role identifiers to associate with the Synthetics global variable.

    secure boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags string[]

    A list of tags to associate with your synthetics global variable.

    value string

    The value of the global variable.

    description str

    Description of the global variable.

    name str

    Synthetics global variable name.

    options SyntheticsGlobalVariableOptionsArgs

    Additional options for the variable, such as a MFA token.

    parse_test_id str

    Id of the Synthetics test to use for a variable from test.

    parse_test_options SyntheticsGlobalVariableParseTestOptionsArgs

    ID of the Synthetics test to use a source of the global variable value.

    restricted_roles Sequence[str]

    A list of role identifiers to associate with the Synthetics global variable.

    secure bool

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags Sequence[str]

    A list of tags to associate with your synthetics global variable.

    value str

    The value of the global variable.

    description String

    Description of the global variable.

    name String

    Synthetics global variable name.

    options Property Map

    Additional options for the variable, such as a MFA token.

    parseTestId String

    Id of the Synthetics test to use for a variable from test.

    parseTestOptions Property Map

    ID of the Synthetics test to use a source of the global variable value.

    restrictedRoles List<String>

    A list of role identifiers to associate with the Synthetics global variable.

    secure Boolean

    If set to true, the value of the global variable is hidden. Defaults to false.

    tags List<String>

    A list of tags to associate with your synthetics global variable.

    value String

    The value of the global variable.

    Supporting Types

    SyntheticsGlobalVariableOptions, SyntheticsGlobalVariableOptionsArgs

    totpParameters Property Map

    Parameters needed for MFA/TOTP.

    SyntheticsGlobalVariableOptionsTotpParameters, SyntheticsGlobalVariableOptionsTotpParametersArgs

    digits Integer
    refreshInterval Integer
    digits number
    refreshInterval number
    digits Number
    refreshInterval Number

    SyntheticsGlobalVariableParseTestOptions, SyntheticsGlobalVariableParseTestOptionsArgs

    Type string

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    Field string

    Required when type = http_header. Defines the header to use to extract the value

    LocalVariableName string

    When type is local_variable, name of the local variable to use to extract the value.

    Parser SyntheticsGlobalVariableParseTestOptionsParser
    Type string

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    Field string

    Required when type = http_header. Defines the header to use to extract the value

    LocalVariableName string

    When type is local_variable, name of the local variable to use to extract the value.

    Parser SyntheticsGlobalVariableParseTestOptionsParser
    type String

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    field String

    Required when type = http_header. Defines the header to use to extract the value

    localVariableName String

    When type is local_variable, name of the local variable to use to extract the value.

    parser SyntheticsGlobalVariableParseTestOptionsParser
    type string

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    field string

    Required when type = http_header. Defines the header to use to extract the value

    localVariableName string

    When type is local_variable, name of the local variable to use to extract the value.

    parser SyntheticsGlobalVariableParseTestOptionsParser
    type str

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    field str

    Required when type = http_header. Defines the header to use to extract the value

    local_variable_name str

    When type is local_variable, name of the local variable to use to extract the value.

    parser SyntheticsGlobalVariableParseTestOptionsParser
    type String

    Defines the source to use to extract the value. Valid values are http_body, http_header, local_variable.

    field String

    Required when type = http_header. Defines the header to use to extract the value

    localVariableName String

    When type is local_variable, name of the local variable to use to extract the value.

    parser Property Map

    SyntheticsGlobalVariableParseTestOptionsParser, SyntheticsGlobalVariableParseTestOptionsParserArgs

    Type string
    Value string

    The value of the global variable.

    Type string
    Value string

    The value of the global variable.

    type String
    value String

    The value of the global variable.

    type string
    value string

    The value of the global variable.

    type str
    value str

    The value of the global variable.

    type String
    value String

    The value of the global variable.

    Import

    Synthetics global variables can be imported using their string ID, e.g.

     $ pulumi import datadog:index/syntheticsGlobalVariable:SyntheticsGlobalVariable fizz abcde123-fghi-456-jkl-mnopqrstuv
    

    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.23.0 published on Wednesday, Sep 27, 2023 by Pulumi