Class User


  • public class User
    extends com.pulumi.resources.CustomResource
    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](https://aws.amazon.com/workmail/pricing/). On destroy, it deregisters the user before deletion. ## Example Usage ### Basic Usage
     
     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());
     
         }
     }
     
     
    ## 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: ```sh $ pulumi import aws:workmail/user:User example m-1234567890abcdef1234567890abcdef,12345678-1234-1234-1234-123456789012 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      User​(java.lang.String name)  
      User​(java.lang.String name, UserArgs args)  
      User​(java.lang.String name, UserArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> city()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> company()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> country()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> department()  
      com.pulumi.core.Output<java.lang.String> disabledDate()  
      com.pulumi.core.Output<java.lang.String> displayName()  
      com.pulumi.core.Output<java.lang.String> email()  
      com.pulumi.core.Output<java.lang.String> enabledDate()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> firstName()  
      static User get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, UserState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.Boolean> hiddenFromGlobalAddressList()  
      com.pulumi.core.Output<java.lang.String> identityProviderIdentityStoreId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> identityProviderUserId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> initials()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> jobTitle()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> lastName()  
      com.pulumi.core.Output<java.lang.String> mailboxDeprovisionedDate()  
      com.pulumi.core.Output<java.lang.String> mailboxProvisionedDate()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> office()  
      com.pulumi.core.Output<java.lang.String> organizationId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> password()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> state()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> street()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> telephone()  
      com.pulumi.core.Output<java.lang.String> userId()  
      com.pulumi.core.Output<java.lang.String> userRole()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> zipCode()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • User

        public User​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • User

        public User​(java.lang.String name,
                    UserArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • User

        public User​(java.lang.String name,
                    UserArgs args,
                    @Nullable
                    com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • city

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> city()
        Returns:
        City where the user is located.
      • company

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> company()
        Returns:
        Company associated with the user.
      • country

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> country()
        Returns:
        Country where the user is located.
      • department

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> department()
        Returns:
        Department associated with the user.
      • disabledDate

        public com.pulumi.core.Output<java.lang.String> disabledDate()
        Returns:
        Timestamp when the user was disabled from WorkMail use.
      • displayName

        public com.pulumi.core.Output<java.lang.String> displayName()
        Returns:
        Display name of the user.
      • email

        public com.pulumi.core.Output<java.lang.String> email()
        Returns:
        Primary email address used to register the user with WorkMail. Changing this value forces replacement.
      • enabledDate

        public com.pulumi.core.Output<java.lang.String> enabledDate()
        Returns:
        Timestamp when the user was enabled for WorkMail use.
      • firstName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> firstName()
        Returns:
        First name of the user.
      • hiddenFromGlobalAddressList

        public com.pulumi.core.Output<java.lang.Boolean> hiddenFromGlobalAddressList()
        Returns:
        Whether to hide the user from the global address list. Defaults to `false`.
      • identityProviderIdentityStoreId

        public com.pulumi.core.Output<java.lang.String> identityProviderIdentityStoreId()
        Returns:
        Identity store ID from IAM Identity Center associated with the user.
      • identityProviderUserId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> identityProviderUserId()
        Returns:
        User ID from IAM Identity Center associated with the user.
      • initials

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> initials()
        Returns:
        Initials of the user.
      • jobTitle

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> jobTitle()
        Returns:
        Job title of the user.
      • lastName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> lastName()
        Returns:
        Last name of the user.
      • mailboxDeprovisionedDate

        public com.pulumi.core.Output<java.lang.String> mailboxDeprovisionedDate()
        Returns:
        Timestamp when the mailbox was removed for the user.
      • mailboxProvisionedDate

        public com.pulumi.core.Output<java.lang.String> mailboxProvisionedDate()
        Returns:
        Timestamp when the mailbox was created for the user.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Username of the user.
      • office

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> office()
        Returns:
        Office where the user is located.
      • organizationId

        public com.pulumi.core.Output<java.lang.String> organizationId()
        Returns:
        Identifier of the WorkMail organization where the user is managed. The following arguments are optional:
      • password

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> password()
        Returns:
        Password to set for the user.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        Current WorkMail state of the user.
      • street

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> street()
        Returns:
        Street address of the user.
      • telephone

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> telephone()
        Returns:
        Telephone number of the user.
      • userId

        public com.pulumi.core.Output<java.lang.String> userId()
        Returns:
        Identifier of the user.
      • userRole

        public com.pulumi.core.Output<java.lang.String> userRole()
        Returns:
        Role assigned to the user. Valid values are `USER`, `REMOTE_USER`, `RESOURCE`, and `SYSTEM_USER`.
      • zipCode

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> zipCode()
        Returns:
        ZIP or postal code of the user.
      • get

        public static User get​(java.lang.String name,
                               com.pulumi.core.Output<java.lang.String> id,
                               @Nullable
                               UserState state,
                               @Nullable
                               com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.