1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. workmail
  6. User
Viewing docs for AWS v7.30.0
published on Thursday, May 14, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.30.0
published on Thursday, May 14, 2026 by Pulumi

    Manages an AWS WorkMail User.

    This resource registers the user with WorkMail on create so the mailbox is enabled and ready for use. This results in the accumulation of costs, for more details, see pricing. On destroy, it deregisters the user before deletion.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.workmail.Organization("example", {
        organizationAlias: "example-org",
        deleteDirectory: true,
    });
    const exampleUser = new aws.workmail.User("example", {
        organizationId: example.organizationId,
        name: "example-user",
        displayName: "Example User",
        email: "example-user@example.com",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.workmail.Organization("example",
        organization_alias="example-org",
        delete_directory=True)
    example_user = aws.workmail.User("example",
        organization_id=example.organization_id,
        name="example-user",
        display_name="Example User",
        email="example-user@example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/workmail"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := workmail.NewOrganization(ctx, "example", &workmail.OrganizationArgs{
    			OrganizationAlias: pulumi.String("example-org"),
    			DeleteDirectory:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = workmail.NewUser(ctx, "example", &workmail.UserArgs{
    			OrganizationId: example.OrganizationId,
    			Name:           pulumi.String("example-user"),
    			DisplayName:    pulumi.String("Example User"),
    			Email:          pulumi.String("example-user@example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.WorkMail.Organization("example", new()
        {
            OrganizationAlias = "example-org",
            DeleteDirectory = true,
        });
    
        var exampleUser = new Aws.WorkMail.User("example", new()
        {
            OrganizationId = example.OrganizationId,
            Name = "example-user",
            DisplayName = "Example User",
            Email = "example-user@example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.workmail.Organization;
    import com.pulumi.aws.workmail.OrganizationArgs;
    import com.pulumi.aws.workmail.User;
    import com.pulumi.aws.workmail.UserArgs;
    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 example = new Organization("example", OrganizationArgs.builder()
                .organizationAlias("example-org")
                .deleteDirectory(true)
                .build());
    
            var exampleUser = new User("exampleUser", UserArgs.builder()
                .organizationId(example.organizationId())
                .name("example-user")
                .displayName("Example User")
                .email("example-user@example.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:workmail:Organization
        properties:
          organizationAlias: example-org
          deleteDirectory: true
      exampleUser:
        type: aws:workmail:User
        name: example
        properties:
          organizationId: ${example.organizationId}
          name: example-user
          displayName: Example User
          email: example-user@example.com
    
    Example coming soon!
    

    Create User Resource

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

    Constructor syntax

    new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             args: UserArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def User(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             display_name: Optional[str] = None,
             organization_id: Optional[str] = None,
             email: Optional[str] = None,
             job_title: Optional[str] = None,
             name: Optional[str] = None,
             country: Optional[str] = None,
             first_name: Optional[str] = None,
             hidden_from_global_address_list: Optional[bool] = None,
             identity_provider_user_id: Optional[str] = None,
             initials: Optional[str] = None,
             city: Optional[str] = None,
             last_name: Optional[str] = None,
             department: Optional[str] = None,
             office: Optional[str] = None,
             company: Optional[str] = None,
             password: Optional[str] = None,
             region: Optional[str] = None,
             street: Optional[str] = None,
             telephone: Optional[str] = None,
             user_role: Optional[str] = None,
             zip_code: Optional[str] = None)
    func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs args, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: aws:workmail:User
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_workmail_user" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args UserArgs
    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 UserArgs
    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 UserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserArgs
    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 exampleuserResourceResourceFromWorkmailuser = new Aws.WorkMail.User("exampleuserResourceResourceFromWorkmailuser", new()
    {
        DisplayName = "string",
        OrganizationId = "string",
        Email = "string",
        JobTitle = "string",
        Name = "string",
        Country = "string",
        FirstName = "string",
        HiddenFromGlobalAddressList = false,
        IdentityProviderUserId = "string",
        Initials = "string",
        City = "string",
        LastName = "string",
        Department = "string",
        Office = "string",
        Company = "string",
        Password = "string",
        Region = "string",
        Street = "string",
        Telephone = "string",
        UserRole = "string",
        ZipCode = "string",
    });
    
    example, err := workmail.NewUser(ctx, "exampleuserResourceResourceFromWorkmailuser", &workmail.UserArgs{
    	DisplayName:                 pulumi.String("string"),
    	OrganizationId:              pulumi.String("string"),
    	Email:                       pulumi.String("string"),
    	JobTitle:                    pulumi.String("string"),
    	Name:                        pulumi.String("string"),
    	Country:                     pulumi.String("string"),
    	FirstName:                   pulumi.String("string"),
    	HiddenFromGlobalAddressList: pulumi.Bool(false),
    	IdentityProviderUserId:      pulumi.String("string"),
    	Initials:                    pulumi.String("string"),
    	City:                        pulumi.String("string"),
    	LastName:                    pulumi.String("string"),
    	Department:                  pulumi.String("string"),
    	Office:                      pulumi.String("string"),
    	Company:                     pulumi.String("string"),
    	Password:                    pulumi.String("string"),
    	Region:                      pulumi.String("string"),
    	Street:                      pulumi.String("string"),
    	Telephone:                   pulumi.String("string"),
    	UserRole:                    pulumi.String("string"),
    	ZipCode:                     pulumi.String("string"),
    })
    
    resource "aws_workmail_user" "exampleuserResourceResourceFromWorkmailuser" {
      display_name                    = "string"
      organization_id                 = "string"
      email                           = "string"
      job_title                       = "string"
      name                            = "string"
      country                         = "string"
      first_name                      = "string"
      hidden_from_global_address_list = false
      identity_provider_user_id       = "string"
      initials                        = "string"
      city                            = "string"
      last_name                       = "string"
      department                      = "string"
      office                          = "string"
      company                         = "string"
      password                        = "string"
      region                          = "string"
      street                          = "string"
      telephone                       = "string"
      user_role                       = "string"
      zip_code                        = "string"
    }
    
    var exampleuserResourceResourceFromWorkmailuser = new com.pulumi.aws.workmail.User("exampleuserResourceResourceFromWorkmailuser", com.pulumi.aws.workmail.UserArgs.builder()
        .displayName("string")
        .organizationId("string")
        .email("string")
        .jobTitle("string")
        .name("string")
        .country("string")
        .firstName("string")
        .hiddenFromGlobalAddressList(false)
        .identityProviderUserId("string")
        .initials("string")
        .city("string")
        .lastName("string")
        .department("string")
        .office("string")
        .company("string")
        .password("string")
        .region("string")
        .street("string")
        .telephone("string")
        .userRole("string")
        .zipCode("string")
        .build());
    
    exampleuser_resource_resource_from_workmailuser = aws.workmail.User("exampleuserResourceResourceFromWorkmailuser",
        display_name="string",
        organization_id="string",
        email="string",
        job_title="string",
        name="string",
        country="string",
        first_name="string",
        hidden_from_global_address_list=False,
        identity_provider_user_id="string",
        initials="string",
        city="string",
        last_name="string",
        department="string",
        office="string",
        company="string",
        password="string",
        region="string",
        street="string",
        telephone="string",
        user_role="string",
        zip_code="string")
    
    const exampleuserResourceResourceFromWorkmailuser = new aws.workmail.User("exampleuserResourceResourceFromWorkmailuser", {
        displayName: "string",
        organizationId: "string",
        email: "string",
        jobTitle: "string",
        name: "string",
        country: "string",
        firstName: "string",
        hiddenFromGlobalAddressList: false,
        identityProviderUserId: "string",
        initials: "string",
        city: "string",
        lastName: "string",
        department: "string",
        office: "string",
        company: "string",
        password: "string",
        region: "string",
        street: "string",
        telephone: "string",
        userRole: "string",
        zipCode: "string",
    });
    
    type: aws:workmail:User
    properties:
        city: string
        company: string
        country: string
        department: string
        displayName: string
        email: string
        firstName: string
        hiddenFromGlobalAddressList: false
        identityProviderUserId: string
        initials: string
        jobTitle: string
        lastName: string
        name: string
        office: string
        organizationId: string
        password: string
        region: string
        street: string
        telephone: string
        userRole: string
        zipCode: string
    

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

    DisplayName string
    Display name of the user.
    Email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    OrganizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    City string
    City where the user is located.
    Company string
    Company associated with the user.
    Country string
    Country where the user is located.
    Department string
    Department associated with the user.
    FirstName string
    First name of the user.
    HiddenFromGlobalAddressList bool
    Whether to hide the user from the global address list. Defaults to false.
    IdentityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    Initials string
    Initials of the user.
    JobTitle string
    Job title of the user.
    LastName string
    Last name of the user.
    Name string
    Username of the user.
    Office string
    Office where the user is located.
    Password string
    Password to set for the user.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Street string
    Street address of the user.
    Telephone string
    Telephone number of the user.
    UserRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    ZipCode string
    ZIP or postal code of the user.
    DisplayName string
    Display name of the user.
    Email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    OrganizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    City string
    City where the user is located.
    Company string
    Company associated with the user.
    Country string
    Country where the user is located.
    Department string
    Department associated with the user.
    FirstName string
    First name of the user.
    HiddenFromGlobalAddressList bool
    Whether to hide the user from the global address list. Defaults to false.
    IdentityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    Initials string
    Initials of the user.
    JobTitle string
    Job title of the user.
    LastName string
    Last name of the user.
    Name string
    Username of the user.
    Office string
    Office where the user is located.
    Password string
    Password to set for the user.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Street string
    Street address of the user.
    Telephone string
    Telephone number of the user.
    UserRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    ZipCode string
    ZIP or postal code of the user.
    display_name string
    Display name of the user.
    email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    organization_id string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    city string
    City where the user is located.
    company string
    Company associated with the user.
    country string
    Country where the user is located.
    department string
    Department associated with the user.
    first_name string
    First name of the user.
    hidden_from_global_address_list bool
    Whether to hide the user from the global address list. Defaults to false.
    identity_provider_user_id string
    User ID from IAM Identity Center associated with the user.
    initials string
    Initials of the user.
    job_title string
    Job title of the user.
    last_name string
    Last name of the user.
    name string
    Username of the user.
    office string
    Office where the user is located.
    password string
    Password to set for the user.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    street string
    Street address of the user.
    telephone string
    Telephone number of the user.
    user_role string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zip_code string
    ZIP or postal code of the user.
    displayName String
    Display name of the user.
    email String
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    organizationId String

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    city String
    City where the user is located.
    company String
    Company associated with the user.
    country String
    Country where the user is located.
    department String
    Department associated with the user.
    firstName String
    First name of the user.
    hiddenFromGlobalAddressList Boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderUserId String
    User ID from IAM Identity Center associated with the user.
    initials String
    Initials of the user.
    jobTitle String
    Job title of the user.
    lastName String
    Last name of the user.
    name String
    Username of the user.
    office String
    Office where the user is located.
    password String
    Password to set for the user.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    street String
    Street address of the user.
    telephone String
    Telephone number of the user.
    userRole String
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode String
    ZIP or postal code of the user.
    displayName string
    Display name of the user.
    email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    organizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    city string
    City where the user is located.
    company string
    Company associated with the user.
    country string
    Country where the user is located.
    department string
    Department associated with the user.
    firstName string
    First name of the user.
    hiddenFromGlobalAddressList boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    initials string
    Initials of the user.
    jobTitle string
    Job title of the user.
    lastName string
    Last name of the user.
    name string
    Username of the user.
    office string
    Office where the user is located.
    password string
    Password to set for the user.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    street string
    Street address of the user.
    telephone string
    Telephone number of the user.
    userRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode string
    ZIP or postal code of the user.
    display_name str
    Display name of the user.
    email str
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    organization_id str

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    city str
    City where the user is located.
    company str
    Company associated with the user.
    country str
    Country where the user is located.
    department str
    Department associated with the user.
    first_name str
    First name of the user.
    hidden_from_global_address_list bool
    Whether to hide the user from the global address list. Defaults to false.
    identity_provider_user_id str
    User ID from IAM Identity Center associated with the user.
    initials str
    Initials of the user.
    job_title str
    Job title of the user.
    last_name str
    Last name of the user.
    name str
    Username of the user.
    office str
    Office where the user is located.
    password str
    Password to set for the user.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    street str
    Street address of the user.
    telephone str
    Telephone number of the user.
    user_role str
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zip_code str
    ZIP or postal code of the user.
    displayName String
    Display name of the user.
    email String
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    organizationId String

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    city String
    City where the user is located.
    company String
    Company associated with the user.
    country String
    Country where the user is located.
    department String
    Department associated with the user.
    firstName String
    First name of the user.
    hiddenFromGlobalAddressList Boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderUserId String
    User ID from IAM Identity Center associated with the user.
    initials String
    Initials of the user.
    jobTitle String
    Job title of the user.
    lastName String
    Last name of the user.
    name String
    Username of the user.
    office String
    Office where the user is located.
    password String
    Password to set for the user.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    street String
    Street address of the user.
    telephone String
    Telephone number of the user.
    userRole String
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode String
    ZIP or postal code of the user.

    Outputs

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

    DisabledDate string
    Timestamp when the user was disabled from WorkMail use.
    EnabledDate string
    Timestamp when the user was enabled for WorkMail use.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    MailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    MailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    State string
    Current WorkMail state of the user.
    UserId string
    Identifier of the user.
    DisabledDate string
    Timestamp when the user was disabled from WorkMail use.
    EnabledDate string
    Timestamp when the user was enabled for WorkMail use.
    Id string
    The provider-assigned unique ID for this managed resource.
    IdentityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    MailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    MailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    State string
    Current WorkMail state of the user.
    UserId string
    Identifier of the user.
    disabled_date string
    Timestamp when the user was disabled from WorkMail use.
    enabled_date string
    Timestamp when the user was enabled for WorkMail use.
    id string
    The provider-assigned unique ID for this managed resource.
    identity_provider_identity_store_id string
    Identity store ID from IAM Identity Center associated with the user.
    mailbox_deprovisioned_date string
    Timestamp when the mailbox was removed for the user.
    mailbox_provisioned_date string
    Timestamp when the mailbox was created for the user.
    state string
    Current WorkMail state of the user.
    user_id string
    Identifier of the user.
    disabledDate String
    Timestamp when the user was disabled from WorkMail use.
    enabledDate String
    Timestamp when the user was enabled for WorkMail use.
    id String
    The provider-assigned unique ID for this managed resource.
    identityProviderIdentityStoreId String
    Identity store ID from IAM Identity Center associated with the user.
    mailboxDeprovisionedDate String
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate String
    Timestamp when the mailbox was created for the user.
    state String
    Current WorkMail state of the user.
    userId String
    Identifier of the user.
    disabledDate string
    Timestamp when the user was disabled from WorkMail use.
    enabledDate string
    Timestamp when the user was enabled for WorkMail use.
    id string
    The provider-assigned unique ID for this managed resource.
    identityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    mailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    state string
    Current WorkMail state of the user.
    userId string
    Identifier of the user.
    disabled_date str
    Timestamp when the user was disabled from WorkMail use.
    enabled_date str
    Timestamp when the user was enabled for WorkMail use.
    id str
    The provider-assigned unique ID for this managed resource.
    identity_provider_identity_store_id str
    Identity store ID from IAM Identity Center associated with the user.
    mailbox_deprovisioned_date str
    Timestamp when the mailbox was removed for the user.
    mailbox_provisioned_date str
    Timestamp when the mailbox was created for the user.
    state str
    Current WorkMail state of the user.
    user_id str
    Identifier of the user.
    disabledDate String
    Timestamp when the user was disabled from WorkMail use.
    enabledDate String
    Timestamp when the user was enabled for WorkMail use.
    id String
    The provider-assigned unique ID for this managed resource.
    identityProviderIdentityStoreId String
    Identity store ID from IAM Identity Center associated with the user.
    mailboxDeprovisionedDate String
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate String
    Timestamp when the mailbox was created for the user.
    state String
    Current WorkMail state of the user.
    userId String
    Identifier of the user.

    Look up Existing User Resource

    Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            city: Optional[str] = None,
            company: Optional[str] = None,
            country: Optional[str] = None,
            department: Optional[str] = None,
            disabled_date: Optional[str] = None,
            display_name: Optional[str] = None,
            email: Optional[str] = None,
            enabled_date: Optional[str] = None,
            first_name: Optional[str] = None,
            hidden_from_global_address_list: Optional[bool] = None,
            identity_provider_identity_store_id: Optional[str] = None,
            identity_provider_user_id: Optional[str] = None,
            initials: Optional[str] = None,
            job_title: Optional[str] = None,
            last_name: Optional[str] = None,
            mailbox_deprovisioned_date: Optional[str] = None,
            mailbox_provisioned_date: Optional[str] = None,
            name: Optional[str] = None,
            office: Optional[str] = None,
            organization_id: Optional[str] = None,
            password: Optional[str] = None,
            region: Optional[str] = None,
            state: Optional[str] = None,
            street: Optional[str] = None,
            telephone: Optional[str] = None,
            user_id: Optional[str] = None,
            user_role: Optional[str] = None,
            zip_code: Optional[str] = None) -> User
    func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
    public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
    public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
    resources:  _:    type: aws:workmail:User    get:      id: ${id}
    import {
      to = aws_workmail_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:
    City string
    City where the user is located.
    Company string
    Company associated with the user.
    Country string
    Country where the user is located.
    Department string
    Department associated with the user.
    DisabledDate string
    Timestamp when the user was disabled from WorkMail use.
    DisplayName string
    Display name of the user.
    Email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    EnabledDate string
    Timestamp when the user was enabled for WorkMail use.
    FirstName string
    First name of the user.
    HiddenFromGlobalAddressList bool
    Whether to hide the user from the global address list. Defaults to false.
    IdentityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    IdentityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    Initials string
    Initials of the user.
    JobTitle string
    Job title of the user.
    LastName string
    Last name of the user.
    MailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    MailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    Name string
    Username of the user.
    Office string
    Office where the user is located.
    OrganizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    Password string
    Password to set for the user.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State string
    Current WorkMail state of the user.
    Street string
    Street address of the user.
    Telephone string
    Telephone number of the user.
    UserId string
    Identifier of the user.
    UserRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    ZipCode string
    ZIP or postal code of the user.
    City string
    City where the user is located.
    Company string
    Company associated with the user.
    Country string
    Country where the user is located.
    Department string
    Department associated with the user.
    DisabledDate string
    Timestamp when the user was disabled from WorkMail use.
    DisplayName string
    Display name of the user.
    Email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    EnabledDate string
    Timestamp when the user was enabled for WorkMail use.
    FirstName string
    First name of the user.
    HiddenFromGlobalAddressList bool
    Whether to hide the user from the global address list. Defaults to false.
    IdentityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    IdentityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    Initials string
    Initials of the user.
    JobTitle string
    Job title of the user.
    LastName string
    Last name of the user.
    MailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    MailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    Name string
    Username of the user.
    Office string
    Office where the user is located.
    OrganizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    Password string
    Password to set for the user.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    State string
    Current WorkMail state of the user.
    Street string
    Street address of the user.
    Telephone string
    Telephone number of the user.
    UserId string
    Identifier of the user.
    UserRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    ZipCode string
    ZIP or postal code of the user.
    city string
    City where the user is located.
    company string
    Company associated with the user.
    country string
    Country where the user is located.
    department string
    Department associated with the user.
    disabled_date string
    Timestamp when the user was disabled from WorkMail use.
    display_name string
    Display name of the user.
    email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    enabled_date string
    Timestamp when the user was enabled for WorkMail use.
    first_name string
    First name of the user.
    hidden_from_global_address_list bool
    Whether to hide the user from the global address list. Defaults to false.
    identity_provider_identity_store_id string
    Identity store ID from IAM Identity Center associated with the user.
    identity_provider_user_id string
    User ID from IAM Identity Center associated with the user.
    initials string
    Initials of the user.
    job_title string
    Job title of the user.
    last_name string
    Last name of the user.
    mailbox_deprovisioned_date string
    Timestamp when the mailbox was removed for the user.
    mailbox_provisioned_date string
    Timestamp when the mailbox was created for the user.
    name string
    Username of the user.
    office string
    Office where the user is located.
    organization_id string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    password string
    Password to set for the user.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state string
    Current WorkMail state of the user.
    street string
    Street address of the user.
    telephone string
    Telephone number of the user.
    user_id string
    Identifier of the user.
    user_role string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zip_code string
    ZIP or postal code of the user.
    city String
    City where the user is located.
    company String
    Company associated with the user.
    country String
    Country where the user is located.
    department String
    Department associated with the user.
    disabledDate String
    Timestamp when the user was disabled from WorkMail use.
    displayName String
    Display name of the user.
    email String
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    enabledDate String
    Timestamp when the user was enabled for WorkMail use.
    firstName String
    First name of the user.
    hiddenFromGlobalAddressList Boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderIdentityStoreId String
    Identity store ID from IAM Identity Center associated with the user.
    identityProviderUserId String
    User ID from IAM Identity Center associated with the user.
    initials String
    Initials of the user.
    jobTitle String
    Job title of the user.
    lastName String
    Last name of the user.
    mailboxDeprovisionedDate String
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate String
    Timestamp when the mailbox was created for the user.
    name String
    Username of the user.
    office String
    Office where the user is located.
    organizationId String

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    password String
    Password to set for the user.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state String
    Current WorkMail state of the user.
    street String
    Street address of the user.
    telephone String
    Telephone number of the user.
    userId String
    Identifier of the user.
    userRole String
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode String
    ZIP or postal code of the user.
    city string
    City where the user is located.
    company string
    Company associated with the user.
    country string
    Country where the user is located.
    department string
    Department associated with the user.
    disabledDate string
    Timestamp when the user was disabled from WorkMail use.
    displayName string
    Display name of the user.
    email string
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    enabledDate string
    Timestamp when the user was enabled for WorkMail use.
    firstName string
    First name of the user.
    hiddenFromGlobalAddressList boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderIdentityStoreId string
    Identity store ID from IAM Identity Center associated with the user.
    identityProviderUserId string
    User ID from IAM Identity Center associated with the user.
    initials string
    Initials of the user.
    jobTitle string
    Job title of the user.
    lastName string
    Last name of the user.
    mailboxDeprovisionedDate string
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate string
    Timestamp when the mailbox was created for the user.
    name string
    Username of the user.
    office string
    Office where the user is located.
    organizationId string

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    password string
    Password to set for the user.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state string
    Current WorkMail state of the user.
    street string
    Street address of the user.
    telephone string
    Telephone number of the user.
    userId string
    Identifier of the user.
    userRole string
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode string
    ZIP or postal code of the user.
    city str
    City where the user is located.
    company str
    Company associated with the user.
    country str
    Country where the user is located.
    department str
    Department associated with the user.
    disabled_date str
    Timestamp when the user was disabled from WorkMail use.
    display_name str
    Display name of the user.
    email str
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    enabled_date str
    Timestamp when the user was enabled for WorkMail use.
    first_name str
    First name of the user.
    hidden_from_global_address_list bool
    Whether to hide the user from the global address list. Defaults to false.
    identity_provider_identity_store_id str
    Identity store ID from IAM Identity Center associated with the user.
    identity_provider_user_id str
    User ID from IAM Identity Center associated with the user.
    initials str
    Initials of the user.
    job_title str
    Job title of the user.
    last_name str
    Last name of the user.
    mailbox_deprovisioned_date str
    Timestamp when the mailbox was removed for the user.
    mailbox_provisioned_date str
    Timestamp when the mailbox was created for the user.
    name str
    Username of the user.
    office str
    Office where the user is located.
    organization_id str

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    password str
    Password to set for the user.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state str
    Current WorkMail state of the user.
    street str
    Street address of the user.
    telephone str
    Telephone number of the user.
    user_id str
    Identifier of the user.
    user_role str
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zip_code str
    ZIP or postal code of the user.
    city String
    City where the user is located.
    company String
    Company associated with the user.
    country String
    Country where the user is located.
    department String
    Department associated with the user.
    disabledDate String
    Timestamp when the user was disabled from WorkMail use.
    displayName String
    Display name of the user.
    email String
    Primary email address used to register the user with WorkMail. Changing this value forces replacement.
    enabledDate String
    Timestamp when the user was enabled for WorkMail use.
    firstName String
    First name of the user.
    hiddenFromGlobalAddressList Boolean
    Whether to hide the user from the global address list. Defaults to false.
    identityProviderIdentityStoreId String
    Identity store ID from IAM Identity Center associated with the user.
    identityProviderUserId String
    User ID from IAM Identity Center associated with the user.
    initials String
    Initials of the user.
    jobTitle String
    Job title of the user.
    lastName String
    Last name of the user.
    mailboxDeprovisionedDate String
    Timestamp when the mailbox was removed for the user.
    mailboxProvisionedDate String
    Timestamp when the mailbox was created for the user.
    name String
    Username of the user.
    office String
    Office where the user is located.
    organizationId String

    Identifier of the WorkMail organization where the user is managed.

    The following arguments are optional:

    password String
    Password to set for the user.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    state String
    Current WorkMail state of the user.
    street String
    Street address of the user.
    telephone String
    Telephone number of the user.
    userId String
    Identifier of the user.
    userRole String
    Role assigned to the user. Valid values are USER, REMOTE_USER, RESOURCE, and SYSTEM_USER.
    zipCode String
    ZIP or postal code of the user.

    Import

    Identity Schema

    Required

    • organizationId - Identifier of the WorkMail organization.
    • userId - Identifier of the user.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import WorkMail User using organization_id,user_id. For example:

    $ pulumi import aws:workmail/user:User example m-1234567890abcdef1234567890abcdef,12345678-1234-1234-1234-123456789012
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v7.30.0
    published on Thursday, May 14, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.