dynatrace.getIamUser
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 permission: Allow read access for identity resources (users and groups) (account-idm-read
).
This data source allows you to specify the email address of the user and produces an ordered list of group IDs this user is a member of
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumi/dynatrace";
const userA = dynatrace.getIamUser({
email: "me@home.com",
});
export const groups = userA.then(userA => userA.groups);
import pulumi
import pulumi_dynatrace as dynatrace
user_a = dynatrace.get_iam_user(email="me@home.com")
pulumi.export("groups", user_a.groups)
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 {
userA, err := dynatrace.LookupIamUser(ctx, &dynatrace.LookupIamUserArgs{
Email: "me@home.com",
}, nil)
if err != nil {
return err
}
ctx.Export("groups", userA.Groups)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;
return await Deployment.RunAsync(() =>
{
var userA = Dynatrace.GetIamUser.Invoke(new()
{
Email = "me@home.com",
});
return new Dictionary<string, object?>
{
["groups"] = userA.Apply(getIamUserResult => getIamUserResult.Groups),
};
});
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.GetIamUserArgs;
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) {
final var userA = DynatraceFunctions.getIamUser(GetIamUserArgs.builder()
.email("me@home.com")
.build());
ctx.export("groups", userA.applyValue(getIamUserResult -> getIamUserResult.groups()));
}
}
variables:
userA:
fn::invoke:
Function: dynatrace:getIamUser
Arguments:
email: me@home.com
outputs:
groups: ${userA.groups}
Using getIamUser
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getIamUser(args: GetIamUserArgs, opts?: InvokeOptions): Promise<GetIamUserResult>
function getIamUserOutput(args: GetIamUserOutputArgs, opts?: InvokeOptions): Output<GetIamUserResult>
def get_iam_user(email: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIamUserResult
def get_iam_user_output(email: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIamUserResult]
func LookupIamUser(ctx *Context, args *LookupIamUserArgs, opts ...InvokeOption) (*LookupIamUserResult, error)
func LookupIamUserOutput(ctx *Context, args *LookupIamUserOutputArgs, opts ...InvokeOption) LookupIamUserResultOutput
> Note: This function is named LookupIamUser
in the Go SDK.
public static class GetIamUser
{
public static Task<GetIamUserResult> InvokeAsync(GetIamUserArgs args, InvokeOptions? opts = null)
public static Output<GetIamUserResult> Invoke(GetIamUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamUserResult> getIamUser(GetIamUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: dynatrace:index/getIamUser:getIamUser
arguments:
# arguments dictionary
The following arguments are supported:
- Email string
- Email string
- email String
- email string
- email str
- email String
getIamUser Result
The following output properties are available:
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatrace
Terraform Provider.