Class User
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.directoryservicedata.User
-
public class User extends com.pulumi.resources.CustomResourceManages a user in an AWS Directory Service directory. ## Example Usage ### Basic Usage The following example assumes an existing Directory Service directory with Directory Service Data access enabled.
## Import ### Identity Schema #### Required * `directoryId` (String) ID of the Directory Service directory where the user is managed. * `samAccountName` (String) SAM account name 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 Directory Service Data User using the directory ID and SAM account name separated by a comma. For example: ```sh $ pulumi import aws:directoryservicedata/user:User example d-1234567890,exampleuser ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.directoryservicedata.User; import com.pulumi.aws.directoryservicedata.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 User("example", UserArgs.builder() .directoryId("d-1234567890") .samAccountName("exampleuser") .emailAddress("exampleuser@example.com") .givenName("Example") .surname("User") .build());}}
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>directoryId()com.pulumi.core.Output<java.lang.String>distinguishedName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>emailAddress()com.pulumi.core.Output<java.lang.Boolean>enabled()static Userget(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.util.Optional<java.lang.String>>givenName()com.pulumi.core.Output<java.lang.String>realm()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>samAccountName()com.pulumi.core.Output<java.lang.String>sid()com.pulumi.core.Output<java.util.Optional<java.lang.String>>surname()com.pulumi.core.Output<java.lang.String>userPrincipalName()
-
-
-
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
-
directoryId
public com.pulumi.core.Output<java.lang.String> directoryId()
- Returns:
- ID of the Directory that's associated with the user.
-
distinguishedName
public com.pulumi.core.Output<java.lang.String> distinguishedName()
- Returns:
- Distinguished name of the user.
-
emailAddress
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> emailAddress()
- Returns:
- Email address of the user.
-
enabled
public com.pulumi.core.Output<java.lang.Boolean> enabled()
- Returns:
- Whether the user is active.
-
givenName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> givenName()
- Returns:
- First name of the user.
-
realm
public com.pulumi.core.Output<java.lang.String> realm()
- Returns:
- Realm of the user.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where the user is managed. Defaults to the provider region.
-
samAccountName
public com.pulumi.core.Output<java.lang.String> samAccountName()
- Returns:
- SAM account name of the user. Must contain only word characters, hyphens, and periods. The following arguments are optional:
-
sid
public com.pulumi.core.Output<java.lang.String> sid()
- Returns:
- Unique Security identifier (SID) of the user.
-
surname
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> surname()
- Returns:
- Last name of the user.
-
userPrincipalName
public com.pulumi.core.Output<java.lang.String> userPrincipalName()
- Returns:
- User principal name 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.
-
-