1. Registry
  2. Packages
  3. Dynatrace
  4. API Docs
  5. SyntheticPrimaryGrailTags
Viewing docs for Dynatrace v0.44.0
published on Friday, Oct 2, 2026 by Pulumiverse
dynatrace logo Dynatrace
Viewing docs for Dynatrace v0.44.0
published on Friday, Oct 2, 2026 by Pulumiverse

    This resource requires the API token scopes Read settings (settings.read) and Write settings (settings.write) or the OAuth scopes Read settings (settings:objects:read) and Write settings (settings:objects:write)

    Dynatrace Documentation

    • Primary Grail Tags for Synthetic - https://docs.dynatrace.com/docs/observe/digital-experience/synthetic/primary-grail-tags-synthetic

    • Settings API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings (schemaId: builtin:synthetic.primary-grail-tags)

    Export Example Usage

    • terraform-provider-dynatrace -export dynatrace.SyntheticPrimaryGrailTags downloads the currently configured primary grail tags

    The full documentation of the export feature is available here.

    Resource Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    
    const location = dynatrace.getSyntheticLocation({
        name: "Location",
    });
    const monitor = new dynatrace.HttpMonitor("monitor", {
        anomalyDetections: [{
            loadingTimeThresholds: [{}],
            outageHandlings: [{
                globalOutage: true,
                globalOutagePolicies: [{
                    consecutiveRuns: 1,
                }],
            }],
        }],
        name: "#name#",
        frequency: 5,
        locations: [location.then(location => location.id)],
        noScript: true,
    });
    const example = new dynatrace.SyntheticPrimaryGrailTags("example", {
        scope: monitor.id,
        tags: {
            tags: [
                {
                    key: "my-key-1",
                    value: "my-value-1",
                },
                {
                    key: "my-key-2",
                    value: "my-value-2",
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    import pulumiverse_dynatrace as dynatrace
    
    location = dynatrace.get_synthetic_location(name="Location")
    monitor = dynatrace.HttpMonitor("monitor",
        anomaly_detections=[{
            "loading_time_thresholds": [{}],
            "outage_handlings": [{
                "global_outage": True,
                "global_outage_policies": [{
                    "consecutive_runs": 1,
                }],
            }],
        }],
        name="#name#",
        frequency=5,
        locations=[location.id],
        no_script=True)
    example = dynatrace.SyntheticPrimaryGrailTags("example",
        scope=monitor.id,
        tags={
            "tags": [
                {
                    "key": "my-key-1",
                    "value": "my-value-1",
                },
                {
                    "key": "my-key-2",
                    "value": "my-value-2",
                },
            ],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		location, err := dynatrace.GetSyntheticLocation(ctx, &dynatrace.LookupSyntheticLocationArgs{
    			Name: pulumi.StringRef("Location"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		monitor, err := dynatrace.NewHttpMonitor(ctx, "monitor", &dynatrace.HttpMonitorArgs{
    			AnomalyDetections: dynatrace.HttpMonitorAnomalyDetectionArray{
    				&dynatrace.HttpMonitorAnomalyDetectionArgs{
    					LoadingTimeThresholds: dynatrace.HttpMonitorAnomalyDetectionLoadingTimeThresholdArray{
    						&dynatrace.HttpMonitorAnomalyDetectionLoadingTimeThresholdArgs{},
    					},
    					OutageHandlings: dynatrace.HttpMonitorAnomalyDetectionOutageHandlingArray{
    						&dynatrace.HttpMonitorAnomalyDetectionOutageHandlingArgs{
    							GlobalOutage: pulumi.Bool(true),
    							GlobalOutagePolicies: dynatrace.HttpMonitorAnomalyDetectionOutageHandlingGlobalOutagePolicyArray{
    								&dynatrace.HttpMonitorAnomalyDetectionOutageHandlingGlobalOutagePolicyArgs{
    									ConsecutiveRuns: pulumi.Int(1),
    								},
    							},
    						},
    					},
    				},
    			},
    			Name:      pulumi.String("#name#"),
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String(location.Id),
    			},
    			NoScript: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dynatrace.NewSyntheticPrimaryGrailTags(ctx, "example", &dynatrace.SyntheticPrimaryGrailTagsArgs{
    			Scope: monitor.ID().ToIDOutput().ToStringOutput(),
    			Tags: &dynatrace.SyntheticPrimaryGrailTagsTagsArgs{
    				Tags: dynatrace.SyntheticPrimaryGrailTagsTagsTagArray{
    					&dynatrace.SyntheticPrimaryGrailTagsTagsTagArgs{
    						Key:   pulumi.String("my-key-1"),
    						Value: pulumi.String("my-value-1"),
    					},
    					&dynatrace.SyntheticPrimaryGrailTagsTagsTagArgs{
    						Key:   pulumi.String("my-key-2"),
    						Value: pulumi.String("my-value-2"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumiverse.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var location = Dynatrace.GetSyntheticLocation.Invoke(new()
        {
            Name = "Location",
        });
    
        var monitor = new Dynatrace.HttpMonitor("monitor", new()
        {
            AnomalyDetections = new[]
            {
                new Dynatrace.Inputs.HttpMonitorAnomalyDetectionArgs
                {
                    LoadingTimeThresholds = new[]
                    {
                        null,
                    },
                    OutageHandlings = new[]
                    {
                        new Dynatrace.Inputs.HttpMonitorAnomalyDetectionOutageHandlingArgs
                        {
                            GlobalOutage = true,
                            GlobalOutagePolicies = new[]
                            {
                                new Dynatrace.Inputs.HttpMonitorAnomalyDetectionOutageHandlingGlobalOutagePolicyArgs
                                {
                                    ConsecutiveRuns = 1,
                                },
                            },
                        },
                    },
                },
            },
            Name = "#name#",
            Frequency = 5,
            Locations = new[]
            {
                location.Apply(getSyntheticLocationResult => getSyntheticLocationResult.Id),
            },
            NoScript = true,
        });
    
        var example = new Dynatrace.SyntheticPrimaryGrailTags("example", new()
        {
            Scope = monitor.Id,
            Tags = new Dynatrace.Inputs.SyntheticPrimaryGrailTagsTagsArgs
            {
                Tags = new[]
                {
                    new Dynatrace.Inputs.SyntheticPrimaryGrailTagsTagsTagArgs
                    {
                        Key = "my-key-1",
                        Value = "my-value-1",
                    },
                    new Dynatrace.Inputs.SyntheticPrimaryGrailTagsTagsTagArgs
                    {
                        Key = "my-key-2",
                        Value = "my-value-2",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    import com.pulumi.dynatrace.inputs.GetSyntheticLocationArgs;
    import com.pulumi.dynatrace.HttpMonitor;
    import com.pulumi.dynatrace.HttpMonitorArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorAnomalyDetectionArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorAnomalyDetectionLoadingTimeThresholdArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorAnomalyDetectionOutageHandlingArgs;
    import com.pulumi.dynatrace.inputs.HttpMonitorAnomalyDetectionOutageHandlingGlobalOutagePolicyArgs;
    import com.pulumi.dynatrace.SyntheticPrimaryGrailTags;
    import com.pulumi.dynatrace.SyntheticPrimaryGrailTagsArgs;
    import com.pulumi.dynatrace.inputs.SyntheticPrimaryGrailTagsTagsArgs;
    import com.pulumi.dynatrace.inputs.SyntheticPrimaryGrailTagsTagsTagArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var location = DynatraceFunctions.getSyntheticLocation(GetSyntheticLocationArgs.builder()
                .name("Location")
                .build());
    
            var monitor = new HttpMonitor("monitor", HttpMonitorArgs.builder()
                .anomalyDetections(HttpMonitorAnomalyDetectionArgs.builder()
                    .loadingTimeThresholds(HttpMonitorAnomalyDetectionLoadingTimeThresholdArgs.builder()
                        .build())
                    .outageHandlings(HttpMonitorAnomalyDetectionOutageHandlingArgs.builder()
                        .globalOutage(true)
                        .globalOutagePolicies(HttpMonitorAnomalyDetectionOutageHandlingGlobalOutagePolicyArgs.builder()
                            .consecutiveRuns(1)
                            .build())
                        .build())
                    .build())
                .name("#name#")
                .frequency(5)
                .locations(location.id())
                .noScript(true)
                .build());
    
            var example = new SyntheticPrimaryGrailTags("example", SyntheticPrimaryGrailTagsArgs.builder()
                .scope(monitor.id())
                .tags(SyntheticPrimaryGrailTagsTagsArgs.builder()
                    .tags(                
                        SyntheticPrimaryGrailTagsTagsTagArgs.builder()
                            .key("my-key-1")
                            .value("my-value-1")
                            .build(),
                        SyntheticPrimaryGrailTagsTagsTagArgs.builder()
                            .key("my-key-2")
                            .value("my-value-2")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: dynatrace:SyntheticPrimaryGrailTags
        properties:
          scope: ${monitor.id}
          tags:
            tags:
              - key: my-key-1
                value: my-value-1
              - key: my-key-2
                value: my-value-2
      monitor:
        type: dynatrace:HttpMonitor
        properties:
          anomalyDetections:
            - loadingTimeThresholds:
                - {}
              outageHandlings:
                - globalOutage: true
                  globalOutagePolicies:
                    - consecutiveRuns: 1
          name: '#name#'
          frequency: 5
          locations:
            - ${location.id}
          noScript: true
    variables:
      location:
        fn::invoke:
          function: dynatrace:getSyntheticLocation
          arguments:
            name: Location
    
    pulumi {
      required_providers {
        dynatrace = {
          source = "pulumi/dynatrace"
        }
      }
    }
    
    data "dynatrace_getsyntheticlocation" "location" {
      name = "Location"
    }
    
    resource "dynatrace_syntheticprimarygrailtags" "example" {
      scope = dynatrace_httpmonitor.monitor.id
      tags = {
        tags = [{
          "key"   = "my-key-1"
          "value" = "my-value-1"
          }, {
          "key"   = "my-key-2"
          "value" = "my-value-2"
        }]
      }
    }
    resource "dynatrace_httpmonitor" "monitor" {
      anomaly_detections {
        loading_time_thresholds {
        }
        outage_handlings {
          global_outage = true
          global_outage_policies {
            consecutive_runs = 1
          }
        }
      }
      name      = "#name#"
      frequency = 5
      locations = [data.dynatrace_getsyntheticlocation.location.id]
      no_script = true
    }
    

    Create SyntheticPrimaryGrailTags Resource

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

    Constructor syntax

    new SyntheticPrimaryGrailTags(name: string, args: SyntheticPrimaryGrailTagsArgs, opts?: CustomResourceOptions);
    @overload
    def SyntheticPrimaryGrailTags(resource_name: str,
                                  args: SyntheticPrimaryGrailTagsArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SyntheticPrimaryGrailTags(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  scope: Optional[str] = None,
                                  tags: Optional[SyntheticPrimaryGrailTagsTagsArgs] = None)
    func NewSyntheticPrimaryGrailTags(ctx *Context, name string, args SyntheticPrimaryGrailTagsArgs, opts ...ResourceOption) (*SyntheticPrimaryGrailTags, error)
    public SyntheticPrimaryGrailTags(string name, SyntheticPrimaryGrailTagsArgs args, CustomResourceOptions? opts = null)
    public SyntheticPrimaryGrailTags(String name, SyntheticPrimaryGrailTagsArgs args)
    public SyntheticPrimaryGrailTags(String name, SyntheticPrimaryGrailTagsArgs args, CustomResourceOptions options)
    
    type: dynatrace:SyntheticPrimaryGrailTags
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dynatrace_synthetic_primary_grail_tags" "name" {
        # resource properties
    }

    Parameters

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

    Constructor example

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

    var syntheticPrimaryGrailTagsResource = new Dynatrace.SyntheticPrimaryGrailTags("syntheticPrimaryGrailTagsResource", new()
    {
        Scope = "string",
        Tags = new Dynatrace.Inputs.SyntheticPrimaryGrailTagsTagsArgs
        {
            Tags = new[]
            {
                new Dynatrace.Inputs.SyntheticPrimaryGrailTagsTagsTagArgs
                {
                    Key = "string",
                    Value = "string",
                },
            },
        },
    });
    
    example, err := dynatrace.NewSyntheticPrimaryGrailTags(ctx, "syntheticPrimaryGrailTagsResource", &dynatrace.SyntheticPrimaryGrailTagsArgs{
    	Scope: pulumi.String("string"),
    	Tags: &dynatrace.SyntheticPrimaryGrailTagsTagsArgs{
    		Tags: dynatrace.SyntheticPrimaryGrailTagsTagsTagArray{
    			&dynatrace.SyntheticPrimaryGrailTagsTagsTagArgs{
    				Key:   pulumi.String("string"),
    				Value: pulumi.String("string"),
    			},
    		},
    	},
    })
    
    resource "dynatrace_synthetic_primary_grail_tags" "syntheticPrimaryGrailTagsResource" {
      lifecycle {
        create_before_destroy = true
      }
      scope = "string"
      tags = {
        tags = [{
          key   = "string"
          value = "string"
        }]
      }
    }
    
    var syntheticPrimaryGrailTagsResource = new SyntheticPrimaryGrailTags("syntheticPrimaryGrailTagsResource", SyntheticPrimaryGrailTagsArgs.builder()
        .scope("string")
        .tags(SyntheticPrimaryGrailTagsTagsArgs.builder()
            .tags(SyntheticPrimaryGrailTagsTagsTagArgs.builder()
                .key("string")
                .value("string")
                .build())
            .build())
        .build());
    
    synthetic_primary_grail_tags_resource = dynatrace.SyntheticPrimaryGrailTags("syntheticPrimaryGrailTagsResource",
        scope="string",
        tags={
            "tags": [{
                "key": "string",
                "value": "string",
            }],
        })
    
    const syntheticPrimaryGrailTagsResource = new dynatrace.SyntheticPrimaryGrailTags("syntheticPrimaryGrailTagsResource", {
        scope: "string",
        tags: {
            tags: [{
                key: "string",
                value: "string",
            }],
        },
    });
    
    type: dynatrace:SyntheticPrimaryGrailTags
    properties:
        scope: string
        tags:
            tags:
                - key: string
                  value: string
    

    SyntheticPrimaryGrailTags Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SyntheticPrimaryGrailTags resource accepts the following input properties:

    Scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    Tags Pulumiverse.Dynatrace.Inputs.SyntheticPrimaryGrailTagsTags
    Primary grail tags
    Scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    Tags SyntheticPrimaryGrailTagsTagsArgs
    Primary grail tags
    scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags object
    Primary grail tags
    scope String
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTags
    Primary grail tags
    scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTags
    Primary grail tags
    scope str
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTagsArgs
    Primary grail tags
    scope String
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags Property Map
    Primary grail tags

    Outputs

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

    Get an existing SyntheticPrimaryGrailTags 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?: SyntheticPrimaryGrailTagsState, opts?: CustomResourceOptions): SyntheticPrimaryGrailTags
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            scope: Optional[str] = None,
            tags: Optional[SyntheticPrimaryGrailTagsTagsArgs] = None) -> SyntheticPrimaryGrailTags
    func GetSyntheticPrimaryGrailTags(ctx *Context, name string, id IDInput, state *SyntheticPrimaryGrailTagsState, opts ...ResourceOption) (*SyntheticPrimaryGrailTags, error)
    public static SyntheticPrimaryGrailTags Get(string name, Input<string> id, SyntheticPrimaryGrailTagsState? state, CustomResourceOptions? opts = null)
    public static SyntheticPrimaryGrailTags get(String name, Output<String> id, SyntheticPrimaryGrailTagsState state, CustomResourceOptions options)
    resources:  _:    type: dynatrace:SyntheticPrimaryGrailTags    get:      id: ${id}
    import {
      to = dynatrace_synthetic_primary_grail_tags.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    Tags Pulumiverse.Dynatrace.Inputs.SyntheticPrimaryGrailTagsTags
    Primary grail tags
    Scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    Tags SyntheticPrimaryGrailTagsTagsArgs
    Primary grail tags
    scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags object
    Primary grail tags
    scope String
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTags
    Primary grail tags
    scope string
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTags
    Primary grail tags
    scope str
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags SyntheticPrimaryGrailTagsTagsArgs
    Primary grail tags
    scope String
    The scope of this setting (SYNTHETICTEST, HTTPCHECK, MULTIPROTOCOL_MONITOR)
    tags Property Map
    Primary grail tags

    Supporting Types

    SyntheticPrimaryGrailTagsTags, SyntheticPrimaryGrailTagsTagsArgs

    SyntheticPrimaryGrailTagsTagsTag, SyntheticPrimaryGrailTagsTagsTagArgs

    Key string
    Primary grail tag's key
    Value string
    Primary grail tag's value
    Key string
    Primary grail tag's key
    Value string
    Primary grail tag's value
    key string
    Primary grail tag's key
    value string
    Primary grail tag's value
    key String
    Primary grail tag's key
    value String
    Primary grail tag's value
    key string
    Primary grail tag's key
    value string
    Primary grail tag's value
    key str
    Primary grail tag's key
    value str
    Primary grail tag's value
    key String
    Primary grail tag's key
    value String
    Primary grail tag's value

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo Dynatrace
    Viewing docs for Dynatrace v0.44.0
    published on Friday, Oct 2, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial