Datadog

Pulumi Official
Package maintained by Pulumi
v4.10.0 published on Monday, Jul 25, 2022 by Pulumi

SyntheticsTest

Provides a Datadog synthetics test resource. This can be used to create and manage Datadog synthetics test.

Warning

Starting from version 3.1.0+, the direct usage of global variables in the configuration is deprecated, in favor of local variables of type global. As an example, if you were previously using {{ GLOBAL_VAR }} directly in your configuration, add a config_variable of type global with the id matching the id of the global variable GLOBAL_VAR, which can be found in the Synthetics UI or from the output of the datadog.SyntheticsGlobalVariable resource. The name can be chosen freely.

In practice, it means going from (simplified configuration):

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
    }
}
{}

to

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
    }
}
{}

which you can now use in your request definition:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using Pulumi;

class MyStack : Stack
{
    public MyStack()
    {
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
    }
}
{}

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        // Example Usage (Synthetics API test)
        // Create a new Datadog Synthetics API/HTTP test on https://www.example.org
        var testApi = new Datadog.SyntheticsTest("testApi", new Datadog.SyntheticsTestArgs
        {
            Assertions = 
            {
                new Datadog.Inputs.SyntheticsTestAssertionArgs
                {
                    Operator = "is",
                    Target = "200",
                    Type = "statusCode",
                },
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Message = "Notify @pagerduty",
            Name = "An API test on example.org",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                MonitorOptions = new Datadog.Inputs.SyntheticsTestOptionsListMonitorOptionsArgs
                {
                    RenotifyInterval = 120,
                },
                Retry = new Datadog.Inputs.SyntheticsTestOptionsListRetryArgs
                {
                    Count = 2,
                    Interval = 300,
                },
                TickEvery = 900,
            },
            RequestDefinition = new Datadog.Inputs.SyntheticsTestRequestDefinitionArgs
            {
                Method = "GET",
                Url = "https://www.example.org",
            },
            RequestHeaders = 
            {
                { "Authentication", "Token: 1234566789" },
                { "Content-Type", "application/json" },
            },
            Status = "live",
            Subtype = "http",
            Tags = 
            {
                "foo:bar",
                "foo",
                "env:test",
            },
            Type = "api",
        });
        // Example Usage (Synthetics SSL test)
        // Create a new Datadog Synthetics API/SSL test on example.org
        var testSsl = new Datadog.SyntheticsTest("testSsl", new Datadog.SyntheticsTestArgs
        {
            Assertions = 
            {
                new Datadog.Inputs.SyntheticsTestAssertionArgs
                {
                    Operator = "isInMoreThan",
                    Target = "30",
                    Type = "certificate",
                },
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Message = "Notify @pagerduty",
            Name = "An API test on example.org",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                AcceptSelfSigned = true,
                TickEvery = 900,
            },
            RequestDefinition = new Datadog.Inputs.SyntheticsTestRequestDefinitionArgs
            {
                Host = "example.org",
                Port = 443,
            },
            Status = "live",
            Subtype = "ssl",
            Tags = 
            {
                "foo:bar",
                "foo",
                "env:test",
            },
            Type = "api",
        });
        // Example Usage (Synthetics TCP test)
        // Create a new Datadog Synthetics API/TCP test on example.org
        var testTcp = new Datadog.SyntheticsTest("testTcp", new Datadog.SyntheticsTestArgs
        {
            Assertions = 
            {
                new Datadog.Inputs.SyntheticsTestAssertionArgs
                {
                    Operator = "lessThan",
                    Target = "2000",
                    Type = "responseTime",
                },
            },
            ConfigVariables = 
            {
                new Datadog.Inputs.SyntheticsTestConfigVariableArgs
                {
                    Id = "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
                    Name = "MY_GLOBAL_VAR",
                    Type = "global",
                },
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Message = "Notify @pagerduty",
            Name = "An API test on example.org",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                TickEvery = 900,
            },
            RequestDefinition = new Datadog.Inputs.SyntheticsTestRequestDefinitionArgs
            {
                Host = "example.org",
                Port = 443,
            },
            Status = "live",
            Subtype = "tcp",
            Tags = 
            {
                "foo:bar",
                "foo",
                "env:test",
            },
            Type = "api",
        });
        // Example Usage (Synthetics DNS test)
        // Create a new Datadog Synthetics API/DNS test on example.org
        var testDns = new Datadog.SyntheticsTest("testDns", new Datadog.SyntheticsTestArgs
        {
            Assertions = 
            {
                new Datadog.Inputs.SyntheticsTestAssertionArgs
                {
                    Operator = "is",
                    Property = "A",
                    Target = "0.0.0.0",
                    Type = "recordSome",
                },
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Message = "Notify @pagerduty",
            Name = "An API test on example.org",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                TickEvery = 900,
            },
            RequestDefinition = new Datadog.Inputs.SyntheticsTestRequestDefinitionArgs
            {
                Host = "example.org",
            },
            Status = "live",
            Subtype = "dns",
            Tags = 
            {
                "foo:bar",
                "foo",
                "env:test",
            },
            Type = "api",
        });
        // Example Usage (Synthetics Multistep API test)
        // Create a new Datadog Synthetics Multistep API test
        var test = new Datadog.SyntheticsTest("test", new Datadog.SyntheticsTestArgs
        {
            ApiSteps = 
            {
                new Datadog.Inputs.SyntheticsTestApiStepArgs
                {
                    Assertions = 
                    {
                        new Datadog.Inputs.SyntheticsTestApiStepAssertionArgs
                        {
                            Operator = "is",
                            Target = "200",
                            Type = "statusCode",
                        },
                    },
                    Name = "An API test on example.org",
                    RequestDefinition = new Datadog.Inputs.SyntheticsTestApiStepRequestDefinitionArgs
                    {
                        Method = "GET",
                        Url = "https://example.org",
                    },
                    RequestHeaders = 
                    {
                        { "Authentication", "Token: 1234566789" },
                        { "Content-Type", "application/json" },
                    },
                    Subtype = "http",
                },
                new Datadog.Inputs.SyntheticsTestApiStepArgs
                {
                    Assertions = 
                    {
                        new Datadog.Inputs.SyntheticsTestApiStepAssertionArgs
                        {
                            Operator = "is",
                            Target = "200",
                            Type = "statusCode",
                        },
                    },
                    Name = "An API test on example.org",
                    RequestDefinition = new Datadog.Inputs.SyntheticsTestApiStepRequestDefinitionArgs
                    {
                        Method = "GET",
                        Url = "http://example.org",
                    },
                    Subtype = "http",
                },
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Name = "Multistep API test",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                AcceptSelfSigned = true,
                TickEvery = 900,
            },
            Status = "live",
            Subtype = "multi",
            Type = "api",
        });
        // Example Usage (Synthetics Browser test)
        // Support for Synthetics Browser test steps is limited (see below)
        // Create a new Datadog Synthetics Browser test starting on https://www.example.org
        var testBrowser = new Datadog.SyntheticsTest("testBrowser", new Datadog.SyntheticsTestArgs
        {
            BrowserSteps = 
            {
                new Datadog.Inputs.SyntheticsTestBrowserStepArgs
                {
                    Name = "Check current url",
                    Params = new Datadog.Inputs.SyntheticsTestBrowserStepParamsArgs
                    {
                        Check = "contains",
                        Value = "datadoghq",
                    },
                    Type = "assertCurrentUrl",
                },
            },
            BrowserVariables = 
            {
                new Datadog.Inputs.SyntheticsTestBrowserVariableArgs
                {
                    Example = "597",
                    Name = "MY_PATTERN_VAR",
                    Pattern = "{{numeric(3)}}",
                    Type = "text",
                },
                new Datadog.Inputs.SyntheticsTestBrowserVariableArgs
                {
                    Example = "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
                    Name = "MY_EMAIL_VAR",
                    Pattern = "jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
                    Type = "email",
                },
                new Datadog.Inputs.SyntheticsTestBrowserVariableArgs
                {
                    Id = "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
                    Name = "MY_GLOBAL_VAR",
                    Type = "global",
                },
            },
            DeviceIds = 
            {
                "laptop_large",
            },
            Locations = 
            {
                "aws:eu-central-1",
            },
            Message = "Notify @qa",
            Name = "A Browser test on example.org",
            OptionsList = new Datadog.Inputs.SyntheticsTestOptionsListArgs
            {
                TickEvery = 3600,
            },
            RequestDefinition = new Datadog.Inputs.SyntheticsTestRequestDefinitionArgs
            {
                Method = "GET",
                Url = "https://app.datadoghq.com",
            },
            Status = "paused",
            Tags = {},
            Type = "browser",
        });
    }

}
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.NewSyntheticsTest(ctx, "testApi", &datadog.SyntheticsTestArgs{
			Assertions: SyntheticsTestAssertionArray{
				&SyntheticsTestAssertionArgs{
					Operator: pulumi.String("is"),
					Target:   pulumi.String("200"),
					Type:     pulumi.String("statusCode"),
				},
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Message: pulumi.String("Notify @pagerduty"),
			Name:    pulumi.String("An API test on example.org"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				MonitorOptions: &SyntheticsTestOptionsListMonitorOptionsArgs{
					RenotifyInterval: pulumi.Int(120),
				},
				Retry: &SyntheticsTestOptionsListRetryArgs{
					Count:    pulumi.Int(2),
					Interval: pulumi.Int(300),
				},
				TickEvery: pulumi.Int(900),
			},
			RequestDefinition: &SyntheticsTestRequestDefinitionArgs{
				Method: pulumi.String("GET"),
				Url:    pulumi.String("https://www.example.org"),
			},
			RequestHeaders: pulumi.AnyMap{
				"Authentication": pulumi.Any("Token: 1234566789"),
				"Content-Type":   pulumi.Any("application/json"),
			},
			Status:  pulumi.String("live"),
			Subtype: pulumi.String("http"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("foo"),
				pulumi.String("env:test"),
			},
			Type: pulumi.String("api"),
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewSyntheticsTest(ctx, "testSsl", &datadog.SyntheticsTestArgs{
			Assertions: SyntheticsTestAssertionArray{
				&SyntheticsTestAssertionArgs{
					Operator: pulumi.String("isInMoreThan"),
					Target:   pulumi.String("30"),
					Type:     pulumi.String("certificate"),
				},
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Message: pulumi.String("Notify @pagerduty"),
			Name:    pulumi.String("An API test on example.org"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				AcceptSelfSigned: pulumi.Bool(true),
				TickEvery:        pulumi.Int(900),
			},
			RequestDefinition: &SyntheticsTestRequestDefinitionArgs{
				Host: pulumi.String("example.org"),
				Port: pulumi.Int(443),
			},
			Status:  pulumi.String("live"),
			Subtype: pulumi.String("ssl"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("foo"),
				pulumi.String("env:test"),
			},
			Type: pulumi.String("api"),
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewSyntheticsTest(ctx, "testTcp", &datadog.SyntheticsTestArgs{
			Assertions: SyntheticsTestAssertionArray{
				&SyntheticsTestAssertionArgs{
					Operator: pulumi.String("lessThan"),
					Target:   pulumi.String("2000"),
					Type:     pulumi.String("responseTime"),
				},
			},
			ConfigVariables: SyntheticsTestConfigVariableArray{
				&SyntheticsTestConfigVariableArgs{
					Id:   pulumi.String("76636cd1-82e2-4aeb-9cfe-51366a8198a2"),
					Name: pulumi.String("MY_GLOBAL_VAR"),
					Type: pulumi.String("global"),
				},
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Message: pulumi.String("Notify @pagerduty"),
			Name:    pulumi.String("An API test on example.org"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				TickEvery: pulumi.Int(900),
			},
			RequestDefinition: &SyntheticsTestRequestDefinitionArgs{
				Host: pulumi.String("example.org"),
				Port: pulumi.Int(443),
			},
			Status:  pulumi.String("live"),
			Subtype: pulumi.String("tcp"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("foo"),
				pulumi.String("env:test"),
			},
			Type: pulumi.String("api"),
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewSyntheticsTest(ctx, "testDns", &datadog.SyntheticsTestArgs{
			Assertions: SyntheticsTestAssertionArray{
				&SyntheticsTestAssertionArgs{
					Operator: pulumi.String("is"),
					Property: pulumi.String("A"),
					Target:   pulumi.String("0.0.0.0"),
					Type:     pulumi.String("recordSome"),
				},
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Message: pulumi.String("Notify @pagerduty"),
			Name:    pulumi.String("An API test on example.org"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				TickEvery: pulumi.Int(900),
			},
			RequestDefinition: &SyntheticsTestRequestDefinitionArgs{
				Host: pulumi.String("example.org"),
			},
			Status:  pulumi.String("live"),
			Subtype: pulumi.String("dns"),
			Tags: pulumi.StringArray{
				pulumi.String("foo:bar"),
				pulumi.String("foo"),
				pulumi.String("env:test"),
			},
			Type: pulumi.String("api"),
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewSyntheticsTest(ctx, "test", &datadog.SyntheticsTestArgs{
			ApiSteps: SyntheticsTestApiStepArray{
				&SyntheticsTestApiStepArgs{
					Assertions: SyntheticsTestApiStepAssertionArray{
						&SyntheticsTestApiStepAssertionArgs{
							Operator: pulumi.String("is"),
							Target:   pulumi.String("200"),
							Type:     pulumi.String("statusCode"),
						},
					},
					Name: pulumi.String("An API test on example.org"),
					RequestDefinition: &SyntheticsTestApiStepRequestDefinitionArgs{
						Method: pulumi.String("GET"),
						Url:    pulumi.String("https://example.org"),
					},
					RequestHeaders: pulumi.AnyMap{
						"Authentication": pulumi.Any("Token: 1234566789"),
						"Content-Type":   pulumi.Any("application/json"),
					},
					Subtype: pulumi.String("http"),
				},
				&SyntheticsTestApiStepArgs{
					Assertions: SyntheticsTestApiStepAssertionArray{
						&SyntheticsTestApiStepAssertionArgs{
							Operator: pulumi.String("is"),
							Target:   pulumi.String("200"),
							Type:     pulumi.String("statusCode"),
						},
					},
					Name: pulumi.String("An API test on example.org"),
					RequestDefinition: &SyntheticsTestApiStepRequestDefinitionArgs{
						Method: pulumi.String("GET"),
						Url:    pulumi.String("http://example.org"),
					},
					Subtype: pulumi.String("http"),
				},
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Name: pulumi.String("Multistep API test"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				AcceptSelfSigned: pulumi.Bool(true),
				TickEvery:        pulumi.Int(900),
			},
			Status:  pulumi.String("live"),
			Subtype: pulumi.String("multi"),
			Type:    pulumi.String("api"),
		})
		if err != nil {
			return err
		}
		_, err = datadog.NewSyntheticsTest(ctx, "testBrowser", &datadog.SyntheticsTestArgs{
			BrowserSteps: SyntheticsTestBrowserStepArray{
				&SyntheticsTestBrowserStepArgs{
					Name: pulumi.String("Check current url"),
					Params: &SyntheticsTestBrowserStepParamsArgs{
						Check: pulumi.String("contains"),
						Value: pulumi.String("datadoghq"),
					},
					Type: pulumi.String("assertCurrentUrl"),
				},
			},
			BrowserVariables: SyntheticsTestBrowserVariableArray{
				&SyntheticsTestBrowserVariableArgs{
					Example: pulumi.String("597"),
					Name:    pulumi.String("MY_PATTERN_VAR"),
					Pattern: pulumi.String("{{numeric(3)}}"),
					Type:    pulumi.String("text"),
				},
				&SyntheticsTestBrowserVariableArgs{
					Example: pulumi.String("jd8-afe-ydv.4546132139@synthetics.dtdg.co"),
					Name:    pulumi.String("MY_EMAIL_VAR"),
					Pattern: pulumi.String("jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co"),
					Type:    pulumi.String("email"),
				},
				&SyntheticsTestBrowserVariableArgs{
					Id:   pulumi.String("76636cd1-82e2-4aeb-9cfe-51366a8198a2"),
					Name: pulumi.String("MY_GLOBAL_VAR"),
					Type: pulumi.String("global"),
				},
			},
			DeviceIds: pulumi.StringArray{
				pulumi.String("laptop_large"),
			},
			Locations: pulumi.StringArray{
				pulumi.String("aws:eu-central-1"),
			},
			Message: pulumi.String("Notify @qa"),
			Name:    pulumi.String("A Browser test on example.org"),
			OptionsList: &SyntheticsTestOptionsListArgs{
				TickEvery: pulumi.Int(3600),
			},
			RequestDefinition: &SyntheticsTestRequestDefinitionArgs{
				Method: pulumi.String("GET"),
				Url:    pulumi.String("https://app.datadoghq.com"),
			},
			Status: pulumi.String("paused"),
			Tags:   pulumi.StringArray{},
			Type:   pulumi.String("browser"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var testApi = new SyntheticsTest("testApi", SyntheticsTestArgs.builder()        
            .assertions(SyntheticsTestAssertionArgs.builder()
                .operator("is")
                .target("200")
                .type("statusCode")
                .build())
            .locations("aws:eu-central-1")
            .message("Notify @pagerduty")
            .name("An API test on example.org")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .monitorOptions(SyntheticsTestOptionsListMonitorOptionsArgs.builder()
                    .renotifyInterval(120)
                    .build())
                .retry(SyntheticsTestOptionsListRetryArgs.builder()
                    .count(2)
                    .interval(300)
                    .build())
                .tickEvery(900)
                .build())
            .requestDefinition(SyntheticsTestRequestDefinitionArgs.builder()
                .method("GET")
                .url("https://www.example.org")
                .build())
            .requestHeaders(Map.ofEntries(
                Map.entry("Authentication", "Token: 1234566789"),
                Map.entry("Content-Type", "application/json")
            ))
            .status("live")
            .subtype("http")
            .tags(            
                "foo:bar",
                "foo",
                "env:test")
            .type("api")
            .build());

        var testSsl = new SyntheticsTest("testSsl", SyntheticsTestArgs.builder()        
            .assertions(SyntheticsTestAssertionArgs.builder()
                .operator("isInMoreThan")
                .target(30)
                .type("certificate")
                .build())
            .locations("aws:eu-central-1")
            .message("Notify @pagerduty")
            .name("An API test on example.org")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .acceptSelfSigned(true)
                .tickEvery(900)
                .build())
            .requestDefinition(SyntheticsTestRequestDefinitionArgs.builder()
                .host("example.org")
                .port(443)
                .build())
            .status("live")
            .subtype("ssl")
            .tags(            
                "foo:bar",
                "foo",
                "env:test")
            .type("api")
            .build());

        var testTcp = new SyntheticsTest("testTcp", SyntheticsTestArgs.builder()        
            .assertions(SyntheticsTestAssertionArgs.builder()
                .operator("lessThan")
                .target(2000)
                .type("responseTime")
                .build())
            .configVariables(SyntheticsTestConfigVariableArgs.builder()
                .id("76636cd1-82e2-4aeb-9cfe-51366a8198a2")
                .name("MY_GLOBAL_VAR")
                .type("global")
                .build())
            .locations("aws:eu-central-1")
            .message("Notify @pagerduty")
            .name("An API test on example.org")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .tickEvery(900)
                .build())
            .requestDefinition(SyntheticsTestRequestDefinitionArgs.builder()
                .host("example.org")
                .port(443)
                .build())
            .status("live")
            .subtype("tcp")
            .tags(            
                "foo:bar",
                "foo",
                "env:test")
            .type("api")
            .build());

        var testDns = new SyntheticsTest("testDns", SyntheticsTestArgs.builder()        
            .assertions(SyntheticsTestAssertionArgs.builder()
                .operator("is")
                .property("A")
                .target("0.0.0.0")
                .type("recordSome")
                .build())
            .locations("aws:eu-central-1")
            .message("Notify @pagerduty")
            .name("An API test on example.org")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .tickEvery(900)
                .build())
            .requestDefinition(SyntheticsTestRequestDefinitionArgs.builder()
                .host("example.org")
                .build())
            .status("live")
            .subtype("dns")
            .tags(            
                "foo:bar",
                "foo",
                "env:test")
            .type("api")
            .build());

        var test = new SyntheticsTest("test", SyntheticsTestArgs.builder()        
            .apiSteps(            
                SyntheticsTestApiStepArgs.builder()
                    .assertions(SyntheticsTestApiStepAssertionArgs.builder()
                        .operator("is")
                        .target("200")
                        .type("statusCode")
                        .build())
                    .name("An API test on example.org")
                    .requestDefinition(SyntheticsTestApiStepRequestDefinitionArgs.builder()
                        .method("GET")
                        .url("https://example.org")
                        .build())
                    .requestHeaders(Map.ofEntries(
                        Map.entry("Authentication", "Token: 1234566789"),
                        Map.entry("Content-Type", "application/json")
                    ))
                    .subtype("http")
                    .build(),
                SyntheticsTestApiStepArgs.builder()
                    .assertions(SyntheticsTestApiStepAssertionArgs.builder()
                        .operator("is")
                        .target("200")
                        .type("statusCode")
                        .build())
                    .name("An API test on example.org")
                    .requestDefinition(SyntheticsTestApiStepRequestDefinitionArgs.builder()
                        .method("GET")
                        .url("http://example.org")
                        .build())
                    .subtype("http")
                    .build())
            .locations("aws:eu-central-1")
            .name("Multistep API test")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .acceptSelfSigned(true)
                .tickEvery(900)
                .build())
            .status("live")
            .subtype("multi")
            .type("api")
            .build());

        var testBrowser = new SyntheticsTest("testBrowser", SyntheticsTestArgs.builder()        
            .browserSteps(SyntheticsTestBrowserStepArgs.builder()
                .name("Check current url")
                .params(SyntheticsTestBrowserStepParamsArgs.builder()
                    .check("contains")
                    .value("datadoghq")
                    .build())
                .type("assertCurrentUrl")
                .build())
            .browserVariables(            
                SyntheticsTestBrowserVariableArgs.builder()
                    .example("597")
                    .name("MY_PATTERN_VAR")
                    .pattern("{{numeric(3)}}")
                    .type("text")
                    .build(),
                SyntheticsTestBrowserVariableArgs.builder()
                    .example("jd8-afe-ydv.4546132139@synthetics.dtdg.co")
                    .name("MY_EMAIL_VAR")
                    .pattern("jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co")
                    .type("email")
                    .build(),
                SyntheticsTestBrowserVariableArgs.builder()
                    .id("76636cd1-82e2-4aeb-9cfe-51366a8198a2")
                    .name("MY_GLOBAL_VAR")
                    .type("global")
                    .build())
            .deviceIds("laptop_large")
            .locations("aws:eu-central-1")
            .message("Notify @qa")
            .name("A Browser test on example.org")
            .optionsList(SyntheticsTestOptionsListArgs.builder()
                .tickEvery(3600)
                .build())
            .requestDefinition(SyntheticsTestRequestDefinitionArgs.builder()
                .method("GET")
                .url("https://app.datadoghq.com")
                .build())
            .status("paused")
            .tags()
            .type("browser")
            .build());

    }
}
import pulumi
import pulumi_datadog as datadog

# Example Usage (Synthetics API test)
# Create a new Datadog Synthetics API/HTTP test on https://www.example.org
test_api = datadog.SyntheticsTest("testApi",
    assertions=[datadog.SyntheticsTestAssertionArgs(
        operator="is",
        target="200",
        type="statusCode",
    )],
    locations=["aws:eu-central-1"],
    message="Notify @pagerduty",
    name="An API test on example.org",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        monitor_options=datadog.SyntheticsTestOptionsListMonitorOptionsArgs(
            renotify_interval=120,
        ),
        retry=datadog.SyntheticsTestOptionsListRetryArgs(
            count=2,
            interval=300,
        ),
        tick_every=900,
    ),
    request_definition=datadog.SyntheticsTestRequestDefinitionArgs(
        method="GET",
        url="https://www.example.org",
    ),
    request_headers={
        "Authentication": "Token: 1234566789",
        "Content-Type": "application/json",
    },
    status="live",
    subtype="http",
    tags=[
        "foo:bar",
        "foo",
        "env:test",
    ],
    type="api")
# Example Usage (Synthetics SSL test)
# Create a new Datadog Synthetics API/SSL test on example.org
test_ssl = datadog.SyntheticsTest("testSsl",
    assertions=[datadog.SyntheticsTestAssertionArgs(
        operator="isInMoreThan",
        target="30",
        type="certificate",
    )],
    locations=["aws:eu-central-1"],
    message="Notify @pagerduty",
    name="An API test on example.org",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        accept_self_signed=True,
        tick_every=900,
    ),
    request_definition=datadog.SyntheticsTestRequestDefinitionArgs(
        host="example.org",
        port=443,
    ),
    status="live",
    subtype="ssl",
    tags=[
        "foo:bar",
        "foo",
        "env:test",
    ],
    type="api")
# Example Usage (Synthetics TCP test)
# Create a new Datadog Synthetics API/TCP test on example.org
test_tcp = datadog.SyntheticsTest("testTcp",
    assertions=[datadog.SyntheticsTestAssertionArgs(
        operator="lessThan",
        target="2000",
        type="responseTime",
    )],
    config_variables=[datadog.SyntheticsTestConfigVariableArgs(
        id="76636cd1-82e2-4aeb-9cfe-51366a8198a2",
        name="MY_GLOBAL_VAR",
        type="global",
    )],
    locations=["aws:eu-central-1"],
    message="Notify @pagerduty",
    name="An API test on example.org",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        tick_every=900,
    ),
    request_definition=datadog.SyntheticsTestRequestDefinitionArgs(
        host="example.org",
        port=443,
    ),
    status="live",
    subtype="tcp",
    tags=[
        "foo:bar",
        "foo",
        "env:test",
    ],
    type="api")
# Example Usage (Synthetics DNS test)
# Create a new Datadog Synthetics API/DNS test on example.org
test_dns = datadog.SyntheticsTest("testDns",
    assertions=[datadog.SyntheticsTestAssertionArgs(
        operator="is",
        property="A",
        target="0.0.0.0",
        type="recordSome",
    )],
    locations=["aws:eu-central-1"],
    message="Notify @pagerduty",
    name="An API test on example.org",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        tick_every=900,
    ),
    request_definition=datadog.SyntheticsTestRequestDefinitionArgs(
        host="example.org",
    ),
    status="live",
    subtype="dns",
    tags=[
        "foo:bar",
        "foo",
        "env:test",
    ],
    type="api")
# Example Usage (Synthetics Multistep API test)
# Create a new Datadog Synthetics Multistep API test
test = datadog.SyntheticsTest("test",
    api_steps=[
        datadog.SyntheticsTestApiStepArgs(
            assertions=[datadog.SyntheticsTestApiStepAssertionArgs(
                operator="is",
                target="200",
                type="statusCode",
            )],
            name="An API test on example.org",
            request_definition=datadog.SyntheticsTestApiStepRequestDefinitionArgs(
                method="GET",
                url="https://example.org",
            ),
            request_headers={
                "Authentication": "Token: 1234566789",
                "Content-Type": "application/json",
            },
            subtype="http",
        ),
        datadog.SyntheticsTestApiStepArgs(
            assertions=[datadog.SyntheticsTestApiStepAssertionArgs(
                operator="is",
                target="200",
                type="statusCode",
            )],
            name="An API test on example.org",
            request_definition=datadog.SyntheticsTestApiStepRequestDefinitionArgs(
                method="GET",
                url="http://example.org",
            ),
            subtype="http",
        ),
    ],
    locations=["aws:eu-central-1"],
    name="Multistep API test",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        accept_self_signed=True,
        tick_every=900,
    ),
    status="live",
    subtype="multi",
    type="api")
# Example Usage (Synthetics Browser test)
# Support for Synthetics Browser test steps is limited (see below)
# Create a new Datadog Synthetics Browser test starting on https://www.example.org
test_browser = datadog.SyntheticsTest("testBrowser",
    browser_steps=[datadog.SyntheticsTestBrowserStepArgs(
        name="Check current url",
        params=datadog.SyntheticsTestBrowserStepParamsArgs(
            check="contains",
            value="datadoghq",
        ),
        type="assertCurrentUrl",
    )],
    browser_variables=[
        datadog.SyntheticsTestBrowserVariableArgs(
            example="597",
            name="MY_PATTERN_VAR",
            pattern="{{numeric(3)}}",
            type="text",
        ),
        datadog.SyntheticsTestBrowserVariableArgs(
            example="jd8-afe-ydv.4546132139@synthetics.dtdg.co",
            name="MY_EMAIL_VAR",
            pattern="jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
            type="email",
        ),
        datadog.SyntheticsTestBrowserVariableArgs(
            id="76636cd1-82e2-4aeb-9cfe-51366a8198a2",
            name="MY_GLOBAL_VAR",
            type="global",
        ),
    ],
    device_ids=["laptop_large"],
    locations=["aws:eu-central-1"],
    message="Notify @qa",
    name="A Browser test on example.org",
    options_list=datadog.SyntheticsTestOptionsListArgs(
        tick_every=3600,
    ),
    request_definition=datadog.SyntheticsTestRequestDefinitionArgs(
        method="GET",
        url="https://app.datadoghq.com",
    ),
    status="paused",
    tags=[],
    type="browser")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

// Example Usage (Synthetics API test)
// Create a new Datadog Synthetics API/HTTP test on https://www.example.org
const testApi = new datadog.SyntheticsTest("test_api", {
    assertions: [{
        operator: "is",
        target: "200",
        type: "statusCode",
    }],
    locations: ["aws:eu-central-1"],
    message: "Notify @pagerduty",
    name: "An API test on example.org",
    optionsList: {
        monitorOptions: {
            renotifyInterval: 120,
        },
        retry: {
            count: 2,
            interval: 300,
        },
        tickEvery: 900,
    },
    requestDefinition: {
        method: "GET",
        url: "https://www.example.org",
    },
    requestHeaders: {
        Authentication: "Token: 1234566789",
        "Content-Type": "application/json",
    },
    status: "live",
    subtype: "http",
    tags: [
        "foo:bar",
        "foo",
        "env:test",
    ],
    type: "api",
});
// Example Usage (Synthetics SSL test)
// Create a new Datadog Synthetics API/SSL test on example.org
const testSsl = new datadog.SyntheticsTest("test_ssl", {
    assertions: [{
        operator: "isInMoreThan",
        target: "30",
        type: "certificate",
    }],
    locations: ["aws:eu-central-1"],
    message: "Notify @pagerduty",
    name: "An API test on example.org",
    optionsList: {
        acceptSelfSigned: true,
        tickEvery: 900,
    },
    requestDefinition: {
        host: "example.org",
        port: 443,
    },
    status: "live",
    subtype: "ssl",
    tags: [
        "foo:bar",
        "foo",
        "env:test",
    ],
    type: "api",
});
// Example Usage (Synthetics TCP test)
// Create a new Datadog Synthetics API/TCP test on example.org
const testTcp = new datadog.SyntheticsTest("test_tcp", {
    assertions: [{
        operator: "lessThan",
        target: "2000",
        type: "responseTime",
    }],
    configVariables: [{
        id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
        name: "MY_GLOBAL_VAR",
        type: "global",
    }],
    locations: ["aws:eu-central-1"],
    message: "Notify @pagerduty",
    name: "An API test on example.org",
    optionsList: {
        tickEvery: 900,
    },
    requestDefinition: {
        host: "example.org",
        port: 443,
    },
    status: "live",
    subtype: "tcp",
    tags: [
        "foo:bar",
        "foo",
        "env:test",
    ],
    type: "api",
});
// Example Usage (Synthetics DNS test)
// Create a new Datadog Synthetics API/DNS test on example.org
const testDns = new datadog.SyntheticsTest("test_dns", {
    assertions: [{
        operator: "is",
        property: "A",
        target: "0.0.0.0",
        type: "recordSome",
    }],
    locations: ["aws:eu-central-1"],
    message: "Notify @pagerduty",
    name: "An API test on example.org",
    optionsList: {
        tickEvery: 900,
    },
    requestDefinition: {
        host: "example.org",
    },
    status: "live",
    subtype: "dns",
    tags: [
        "foo:bar",
        "foo",
        "env:test",
    ],
    type: "api",
});
// Example Usage (Synthetics Multistep API test)
// Create a new Datadog Synthetics Multistep API test
const test = new datadog.SyntheticsTest("test", {
    apiSteps: [
        {
            assertions: [{
                operator: "is",
                target: "200",
                type: "statusCode",
            }],
            name: "An API test on example.org",
            requestDefinition: {
                method: "GET",
                url: "https://example.org",
            },
            requestHeaders: {
                Authentication: "Token: 1234566789",
                "Content-Type": "application/json",
            },
            subtype: "http",
        },
        {
            assertions: [{
                operator: "is",
                target: "200",
                type: "statusCode",
            }],
            name: "An API test on example.org",
            requestDefinition: {
                method: "GET",
                url: "http://example.org",
            },
            subtype: "http",
        },
    ],
    locations: ["aws:eu-central-1"],
    name: "Multistep API test",
    optionsList: {
        acceptSelfSigned: true,
        tickEvery: 900,
    },
    status: "live",
    subtype: "multi",
    type: "api",
});
// Example Usage (Synthetics Browser test)
// Support for Synthetics Browser test steps is limited (see below)
// Create a new Datadog Synthetics Browser test starting on https://www.example.org
const testBrowser = new datadog.SyntheticsTest("test_browser", {
    browserSteps: [{
        name: "Check current url",
        params: {
            check: "contains",
            value: "datadoghq",
        },
        type: "assertCurrentUrl",
    }],
    browserVariables: [
        {
            example: "597",
            name: "MY_PATTERN_VAR",
            pattern: "{{numeric(3)}}",
            type: "text",
        },
        {
            example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
            name: "MY_EMAIL_VAR",
            pattern: "jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
            type: "email",
        },
        {
            id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
            name: "MY_GLOBAL_VAR",
            type: "global",
        },
    ],
    deviceIds: ["laptop_large"],
    locations: ["aws:eu-central-1"],
    message: "Notify @qa",
    name: "A Browser test on example.org",
    optionsList: {
        tickEvery: 3600,
    },
    requestDefinition: {
        method: "GET",
        url: "https://app.datadoghq.com",
    },
    status: "paused",
    tags: [],
    type: "browser",
});
resources:
  testApi:
    type: datadog:SyntheticsTest
    properties:
      assertions:
        - operator: is
          target: 200
          type: statusCode
      locations:
        - aws:eu-central-1
      message: Notify @pagerduty
      name: An API test on example.org
      optionsList:
        monitorOptions:
          renotifyInterval: 120
        retry:
          count: 2
          interval: 300
        tickEvery: 900
      requestDefinition:
        method: GET
        url: https://www.example.org
      requestHeaders:
        Authentication: 'Token: 1234566789'
        Content-Type: application/json
      status: live
      subtype: http
      tags:
        - foo:bar
        - foo
        - env:test
      type: api
  testSsl:
    type: datadog:SyntheticsTest
    properties:
      assertions:
        - operator: isInMoreThan
          target: 30
          type: certificate
      locations:
        - aws:eu-central-1
      message: Notify @pagerduty
      name: An API test on example.org
      optionsList:
        acceptSelfSigned: true
        tickEvery: 900
      requestDefinition:
        host: example.org
        port: 443
      status: live
      subtype: ssl
      tags:
        - foo:bar
        - foo
        - env:test
      type: api
  testTcp:
    type: datadog:SyntheticsTest
    properties:
      assertions:
        - operator: lessThan
          target: 2000
          type: responseTime
      configVariables:
        - id: 76636cd1-82e2-4aeb-9cfe-51366a8198a2
          name: MY_GLOBAL_VAR
          type: global
      locations:
        - aws:eu-central-1
      message: Notify @pagerduty
      name: An API test on example.org
      optionsList:
        tickEvery: 900
      requestDefinition:
        host: example.org
        port: 443
      status: live
      subtype: tcp
      tags:
        - foo:bar
        - foo
        - env:test
      type: api
  testDns:
    type: datadog:SyntheticsTest
    properties:
      assertions:
        - operator: is
          property: A
          target: 0.0.0.0
          type: recordSome
      locations:
        - aws:eu-central-1
      message: Notify @pagerduty
      name: An API test on example.org
      optionsList:
        tickEvery: 900
      requestDefinition:
        host: example.org
      status: live
      subtype: dns
      tags:
        - foo:bar
        - foo
        - env:test
      type: api
  test:
    type: datadog:SyntheticsTest
    properties:
      apiSteps:
        - assertions:
            - operator: is
              target: 200
              type: statusCode
          name: An API test on example.org
          requestDefinition:
            method: GET
            url: https://example.org
          requestHeaders:
            Authentication: 'Token: 1234566789'
            Content-Type: application/json
          subtype: http
        - assertions:
            - operator: is
              target: 200
              type: statusCode
          name: An API test on example.org
          requestDefinition:
            method: GET
            url: http://example.org
          subtype: http
      locations:
        - aws:eu-central-1
      name: Multistep API test
      optionsList:
        acceptSelfSigned: true
        tickEvery: 900
      status: live
      subtype: multi
      type: api
  testBrowser:
    type: datadog:SyntheticsTest
    properties:
      browserSteps:
        - name: Check current url
          params:
            check: contains
            value: datadoghq
          type: assertCurrentUrl
      browserVariables:
        - example: 597
          name: MY_PATTERN_VAR
          pattern: '{{numeric(3)}}'
          type: text
        - example: jd8-afe-ydv.4546132139@synthetics.dtdg.co
          name: MY_EMAIL_VAR
          pattern: jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co
          type: email
        - id: 76636cd1-82e2-4aeb-9cfe-51366a8198a2
          name: MY_GLOBAL_VAR
          type: global
      deviceIds:
        - laptop_large
      locations:
        - aws:eu-central-1
      message: Notify @qa
      name: A Browser test on example.org
      optionsList:
        tickEvery: 3600
      requestDefinition:
        method: GET
        url: https://app.datadoghq.com
      status: paused
      tags: []
      type: browser

Create a SyntheticsTest Resource

new SyntheticsTest(name: string, args: SyntheticsTestArgs, opts?: CustomResourceOptions);
@overload
def SyntheticsTest(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   api_steps: Optional[Sequence[SyntheticsTestApiStepArgs]] = None,
                   assertions: Optional[Sequence[SyntheticsTestAssertionArgs]] = None,
                   browser_steps: Optional[Sequence[SyntheticsTestBrowserStepArgs]] = None,
                   browser_variables: Optional[Sequence[SyntheticsTestBrowserVariableArgs]] = None,
                   config_variables: Optional[Sequence[SyntheticsTestConfigVariableArgs]] = None,
                   device_ids: Optional[Sequence[str]] = None,
                   locations: Optional[Sequence[str]] = None,
                   message: Optional[str] = None,
                   name: Optional[str] = None,
                   options_list: Optional[SyntheticsTestOptionsListArgs] = None,
                   request_basicauth: Optional[SyntheticsTestRequestBasicauthArgs] = None,
                   request_client_certificate: Optional[SyntheticsTestRequestClientCertificateArgs] = None,
                   request_definition: Optional[SyntheticsTestRequestDefinitionArgs] = None,
                   request_headers: Optional[Mapping[str, Any]] = None,
                   request_proxy: Optional[SyntheticsTestRequestProxyArgs] = None,
                   request_query: Optional[Mapping[str, Any]] = None,
                   set_cookie: Optional[str] = None,
                   status: Optional[str] = None,
                   subtype: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   type: Optional[str] = None)
@overload
def SyntheticsTest(resource_name: str,
                   args: SyntheticsTestArgs,
                   opts: Optional[ResourceOptions] = None)
func NewSyntheticsTest(ctx *Context, name string, args SyntheticsTestArgs, opts ...ResourceOption) (*SyntheticsTest, error)
public SyntheticsTest(string name, SyntheticsTestArgs args, CustomResourceOptions? opts = null)
public SyntheticsTest(String name, SyntheticsTestArgs args)
public SyntheticsTest(String name, SyntheticsTestArgs args, CustomResourceOptions options)
type: datadog:SyntheticsTest
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SyntheticsTestArgs
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 SyntheticsTestArgs
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 SyntheticsTestArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SyntheticsTestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SyntheticsTestArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Locations List<string>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

Name string

Name of Datadog synthetics test.

Status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

Type string

Synthetics test type.

ApiSteps List<SyntheticsTestApiStepArgs>

Steps for multistep api tests

Assertions List<SyntheticsTestAssertionArgs>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

BrowserSteps List<SyntheticsTestBrowserStepArgs>

Steps for browser tests.

BrowserVariables List<SyntheticsTestBrowserVariableArgs>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

ConfigVariables List<SyntheticsTestConfigVariableArgs>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

DeviceIds List<string>

Required if type = "browser". Array with the different device IDs used to run the test.

Message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

OptionsList SyntheticsTestOptionsListArgs
RequestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

RequestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

RequestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

RequestHeaders Dictionary<string, object>

Header name and value map.

RequestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

RequestQuery Dictionary<string, object>

Query arguments name and value map.

SetCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

Subtype string

The subtype of the Synthetic API test. Defaults to http.

Tags List<string>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

Locations []string

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

Name string

Name of Datadog synthetics test.

Status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

Type string

Synthetics test type.

ApiSteps []SyntheticsTestApiStepArgs

Steps for multistep api tests

Assertions []SyntheticsTestAssertionArgs

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

BrowserSteps []SyntheticsTestBrowserStepArgs

Steps for browser tests.

BrowserVariables []SyntheticsTestBrowserVariableArgs

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

ConfigVariables []SyntheticsTestConfigVariableArgs

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

DeviceIds []string

Required if type = "browser". Array with the different device IDs used to run the test.

Message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

OptionsList SyntheticsTestOptionsListArgs
RequestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

RequestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

RequestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

RequestHeaders map[string]interface{}

Header name and value map.

RequestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

RequestQuery map[string]interface{}

Query arguments name and value map.

SetCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

Subtype string

The subtype of the Synthetic API test. Defaults to http.

Tags []string

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

locations List<String>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

name String

Name of Datadog synthetics test.

status String

Define whether you want to start (live) or pause (paused) a Synthetic test.

type String

Synthetics test type.

apiSteps List<SyntheticsTestApiStepArgs>

Steps for multistep api tests

assertions List<SyntheticsTestAssertionArgs>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps List<SyntheticsTestBrowserStepArgs>

Steps for browser tests.

browserVariables List<SyntheticsTestBrowserVariableArgs>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables List<SyntheticsTestConfigVariableArgs>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds List<String>

Required if type = "browser". Array with the different device IDs used to run the test.

message String

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

optionsList SyntheticsTestOptionsListArgs
requestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

requestHeaders Map<String,Object>

Header name and value map.

requestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

requestQuery Map<String,Object>

Query arguments name and value map.

setCookie String

Cookies to be used for a browser test request, using the Set-Cookie syntax.

subtype String

The subtype of the Synthetic API test. Defaults to http.

tags List<String>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

locations string[]

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

name string

Name of Datadog synthetics test.

status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

type string

Synthetics test type.

apiSteps SyntheticsTestApiStepArgs[]

Steps for multistep api tests

assertions SyntheticsTestAssertionArgs[]

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps SyntheticsTestBrowserStepArgs[]

Steps for browser tests.

browserVariables SyntheticsTestBrowserVariableArgs[]

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables SyntheticsTestConfigVariableArgs[]

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds string[]

Required if type = "browser". Array with the different device IDs used to run the test.

message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

optionsList SyntheticsTestOptionsListArgs
requestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

requestHeaders {[key: string]: any}

Header name and value map.

requestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

requestQuery {[key: string]: any}

Query arguments name and value map.

setCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

subtype string

The subtype of the Synthetic API test. Defaults to http.

tags string[]

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

locations Sequence[str]

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

name str

Name of Datadog synthetics test.

status str

Define whether you want to start (live) or pause (paused) a Synthetic test.

type str

Synthetics test type.

api_steps Sequence[SyntheticsTestApiStepArgs]

Steps for multistep api tests

assertions Sequence[SyntheticsTestAssertionArgs]

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browser_steps Sequence[SyntheticsTestBrowserStepArgs]

Steps for browser tests.

browser_variables Sequence[SyntheticsTestBrowserVariableArgs]

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

config_variables Sequence[SyntheticsTestConfigVariableArgs]

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

device_ids Sequence[str]

Required if type = "browser". Array with the different device IDs used to run the test.

message str

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

options_list SyntheticsTestOptionsListArgs
request_basicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

request_client_certificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

request_definition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

request_headers Mapping[str, Any]

Header name and value map.

request_proxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

request_query Mapping[str, Any]

Query arguments name and value map.

set_cookie str

Cookies to be used for a browser test request, using the Set-Cookie syntax.

subtype str

The subtype of the Synthetic API test. Defaults to http.

tags Sequence[str]

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

locations List<String>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

name String

Name of Datadog synthetics test.

status String

Define whether you want to start (live) or pause (paused) a Synthetic test.

type String

Synthetics test type.

apiSteps List<Property Map>

Steps for multistep api tests

assertions List<Property Map>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps List<Property Map>

Steps for browser tests.

browserVariables List<Property Map>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables List<Property Map>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds List<String>

Required if type = "browser". Array with the different device IDs used to run the test.

message String

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

optionsList Property Map
requestBasicauth Property Map

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate Property Map

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition Property Map

Required if type = "api". The synthetics test request.

requestHeaders Map<Any>

Header name and value map.

requestProxy Property Map

The proxy to perform the test.

requestQuery Map<Any>

Query arguments name and value map.

setCookie String

Cookies to be used for a browser test request, using the Set-Cookie syntax.

subtype String

The subtype of the Synthetic API test. Defaults to http.

tags List<String>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

MonitorId int

ID of the monitor associated with the Datadog synthetics test.

Id string

The provider-assigned unique ID for this managed resource.

MonitorId int

ID of the monitor associated with the Datadog synthetics test.

id String

The provider-assigned unique ID for this managed resource.

monitorId Integer

ID of the monitor associated with the Datadog synthetics test.

id string

The provider-assigned unique ID for this managed resource.

monitorId number

ID of the monitor associated with the Datadog synthetics test.

id str

The provider-assigned unique ID for this managed resource.

monitor_id int

ID of the monitor associated with the Datadog synthetics test.

id String

The provider-assigned unique ID for this managed resource.

monitorId Number

ID of the monitor associated with the Datadog synthetics test.

Look up an Existing SyntheticsTest Resource

Get an existing SyntheticsTest 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?: SyntheticsTestState, opts?: CustomResourceOptions): SyntheticsTest
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_steps: Optional[Sequence[SyntheticsTestApiStepArgs]] = None,
        assertions: Optional[Sequence[SyntheticsTestAssertionArgs]] = None,
        browser_steps: Optional[Sequence[SyntheticsTestBrowserStepArgs]] = None,
        browser_variables: Optional[Sequence[SyntheticsTestBrowserVariableArgs]] = None,
        config_variables: Optional[Sequence[SyntheticsTestConfigVariableArgs]] = None,
        device_ids: Optional[Sequence[str]] = None,
        locations: Optional[Sequence[str]] = None,
        message: Optional[str] = None,
        monitor_id: Optional[int] = None,
        name: Optional[str] = None,
        options_list: Optional[SyntheticsTestOptionsListArgs] = None,
        request_basicauth: Optional[SyntheticsTestRequestBasicauthArgs] = None,
        request_client_certificate: Optional[SyntheticsTestRequestClientCertificateArgs] = None,
        request_definition: Optional[SyntheticsTestRequestDefinitionArgs] = None,
        request_headers: Optional[Mapping[str, Any]] = None,
        request_proxy: Optional[SyntheticsTestRequestProxyArgs] = None,
        request_query: Optional[Mapping[str, Any]] = None,
        set_cookie: Optional[str] = None,
        status: Optional[str] = None,
        subtype: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        type: Optional[str] = None) -> SyntheticsTest
func GetSyntheticsTest(ctx *Context, name string, id IDInput, state *SyntheticsTestState, opts ...ResourceOption) (*SyntheticsTest, error)
public static SyntheticsTest Get(string name, Input<string> id, SyntheticsTestState? state, CustomResourceOptions? opts = null)
public static SyntheticsTest get(String name, Output<String> id, SyntheticsTestState 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:
ApiSteps List<SyntheticsTestApiStepArgs>

Steps for multistep api tests

Assertions List<SyntheticsTestAssertionArgs>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

BrowserSteps List<SyntheticsTestBrowserStepArgs>

Steps for browser tests.

BrowserVariables List<SyntheticsTestBrowserVariableArgs>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

ConfigVariables List<SyntheticsTestConfigVariableArgs>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

DeviceIds List<string>

Required if type = "browser". Array with the different device IDs used to run the test.

Locations List<string>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

Message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

MonitorId int

ID of the monitor associated with the Datadog synthetics test.

Name string

Name of Datadog synthetics test.

OptionsList SyntheticsTestOptionsListArgs
RequestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

RequestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

RequestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

RequestHeaders Dictionary<string, object>

Header name and value map.

RequestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

RequestQuery Dictionary<string, object>

Query arguments name and value map.

SetCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

Status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

Subtype string

The subtype of the Synthetic API test. Defaults to http.

Tags List<string>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

Type string

Synthetics test type.

ApiSteps []SyntheticsTestApiStepArgs

Steps for multistep api tests

Assertions []SyntheticsTestAssertionArgs

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

BrowserSteps []SyntheticsTestBrowserStepArgs

Steps for browser tests.

BrowserVariables []SyntheticsTestBrowserVariableArgs

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

ConfigVariables []SyntheticsTestConfigVariableArgs

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

DeviceIds []string

Required if type = "browser". Array with the different device IDs used to run the test.

Locations []string

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

Message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

MonitorId int

ID of the monitor associated with the Datadog synthetics test.

Name string

Name of Datadog synthetics test.

OptionsList SyntheticsTestOptionsListArgs
RequestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

RequestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

RequestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

RequestHeaders map[string]interface{}

Header name and value map.

RequestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

RequestQuery map[string]interface{}

Query arguments name and value map.

SetCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

Status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

Subtype string

The subtype of the Synthetic API test. Defaults to http.

Tags []string

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

Type string

Synthetics test type.

apiSteps List<SyntheticsTestApiStepArgs>

Steps for multistep api tests

assertions List<SyntheticsTestAssertionArgs>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps List<SyntheticsTestBrowserStepArgs>

Steps for browser tests.

browserVariables List<SyntheticsTestBrowserVariableArgs>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables List<SyntheticsTestConfigVariableArgs>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds List<String>

Required if type = "browser". Array with the different device IDs used to run the test.

locations List<String>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

message String

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

monitorId Integer

ID of the monitor associated with the Datadog synthetics test.

name String

Name of Datadog synthetics test.

optionsList SyntheticsTestOptionsListArgs
requestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

requestHeaders Map<String,Object>

Header name and value map.

requestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

requestQuery Map<String,Object>

Query arguments name and value map.

setCookie String

Cookies to be used for a browser test request, using the Set-Cookie syntax.

status String

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype String

The subtype of the Synthetic API test. Defaults to http.

tags List<String>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

type String

Synthetics test type.

apiSteps SyntheticsTestApiStepArgs[]

Steps for multistep api tests

assertions SyntheticsTestAssertionArgs[]

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps SyntheticsTestBrowserStepArgs[]

Steps for browser tests.

browserVariables SyntheticsTestBrowserVariableArgs[]

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables SyntheticsTestConfigVariableArgs[]

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds string[]

Required if type = "browser". Array with the different device IDs used to run the test.

locations string[]

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

message string

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

monitorId number

ID of the monitor associated with the Datadog synthetics test.

name string

Name of Datadog synthetics test.

optionsList SyntheticsTestOptionsListArgs
requestBasicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

requestHeaders {[key: string]: any}

Header name and value map.

requestProxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

requestQuery {[key: string]: any}

Query arguments name and value map.

setCookie string

Cookies to be used for a browser test request, using the Set-Cookie syntax.

status string

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype string

The subtype of the Synthetic API test. Defaults to http.

tags string[]

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

type string

Synthetics test type.

api_steps Sequence[SyntheticsTestApiStepArgs]

Steps for multistep api tests

assertions Sequence[SyntheticsTestAssertionArgs]

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browser_steps Sequence[SyntheticsTestBrowserStepArgs]

Steps for browser tests.

browser_variables Sequence[SyntheticsTestBrowserVariableArgs]

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

config_variables Sequence[SyntheticsTestConfigVariableArgs]

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

device_ids Sequence[str]

Required if type = "browser". Array with the different device IDs used to run the test.

locations Sequence[str]

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

message str

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

monitor_id int

ID of the monitor associated with the Datadog synthetics test.

name str

Name of Datadog synthetics test.

options_list SyntheticsTestOptionsListArgs
request_basicauth SyntheticsTestRequestBasicauthArgs

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

request_client_certificate SyntheticsTestRequestClientCertificateArgs

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

request_definition SyntheticsTestRequestDefinitionArgs

Required if type = "api". The synthetics test request.

request_headers Mapping[str, Any]

Header name and value map.

request_proxy SyntheticsTestRequestProxyArgs

The proxy to perform the test.

request_query Mapping[str, Any]

Query arguments name and value map.

set_cookie str

Cookies to be used for a browser test request, using the Set-Cookie syntax.

status str

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype str

The subtype of the Synthetic API test. Defaults to http.

tags Sequence[str]

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

type str

Synthetics test type.

apiSteps List<Property Map>

Steps for multistep api tests

assertions List<Property Map>

Assertions used for the test. Multiple assertion blocks are allowed with the structure below.

browserSteps List<Property Map>

Steps for browser tests.

browserVariables List<Property Map>

Variables used for a browser test steps. Multiple variable blocks are allowed with the structure below.

configVariables List<Property Map>

Variables used for the test configuration. Multiple config_variable blocks are allowed with the structure below.

deviceIds List<String>

Required if type = "browser". Array with the different device IDs used to run the test.

locations List<String>

Array of locations used to run the test. Refer to Datadog documentation for available locations (e.g. aws:eu-central-1).

message String

A message to include with notifications for this synthetics test. Email notifications can be sent to specific users by using the same @username notation as events.

monitorId Number

ID of the monitor associated with the Datadog synthetics test.

name String

Name of Datadog synthetics test.

optionsList Property Map
requestBasicauth Property Map

The HTTP basic authentication credentials. Exactly one nested block is allowed with the structure below.

requestClientCertificate Property Map

Client certificate to use when performing the test request. Exactly one nested block is allowed with the structure below.

requestDefinition Property Map

Required if type = "api". The synthetics test request.

requestHeaders Map<Any>

Header name and value map.

requestProxy Property Map

The proxy to perform the test.

requestQuery Map<Any>

Query arguments name and value map.

setCookie String

Cookies to be used for a browser test request, using the Set-Cookie syntax.

status String

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype String

The subtype of the Synthetic API test. Defaults to http.

tags List<String>

A list of tags to associate with your synthetics test. This can help you categorize and filter tests in the manage synthetics page of the UI. Default is an empty list ([]).

type String

Synthetics test type.

Supporting Types

SyntheticsTestApiStep

SyntheticsTestApiStepAssertion

SyntheticsTestApiStepAssertionTargetjsonpath

Jsonpath string
Operator string
Targetvalue string
Jsonpath string
Operator string
Targetvalue string
jsonpath String
operator String
targetvalue String
jsonpath string
operator string
targetvalue string
jsonpath String
operator String
targetvalue String

SyntheticsTestApiStepExtractedValue

name String
parser Property Map
type String
field String

SyntheticsTestApiStepExtractedValueParser

Type string
Value string
Type string
Value string
type String
value String
type string
value string
type str
value str
type String
value String

SyntheticsTestApiStepRequestBasicauth

AccessKey string
Domain string
Password string
Region string
SecretKey string
ServiceName string
SessionToken string
Type string
Username string
Workstation string
AccessKey string
Domain string
Password string
Region string
SecretKey string
ServiceName string
SessionToken string
Type string
Username string
Workstation string
accessKey String
domain String
password String
region String
secretKey String
serviceName String
sessionToken String
type String
username String
workstation String
accessKey string
domain string
password string
region string
secretKey string
serviceName string
sessionToken string
type string
username string
workstation string
accessKey String
domain String
password String
region String
secretKey String
serviceName String
sessionToken String
type String
username String
workstation String

SyntheticsTestApiStepRequestClientCertificate

SyntheticsTestApiStepRequestClientCertificateCert

Content string
Filename string
Content string
Filename string
content String
filename String
content string
filename string
content String
filename String

SyntheticsTestApiStepRequestClientCertificateKey

Content string
Filename string
Content string
Filename string
content String
filename String
content string
filename string
content String
filename String

SyntheticsTestApiStepRequestDefinition

allowInsecure Boolean
body String
dnsServer String
dnsServerPort Integer
followRedirects Boolean
host String
message String
method String
noSavingResponseBody Boolean
numberOfPackets Integer
port Integer
servername String
service String
shouldTrackHops Boolean
timeout Integer
url String
allowInsecure boolean
body string
dnsServer string
dnsServerPort number
followRedirects boolean
host string
message string
method string
noSavingResponseBody boolean
numberOfPackets number
port number
servername string
service string
shouldTrackHops boolean
timeout number
url string
allowInsecure Boolean
body String
dnsServer String
dnsServerPort Number
followRedirects Boolean
host String
message String
method String
noSavingResponseBody Boolean
numberOfPackets Number
port Number
servername String
service String
shouldTrackHops Boolean
timeout Number
url String

SyntheticsTestApiStepRequestProxy

Url string
Headers Dictionary<string, object>
Url string
Headers map[string]interface{}
url String
headers Map<String,Object>
url string
headers {[key: string]: any}
url str
headers Mapping[str, Any]
url String
headers Map<Any>

SyntheticsTestApiStepRetry

count Integer
interval Integer
count number
interval number
count Number
interval Number

SyntheticsTestAssertion

SyntheticsTestAssertionTargetjsonpath

Jsonpath string
Operator string
Targetvalue string
Jsonpath string
Operator string
Targetvalue string
jsonpath String
operator String
targetvalue String
jsonpath string
operator string
targetvalue string
jsonpath String
operator String
targetvalue String

SyntheticsTestBrowserStep

SyntheticsTestBrowserStepParams

attribute String
check String
clickType String
code String
delay Number
element String
elementUserLocator Property Map
email String
file String
files String
modifiers List<String>
playingTabId String
request String
subtestPublicId String
value String
variable Property Map
withClick Boolean
x Number
y Number

SyntheticsTestBrowserStepParamsElementUserLocator

SyntheticsTestBrowserStepParamsElementUserLocatorValue

Value string
Type string
Value string
Type string
value String
type String
value string
type string
value str
type str
value String
type String

SyntheticsTestBrowserStepParamsVariable

Example string
Name string
Example string
Name string
example String
name String
example string
name string
example str
name str
example String
name String

SyntheticsTestBrowserVariable

Name string
Type string
Example string
Id string
Pattern string
Name string
Type string
Example string
Id string
Pattern string
name String
type String
example String
id String
pattern String
name string
type string
example string
id string
pattern string
name str
type str
example str
id str
pattern str
name String
type String
example String
id String
pattern String

SyntheticsTestConfigVariable

Name string
Type string
Example string
Id string
Pattern string
Name string
Type string
Example string
Id string
Pattern string
name String
type String
example String
id String
pattern String
name string
type string
example string
id string
pattern string
name str
type str
example str
id str
pattern str
name String
type String
example String
id String
pattern String

SyntheticsTestOptionsList

SyntheticsTestOptionsListCi

SyntheticsTestOptionsListMonitorOptions

SyntheticsTestOptionsListRetry

count Integer
interval Integer
count number
interval number
count Number
interval Number

SyntheticsTestOptionsListRumSettings

SyntheticsTestRequestBasicauth

AccessKey string
Domain string
Password string
Region string
SecretKey string
ServiceName string
SessionToken string
Type string
Username string
Workstation string
AccessKey string
Domain string
Password string
Region string
SecretKey string
ServiceName string
SessionToken string
Type string
Username string
Workstation string
accessKey String
domain String
password String
region String
secretKey String
serviceName String
sessionToken String
type String
username String
workstation String
accessKey string
domain string
password string
region string
secretKey string
serviceName string
sessionToken string
type string
username string
workstation string
accessKey String
domain String
password String
region String
secretKey String
serviceName String
sessionToken String
type String
username String
workstation String

SyntheticsTestRequestClientCertificate

SyntheticsTestRequestClientCertificateCert

Content string
Filename string
Content string
Filename string
content String
filename String
content string
filename string
content String
filename String

SyntheticsTestRequestClientCertificateKey

Content string
Filename string
Content string
Filename string
content String
filename String
content string
filename string
content String
filename String

SyntheticsTestRequestDefinition

body String
dnsServer String
dnsServerPort Integer
host String
message String
method String
noSavingResponseBody Boolean
numberOfPackets Integer
port Integer
servername String
service String
shouldTrackHops Boolean
timeout Integer
url String
body string
dnsServer string
dnsServerPort number
host string
message string
method string
noSavingResponseBody boolean
numberOfPackets number
port number
servername string
service string
shouldTrackHops boolean
timeout number
url string
body String
dnsServer String
dnsServerPort Number
host String
message String
method String
noSavingResponseBody Boolean
numberOfPackets Number
port Number
servername String
service String
shouldTrackHops Boolean
timeout Number
url String

SyntheticsTestRequestProxy

Url string
Headers Dictionary<string, object>
Url string
Headers map[string]interface{}
url String
headers Map<String,Object>
url string
headers {[key: string]: any}
url str
headers Mapping[str, Any]
url String
headers Map<Any>

Import

Synthetics tests can be imported using their public string ID, e.g.

 $ pulumi import datadog:index/syntheticsTest:SyntheticsTest fizz abc-123-xyz

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes

This Pulumi package is based on the datadog Terraform Provider.