1. Packages
  2. Packages
  3. Dynatrace
  4. API Docs
  5. KeyUserAction
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse
dynatrace logo
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse

    This resource requires the API token scopes Read configuration (ReadConfig), Write configuration (WriteConfig) and Read Entities (entities.read)

    Dynatrace Documentation

    • RUM setup and configuration for web applications - https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configuration/web-applications

    • Web application configuration API for Key User Actions - https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/rum/web-application-configuration-api#edit-key-user-actions-list

    Export Example Usage

    • terraform-provider-dynatrace -export dynatrace.KeyUserAction downloads all existing Key User Actions

    The full documentation of the export feature is available here.

    Resource Example Usage

    The following example showcases how to manage Key User Actions separately from Web Applications using a dedicated resource. While it is still possible to embed keyUserActions into the resource dynatrace.WebApplication, doing so is discouraged.

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    
    const webApplication = dynatrace.getApplication({
        name: "Web Application",
    });
    const acc = new dynatrace.KeyUserAction("acc", {
        applicationId: webApplication.then(webApplication => webApplication.id),
        domain: "120.0.0.1",
        name: "Loading of page /custom",
        type: "Load",
    });
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    import pulumiverse_dynatrace as dynatrace
    
    web_application = dynatrace.get_application(name="Web Application")
    acc = dynatrace.KeyUserAction("acc",
        application_id=web_application.id,
        domain="120.0.0.1",
        name="Loading of page /custom",
        type="Load")
    
    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 {
    		webApplication, err := dynatrace.GetApplication(ctx, &dynatrace.GetApplicationArgs{
    			Name: "Web Application",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = dynatrace.NewKeyUserAction(ctx, "acc", &dynatrace.KeyUserActionArgs{
    			ApplicationId: pulumi.String(pulumi.String(webApplication.Id)),
    			Domain:        pulumi.String("120.0.0.1"),
    			Name:          pulumi.String("Loading of page /custom"),
    			Type:          pulumi.String("Load"),
    		})
    		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 webApplication = Dynatrace.GetApplication.Invoke(new()
        {
            Name = "Web Application",
        });
    
        var acc = new Dynatrace.KeyUserAction("acc", new()
        {
            ApplicationId = webApplication.Apply(getApplicationResult => getApplicationResult.Id),
            Domain = "120.0.0.1",
            Name = "Loading of page /custom",
            Type = "Load",
        });
    
    });
    
    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.GetApplicationArgs;
    import com.pulumi.dynatrace.KeyUserAction;
    import com.pulumi.dynatrace.KeyUserActionArgs;
    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 webApplication = DynatraceFunctions.getApplication(GetApplicationArgs.builder()
                .name("Web Application")
                .build());
    
            var acc = new KeyUserAction("acc", KeyUserActionArgs.builder()
                .applicationId(webApplication.id())
                .domain("120.0.0.1")
                .name("Loading of page /custom")
                .type("Load")
                .build());
    
        }
    }
    
    resources:
      acc:
        type: dynatrace:KeyUserAction
        properties:
          applicationId: ${webApplication.id}
          domain: 120.0.0.1
          name: Loading of page /custom
          type: Load
    variables:
      webApplication:
        fn::invoke:
          function: dynatrace:getApplication
          arguments:
            name: Web Application
    
    pulumi {
      required_providers {
        dynatrace = {
          source = "pulumi/dynatrace"
        }
      }
    }
    
    data "dynatrace_getapplication" "webApplication" {
      name = "Web Application"
    }
    
    resource "dynatrace_keyuseraction" "acc" {
      application_id = data.dynatrace_getapplication.webApplication.id
      domain         = "120.0.0.1"
      name           = "Loading of page /custom"
      type           = "Load"
    }
    

    Create KeyUserAction Resource

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

    Constructor syntax

    new KeyUserAction(name: string, args: KeyUserActionArgs, opts?: CustomResourceOptions);
    @overload
    def KeyUserAction(resource_name: str,
                      args: KeyUserActionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def KeyUserAction(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      application_id: Optional[str] = None,
                      type: Optional[str] = None,
                      domain: Optional[str] = None,
                      name: Optional[str] = None)
    func NewKeyUserAction(ctx *Context, name string, args KeyUserActionArgs, opts ...ResourceOption) (*KeyUserAction, error)
    public KeyUserAction(string name, KeyUserActionArgs args, CustomResourceOptions? opts = null)
    public KeyUserAction(String name, KeyUserActionArgs args)
    public KeyUserAction(String name, KeyUserActionArgs args, CustomResourceOptions options)
    
    type: dynatrace:KeyUserAction
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dynatrace_keyuseraction" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args KeyUserActionArgs
    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 KeyUserActionArgs
    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 KeyUserActionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyUserActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyUserActionArgs
    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 keyUserActionResource = new Dynatrace.KeyUserAction("keyUserActionResource", new()
    {
        ApplicationId = "string",
        Type = "string",
        Domain = "string",
        Name = "string",
    });
    
    example, err := dynatrace.NewKeyUserAction(ctx, "keyUserActionResource", &dynatrace.KeyUserActionArgs{
    	ApplicationId: pulumi.String("string"),
    	Type:          pulumi.String("string"),
    	Domain:        pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    resource "dynatrace_keyuseraction" "keyUserActionResource" {
      application_id = "string"
      type           = "string"
      domain         = "string"
      name           = "string"
    }
    
    var keyUserActionResource = new KeyUserAction("keyUserActionResource", KeyUserActionArgs.builder()
        .applicationId("string")
        .type("string")
        .domain("string")
        .name("string")
        .build());
    
    key_user_action_resource = dynatrace.KeyUserAction("keyUserActionResource",
        application_id="string",
        type="string",
        domain="string",
        name="string")
    
    const keyUserActionResource = new dynatrace.KeyUserAction("keyUserActionResource", {
        applicationId: "string",
        type: "string",
        domain: "string",
        name: "string",
    });
    
    type: dynatrace:KeyUserAction
    properties:
        applicationId: string
        domain: string
        name: string
        type: string
    

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

    ApplicationId string
    The ID of the WebApplication
    Type string
    The type of the action. Possible values are Custom, Load and Xhr
    Domain string
    The domain where the action is performed
    Name string
    The name of the action
    ApplicationId string
    The ID of the WebApplication
    Type string
    The type of the action. Possible values are Custom, Load and Xhr
    Domain string
    The domain where the action is performed
    Name string
    The name of the action
    application_id string
    The ID of the WebApplication
    type string
    The type of the action. Possible values are Custom, Load and Xhr
    domain string
    The domain where the action is performed
    name string
    The name of the action
    applicationId String
    The ID of the WebApplication
    type String
    The type of the action. Possible values are Custom, Load and Xhr
    domain String
    The domain where the action is performed
    name String
    The name of the action
    applicationId string
    The ID of the WebApplication
    type string
    The type of the action. Possible values are Custom, Load and Xhr
    domain string
    The domain where the action is performed
    name string
    The name of the action
    application_id str
    The ID of the WebApplication
    type str
    The type of the action. Possible values are Custom, Load and Xhr
    domain str
    The domain where the action is performed
    name str
    The name of the action
    applicationId String
    The ID of the WebApplication
    type String
    The type of the action. Possible values are Custom, Load and Xhr
    domain String
    The domain where the action is performed
    name String
    The name of the action

    Outputs

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

    Get an existing KeyUserAction 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?: KeyUserActionState, opts?: CustomResourceOptions): KeyUserAction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            domain: Optional[str] = None,
            name: Optional[str] = None,
            type: Optional[str] = None) -> KeyUserAction
    func GetKeyUserAction(ctx *Context, name string, id IDInput, state *KeyUserActionState, opts ...ResourceOption) (*KeyUserAction, error)
    public static KeyUserAction Get(string name, Input<string> id, KeyUserActionState? state, CustomResourceOptions? opts = null)
    public static KeyUserAction get(String name, Output<String> id, KeyUserActionState state, CustomResourceOptions options)
    resources:  _:    type: dynatrace:KeyUserAction    get:      id: ${id}
    import {
      to = dynatrace_keyuseraction.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:
    ApplicationId string
    The ID of the WebApplication
    Domain string
    The domain where the action is performed
    Name string
    The name of the action
    Type string
    The type of the action. Possible values are Custom, Load and Xhr
    ApplicationId string
    The ID of the WebApplication
    Domain string
    The domain where the action is performed
    Name string
    The name of the action
    Type string
    The type of the action. Possible values are Custom, Load and Xhr
    application_id string
    The ID of the WebApplication
    domain string
    The domain where the action is performed
    name string
    The name of the action
    type string
    The type of the action. Possible values are Custom, Load and Xhr
    applicationId String
    The ID of the WebApplication
    domain String
    The domain where the action is performed
    name String
    The name of the action
    type String
    The type of the action. Possible values are Custom, Load and Xhr
    applicationId string
    The ID of the WebApplication
    domain string
    The domain where the action is performed
    name string
    The name of the action
    type string
    The type of the action. Possible values are Custom, Load and Xhr
    application_id str
    The ID of the WebApplication
    domain str
    The domain where the action is performed
    name str
    The name of the action
    type str
    The type of the action. Possible values are Custom, Load and Xhr
    applicationId String
    The ID of the WebApplication
    domain String
    The domain where the action is performed
    name String
    The name of the action
    type String
    The type of the action. Possible values are Custom, Load and Xhr

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Viewing docs for Dynatrace v0.36.0
    published on Tuesday, Jun 9, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial