aws-cdk-lib.aws_ec2.InitUserOptions

interface InitUserOptions

LanguageType name
.NETAmazon.CDK.AWS.EC2.InitUserOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#InitUserOptions
Javasoftware.amazon.awscdk.services.ec2.InitUserOptions
Pythonaws_cdk.aws_ec2.InitUserOptions
TypeScript (source)aws-cdk-lib » aws_ec2 » InitUserOptions

Optional parameters used when creating a user.

Example

// 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

NameTypeDescription
groups?string[]A list of group names.
homeDir?stringThe user's home directory.
userId?numberA user ID.

groups?

Type: string[] (optional, default: the user is not associated with any groups.)

A list of group names.

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


homeDir?

Type: string (optional, default: assigned by the OS)

The user's home directory.


userId?

Type: number (optional, default: 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.