Skip to content
v2.273.0

InitUserOptions Struct ​

Optional parameters used when creating a user.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const initUserOptions: ec2.InitUserOptions = {
  groups: ['groups'],
  homeDir: 'homeDir',
  userId: 123,
};

Properties ​

groupsstring[]groupstyping.List[str]groupsList<String>Groupsstring[]Groups*[]*string= the user is not associated with …#
A list of group names.

The user will be added to each group in the list.

default

Default: the user is not associated with any groups.

homeDirstringhome_dirstrhomeDirStringHomeDirstringHomeDir*string= assigned by the OS#
The user's home directory.
userIdnumberuser_idint | floatuserIdNumberUserIddoubleUserId*float64= assigned by the OS#
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.

Used as props by ​