1. Registry
  2. Packages
  3. Linode Provider
  4. API Docs
  5. IamUser
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi
linode logo linode logo
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi

    Manages IAM information about a Linode user For more information, see the Linode APIv4 docs.

    Example Usage

    The following example shows how one might use this data source to access IAM information about a Linode user.

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const foo = new linode.IamUser("foo", {
        username: "foo",
        accountAccesses: [
            "account_event_viewer",
            "account_maintenance_viewer",
            "account_notification_viewer",
            "account_oauth_client_admin",
        ],
        entityAccesses: [{
            id: 1111111,
            type: "volume",
            roles: ["volume_admin"],
        }],
    });
    
    import pulumi
    import pulumi_linode as linode
    
    foo = linode.IamUser("foo",
        username="foo",
        account_accesses=[
            "account_event_viewer",
            "account_maintenance_viewer",
            "account_notification_viewer",
            "account_oauth_client_admin",
        ],
        entity_accesses=[{
            "id": 1111111,
            "type": "volume",
            "roles": ["volume_admin"],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.NewIamUser(ctx, "foo", &linode.IamUserArgs{
    			Username: pulumi.String("foo"),
    			AccountAccesses: pulumi.StringArray{
    				pulumi.String("account_event_viewer"),
    				pulumi.String("account_maintenance_viewer"),
    				pulumi.String("account_notification_viewer"),
    				pulumi.String("account_oauth_client_admin"),
    			},
    			EntityAccesses: linode.IamUserEntityAccessArray{
    				&linode.IamUserEntityAccessArgs{
    					Id:   pulumi.Int(1111111),
    					Type: pulumi.String("volume"),
    					Roles: pulumi.StringArray{
    						pulumi.String("volume_admin"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Linode.IamUser("foo", new()
        {
            Username = "foo",
            AccountAccesses = new[]
            {
                "account_event_viewer",
                "account_maintenance_viewer",
                "account_notification_viewer",
                "account_oauth_client_admin",
            },
            EntityAccesses = new[]
            {
                new Linode.Inputs.IamUserEntityAccessArgs
                {
                    Id = 1111111,
                    Type = "volume",
                    Roles = new[]
                    {
                        "volume_admin",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.IamUser;
    import com.pulumi.linode.IamUserArgs;
    import com.pulumi.linode.inputs.IamUserEntityAccessArgs;
    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) {
            var foo = new IamUser("foo", IamUserArgs.builder()
                .username("foo")
                .accountAccesses(            
                    "account_event_viewer",
                    "account_maintenance_viewer",
                    "account_notification_viewer",
                    "account_oauth_client_admin")
                .entityAccesses(IamUserEntityAccessArgs.builder()
                    .id(1111111)
                    .type("volume")
                    .roles("volume_admin")
                    .build())
                .build());
    
        }
    }
    
    resources:
      foo:
        type: linode:IamUser
        properties:
          username: foo
          accountAccesses:
            - account_event_viewer
            - account_maintenance_viewer
            - account_notification_viewer
            - account_oauth_client_admin
          entityAccesses:
            - id: 1.111111e+06
              type: volume
              roles:
                - volume_admin
    
    pulumi {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    resource "linode_iamuser" "foo" {
      username         = "foo"
      account_accesses = ["account_event_viewer", "account_maintenance_viewer", "account_notification_viewer", "account_oauth_client_admin"]
      entity_accesses {
        id    = 1111111
        type  = "volume"
        roles = ["volume_admin"]
      }
    }
    

    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,
                username: Optional[str] = None,
                account_accesses: Optional[Sequence[str]] = None,
                entity_accesses: Optional[Sequence[IamUserEntityAccessArgs]] = 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: linode:IamUser
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "linode_iam_user" "name" {
        # resource properties
    }

    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.

    Constructor example

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

    var iamUserResource = new Linode.IamUser("iamUserResource", new()
    {
        Username = "string",
        AccountAccesses = new[]
        {
            "string",
        },
        EntityAccesses = new[]
        {
            new Linode.Inputs.IamUserEntityAccessArgs
            {
                Id = 0,
                Roles = new[]
                {
                    "string",
                },
                Type = "string",
            },
        },
    });
    
    example, err := linode.NewIamUser(ctx, "iamUserResource", &linode.IamUserArgs{
    	Username: pulumi.String("string"),
    	AccountAccesses: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	EntityAccesses: linode.IamUserEntityAccessArray{
    		&linode.IamUserEntityAccessArgs{
    			Id: pulumi.Int(0),
    			Roles: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Type: pulumi.String("string"),
    		},
    	},
    })
    
    resource "linode_iam_user" "iamUserResource" {
      lifecycle {
        create_before_destroy = true
      }
      username         = "string"
      account_accesses = ["string"]
      entity_accesses {
        id    = 0
        roles = ["string"]
        type  = "string"
      }
    }
    
    var iamUserResource = new IamUser("iamUserResource", IamUserArgs.builder()
        .username("string")
        .accountAccesses("string")
        .entityAccesses(IamUserEntityAccessArgs.builder()
            .id(0)
            .roles("string")
            .type("string")
            .build())
        .build());
    
    iam_user_resource = linode.IamUser("iamUserResource",
        username="string",
        account_accesses=["string"],
        entity_accesses=[{
            "id": 0,
            "roles": ["string"],
            "type": "string",
        }])
    
    const iamUserResource = new linode.IamUser("iamUserResource", {
        username: "string",
        accountAccesses: ["string"],
        entityAccesses: [{
            id: 0,
            roles: ["string"],
            type: "string",
        }],
    });
    
    type: linode:IamUser
    properties:
        accountAccesses:
            - string
        entityAccesses:
            - id: 0
              roles:
                - string
              type: string
        username: 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

    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:

    Username string
    The unique username of this User.
    AccountAccesses List<string>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    EntityAccesses List<IamUserEntityAccess>
    The user entity level access.
    Username string
    The unique username of this User.
    AccountAccesses []string
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    EntityAccesses []IamUserEntityAccessArgs
    The user entity level access.
    username string
    The unique username of this User.
    account_accesses list(string)
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entity_accesses list(object)
    The user entity level access.
    username String
    The unique username of this User.
    accountAccesses List<String>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses List<IamUserEntityAccess>
    The user entity level access.
    username string
    The unique username of this User.
    accountAccesses string[]
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses IamUserEntityAccess[]
    The user entity level access.
    username str
    The unique username of this User.
    account_accesses Sequence[str]
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entity_accesses Sequence[IamUserEntityAccessArgs]
    The user entity level access.
    username String
    The unique username of this User.
    accountAccesses List<String>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses List<Property Map>
    The user entity level access.

    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 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,
            account_accesses: Optional[Sequence[str]] = None,
            entity_accesses: Optional[Sequence[IamUserEntityAccessArgs]] = None,
            username: 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: linode:IamUser    get:      id: ${id}
    import {
      to = linode_iam_user.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:
    AccountAccesses List<string>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    EntityAccesses List<IamUserEntityAccess>
    The user entity level access.
    Username string
    The unique username of this User.
    AccountAccesses []string
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    EntityAccesses []IamUserEntityAccessArgs
    The user entity level access.
    Username string
    The unique username of this User.
    account_accesses list(string)
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entity_accesses list(object)
    The user entity level access.
    username string
    The unique username of this User.
    accountAccesses List<String>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses List<IamUserEntityAccess>
    The user entity level access.
    username String
    The unique username of this User.
    accountAccesses string[]
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses IamUserEntityAccess[]
    The user entity level access.
    username string
    The unique username of this User.
    account_accesses Sequence[str]
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entity_accesses Sequence[IamUserEntityAccessArgs]
    The user entity level access.
    username str
    The unique username of this User.
    accountAccesses List<String>
    A list of account level roles the user currently has.

    • entityAccess - (Nested Attribute List) A list of specific entities the user has specific roles for.
    entityAccesses List<Property Map>
    The user entity level access.
    username String
    The unique username of this User.

    Supporting Types

    IamUserEntityAccess, IamUserEntityAccessArgs

    Id int
    The unique ID for the entity.
    Roles List<string>
    A list of the roles for this entity and specific user.
    Type string
    The type of product for the entity. (eg. Volume)
    Id int
    The unique ID for the entity.
    Roles []string
    A list of the roles for this entity and specific user.
    Type string
    The type of product for the entity. (eg. Volume)
    id number
    The unique ID for the entity.
    roles list(string)
    A list of the roles for this entity and specific user.
    type string
    The type of product for the entity. (eg. Volume)
    id Integer
    The unique ID for the entity.
    roles List<String>
    A list of the roles for this entity and specific user.
    type String
    The type of product for the entity. (eg. Volume)
    id number
    The unique ID for the entity.
    roles string[]
    A list of the roles for this entity and specific user.
    type string
    The type of product for the entity. (eg. Volume)
    id int
    The unique ID for the entity.
    roles Sequence[str]
    A list of the roles for this entity and specific user.
    type str
    The type of product for the entity. (eg. Volume)
    id Number
    The unique ID for the entity.
    roles List<String>
    A list of the roles for this entity and specific user.
    type String
    The type of product for the entity. (eg. Volume)

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo linode logo
    Viewing docs for Linode v6.6.0
    published on Tuesday, Sep 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial