1. Packages
  2. Dynatrace
  3. API Docs
  4. IamUser
Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs

dynatrace.IamUser

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs

    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

    Prerequisites

    Using this resource requires an OAuth client to be configured within your account settings. The scopes of the OAuth Client need to include account-idm-read, account-idm-write, account-env-read, account-env-write, iam-policies-management, iam:policies:write, iam:policies:read, iam:bindings:write, iam:bindings:read and iam:effective-permissions:read.

    Finally the provider configuration requires the credentials for that OAuth Client. The configuration section of your provider needs to look like this.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Resource Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@lbrlabs/pulumi-dynatrace";
    
    const johnDoeGmailCom = new dynatrace.IamUser("johnDoeGmailCom", {
        email: "john.doe@gmail.com",
        groups: [data.dynatrace_iam_group.Restricted.id],
    });
    
    import pulumi
    import lbrlabs_pulumi_dynatrace as dynatrace
    
    john_doe_gmail_com = dynatrace.IamUser("johnDoeGmailCom",
        email="john.doe@gmail.com",
        groups=[data["dynatrace_iam_group"]["Restricted"]["id"]])
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Lbrlabs.PulumiPackage.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,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dynatrace/sdk/go/dynatrace"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    resources:
      johnDoeGmailCom:
        type: dynatrace:IamUser
        properties:
          email: john.doe@gmail.com
          groups:
            - ${data.dynatrace_iam_group.Restricted.id}
    

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

    Example

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

    var iamUserResource = new Dynatrace.IamUser("iamUserResource", new()
    {
        Email = "string",
        Groups = new[]
        {
            "string",
        },
    });
    
    example, err := dynatrace.NewIamUser(ctx, "iamUserResource", &dynatrace.IamUserArgs{
    	Email: pulumi.String("string"),
    	Groups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var iamUserResource = new IamUser("iamUserResource", IamUserArgs.builder()        
        .email("string")
        .groups("string")
        .build());
    
    iam_user_resource = dynatrace.IamUser("iamUserResource",
        email="string",
        groups=["string"])
    
    const iamUserResource = new dynatrace.IamUser("iamUserResource", {
        email: "string",
        groups: ["string"],
    });
    
    type: dynatrace:IamUser
    properties:
        email: string
        groups:
            - string
    

    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

    The IamUser resource accepts the following input properties:

    Email string
    Groups List<string>
    Email string
    Groups []string
    email String
    groups List<String>
    email string
    groups string[]
    email str
    groups Sequence[str]
    email 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.
    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 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) -> 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)
    Resource lookup is not supported in YAML
    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:
    Email string
    Groups List<string>
    Email string
    Groups []string
    email String
    groups List<String>
    email string
    groups string[]
    email str
    groups Sequence[str]
    email String
    groups List<String>

    Package Details

    Repository
    dynatrace lbrlabs/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.1.0 published on Wednesday, May 24, 2023 by Lbrlabs