1. Packages
  2. Dynatrace
  3. API Docs
  4. getIamUser
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse

dynatrace.getIamUser

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse

    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:

    Email string
    Groups List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Uid string
    Email string
    Groups []string
    Id string
    The provider-assigned unique ID for this managed resource.
    Uid string
    email String
    groups List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    uid String
    email string
    groups string[]
    id string
    The provider-assigned unique ID for this managed resource.
    uid string
    email str
    groups Sequence[str]
    id str
    The provider-assigned unique ID for this managed resource.
    uid str
    email String
    groups List<String>
    id String
    The provider-assigned unique ID for this managed resource.
    uid String

    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 v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse