Class InitUserOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.InitUserOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<InitUserOptions>
- Enclosing interface:
InitUserOptions
@Stability(Stable)
public static final class InitUserOptions.Builder
extends Object
implements software.amazon.jsii.Builder<InitUserOptions>
A builder for
InitUserOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofInitUserOptions.getGroups()
Sets the value ofInitUserOptions.getHomeDir()
Sets the value ofInitUserOptions.getUserId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
groups
Sets the value ofInitUserOptions.getGroups()
- Parameters:
groups
- A list of group names. The user will be added to each group in the list.- Returns:
this
-
homeDir
Sets the value ofInitUserOptions.getHomeDir()
- Parameters:
homeDir
- The user's home directory.- Returns:
this
-
userId
Sets the value ofInitUserOptions.getUserId()
- Parameters:
userId
- A user ID. The creation process fails if the user name exists with a different user ID. If the user ID is already assigned to an existing user the operating system may reject the creation request.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<InitUserOptions>
- Returns:
- a new instance of
InitUserOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-