Class: AWSCDK::EC2::InitUserOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::InitUserOptions
- Defined in:
- ec2/init_user_options.rb
Overview
Optional parameters used when creating a user.
Instance Attribute Summary collapse
-
#groups ⇒ Array<String>?
readonly
A list of group names.
-
#home_dir ⇒ String?
readonly
The user's home directory.
-
#user_id ⇒ Numeric?
readonly
A user ID.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(groups: nil, home_dir: nil, user_id: nil) ⇒ InitUserOptions
constructor
A new instance of InitUserOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(groups: nil, home_dir: nil, user_id: nil) ⇒ InitUserOptions
Returns a new instance of InitUserOptions.
10 11 12 13 14 15 16 17 |
# File 'ec2/init_user_options.rb', line 10 def initialize(groups: nil, home_dir: nil, user_id: nil) @groups = groups Jsii::Type.check_type(@groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "groups") unless @groups.nil? @home_dir = home_dir Jsii::Type.check_type(@home_dir, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "homeDir") unless @home_dir.nil? @user_id = user_id Jsii::Type.check_type(@user_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "userId") unless @user_id.nil? end |
Instance Attribute Details
#groups ⇒ Array<String>? (readonly)
Note:
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.
25 26 27 |
# File 'ec2/init_user_options.rb', line 25 def groups @groups end |
#home_dir ⇒ String? (readonly)
Note:
Default: assigned by the OS
The user's home directory.
30 31 32 |
# File 'ec2/init_user_options.rb', line 30 def home_dir @home_dir end |
#user_id ⇒ Numeric? (readonly)
Note:
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.
39 40 41 |
# File 'ec2/init_user_options.rb', line 39 def user_id @user_id end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'ec2/init_user_options.rb', line 41 def self.jsii_properties { :groups => "groups", :home_dir => "homeDir", :user_id => "userId", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'ec2/init_user_options.rb', line 49 def to_jsii result = {} result.merge!({ "groups" => @groups, "homeDir" => @home_dir, "userId" => @user_id, }) result.compact end |