1. Packages
  2. Dynatrace
  3. API Docs
  4. IamUser
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

dynatrace.IamUser

Explore with Pulumi AI

Dynatrace SaaS only

To utilize this resource, please define the environment variables DT_CLIENT_ID, DT_CLIENT_SECRET, DT_ACCOUNT_ID with an OAuth client including the following permissions: Allow read access for identity resources (users and groups) (account-idm-read) and Allow write access for identity resources (users and groups) (account-idm-write).

This resource is excluded by default in the export utility, please explicitly specify the resource to retrieve existing configuration.

Dynatrace Documentation

  • Dynatrace IAM - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions

  • Settings API - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions/iam/iam-getting-started

Resource Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumiverse/dynatrace";

const johnDoeGmailCom = new dynatrace.IamUser("johnDoeGmailCom", {
    email: "john.doe@gmail.com",
    groups: [data.dynatrace_iam_group.Restricted.id],
});
Copy
import pulumi
import pulumiverse_dynatrace as dynatrace

john_doe_gmail_com = dynatrace.IamUser("johnDoeGmailCom",
    email="john.doe@gmail.com",
    groups=[data["dynatrace_iam_group"]["Restricted"]["id"]])
Copy
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 {
		_, err := dynatrace.NewIamUser(ctx, "johnDoeGmailCom", &dynatrace.IamUserArgs{
			Email: pulumi.String("john.doe@gmail.com"),
			Groups: pulumi.StringArray{
				data.Dynatrace_iam_group.Restricted.Id,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumiverse.Dynatrace;

return await Deployment.RunAsync(() => 
{
    var johnDoeGmailCom = new Dynatrace.IamUser("johnDoeGmailCom", new()
    {
        Email = "john.doe@gmail.com",
        Groups = new[]
        {
            data.Dynatrace_iam_group.Restricted.Id,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.IamUser;
import com.pulumi.dynatrace.IamUserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

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

    public static void stack(Context ctx) {
        var johnDoeGmailCom = new IamUser("johnDoeGmailCom", IamUserArgs.builder()
            .email("john.doe@gmail.com")
            .groups(data.dynatrace_iam_group().Restricted().id())
            .build());

    }
}
Copy
resources:
  johnDoeGmailCom:
    type: dynatrace:IamUser
    properties:
      email: john.doe@gmail.com
      groups:
        - ${data.dynatrace_iam_group.Restricted.id}
Copy

Create IamUser Resource

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

Constructor syntax

new IamUser(name: string, args: IamUserArgs, opts?: CustomResourceOptions);
@overload
def IamUser(resource_name: str,
            args: IamUserArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def IamUser(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            email: Optional[str] = None,
            groups: Optional[Sequence[str]] = None)
func NewIamUser(ctx *Context, name string, args IamUserArgs, opts ...ResourceOption) (*IamUser, error)
public IamUser(string name, IamUserArgs args, CustomResourceOptions? opts = null)
public IamUser(String name, IamUserArgs args)
public IamUser(String name, IamUserArgs args, CustomResourceOptions options)
type: dynatrace:IamUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IamUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IamUserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IamUserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IamUserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IamUserArgs
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 iamUserResource = new Dynatrace.IamUser("iamUserResource", new()
{
    Email = "string",
    Groups = new[]
    {
        "string",
    },
});
Copy
example, err := dynatrace.NewIamUser(ctx, "iamUserResource", &dynatrace.IamUserArgs{
	Email: pulumi.String("string"),
	Groups: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var iamUserResource = new IamUser("iamUserResource", IamUserArgs.builder()
    .email("string")
    .groups("string")
    .build());
Copy
iam_user_resource = dynatrace.IamUser("iamUserResource",
    email="string",
    groups=["string"])
Copy
const iamUserResource = new dynatrace.IamUser("iamUserResource", {
    email: "string",
    groups: ["string"],
});
Copy
type: dynatrace:IamUser
properties:
    email: string
    groups:
        - string
Copy

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

Email This property is required. string
Groups List<string>
Email This property is required. string
Groups []string
email This property is required. String
groups List<String>
email This property is required. string
groups string[]
email This property is required. str
groups Sequence[str]
email This property is required. String
groups List<String>

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Uid string
Id string
The provider-assigned unique ID for this managed resource.
Uid string
id String
The provider-assigned unique ID for this managed resource.
uid String
id string
The provider-assigned unique ID for this managed resource.
uid string
id str
The provider-assigned unique ID for this managed resource.
uid str
id String
The provider-assigned unique ID for this managed resource.
uid String

Look up Existing IamUser Resource

Get an existing IamUser 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?: IamUserState, opts?: CustomResourceOptions): IamUser
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        email: Optional[str] = None,
        groups: Optional[Sequence[str]] = None,
        uid: Optional[str] = None) -> IamUser
func GetIamUser(ctx *Context, name string, id IDInput, state *IamUserState, opts ...ResourceOption) (*IamUser, error)
public static IamUser Get(string name, Input<string> id, IamUserState? state, CustomResourceOptions? opts = null)
public static IamUser get(String name, Output<String> id, IamUserState state, CustomResourceOptions options)
resources:  _:    type: dynatrace:IamUser    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Email string
Groups List<string>
Uid string
Email string
Groups []string
Uid string
email String
groups List<String>
uid String
email string
groups string[]
uid string
email str
groups Sequence[str]
uid str
email String
groups List<String>
uid String

Package Details

Repository
dynatrace pulumiverse/pulumi-dynatrace
License
Apache-2.0
Notes
This Pulumi package is based on the dynatrace Terraform Provider.