Class: AWSCDK::EC2::InitFileOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::InitFileOptions
- Defined in:
- ec2/init_file_options.rb
Overview
Options for InitFile.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base64_encoded ⇒ Boolean?
readonly
True if the inlined content (from a string or file) should be treated as base64 encoded.
-
#group ⇒ String?
readonly
The name of the owning group for this file.
-
#mode ⇒ String?
readonly
A six-digit octal value representing the mode for this file.
-
#owner ⇒ String?
readonly
The name of the owning user for this file.
-
#service_restart_handles ⇒ Array<AWSCDK::EC2::InitServiceRestartHandle>?
readonly
Restart the given service after this file has been written.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(base64_encoded: nil, group: nil, mode: nil, owner: nil, service_restart_handles: nil) ⇒ InitFileOptions
constructor
A new instance of InitFileOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(base64_encoded: nil, group: nil, mode: nil, owner: nil, service_restart_handles: nil) ⇒ InitFileOptions
Returns a new instance of InitFileOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'ec2/init_file_options.rb', line 12 def initialize(base64_encoded: nil, group: nil, mode: nil, owner: nil, service_restart_handles: nil) @base64_encoded = base64_encoded Jsii::Type.check_type(@base64_encoded, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "base64Encoded") unless @base64_encoded.nil? @group = group Jsii::Type.check_type(@group, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "group") unless @group.nil? @mode = mode Jsii::Type.check_type(@mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mode") unless @mode.nil? @owner = owner Jsii::Type.check_type(@owner, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "owner") unless @owner.nil? @service_restart_handles = service_restart_handles Jsii::Type.check_type(@service_restart_handles, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSW5pdFNlcnZpY2VSZXN0YXJ0SGFuZGxlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "serviceRestartHandles") unless @service_restart_handles.nil? end |
Instance Attribute Details
#base64_encoded ⇒ Boolean? (readonly)
Default: false
True if the inlined content (from a string or file) should be treated as base64 encoded.
Only applicable for inlined string and file content.
31 32 33 |
# File 'ec2/init_file_options.rb', line 31 def base64_encoded @base64_encoded end |
#group ⇒ String? (readonly)
Default: 'root'
The name of the owning group for this file.
Not supported for Windows systems.
38 39 40 |
# File 'ec2/init_file_options.rb', line 38 def group @group end |
#mode ⇒ String? (readonly)
Default: '000644'
A six-digit octal value representing the mode for this file.
Use the first three digits for symlinks and the last three digits for setting permissions. To create a symlink, specify 120xxx, where xxx defines the permissions of the target file. To specify permissions for a file, use the last three digits, such as 000644.
Not supported for Windows systems.
50 51 52 |
# File 'ec2/init_file_options.rb', line 50 def mode @mode end |
#owner ⇒ String? (readonly)
Default: 'root'
The name of the owning user for this file.
Not supported for Windows systems.
57 58 59 |
# File 'ec2/init_file_options.rb', line 57 def owner @owner end |
#service_restart_handles ⇒ Array<AWSCDK::EC2::InitServiceRestartHandle>? (readonly)
Default: - Do not restart any service
Restart the given service after this file has been written.
62 63 64 |
# File 'ec2/init_file_options.rb', line 62 def service_restart_handles @service_restart_handles end |
Class Method Details
.jsii_properties ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'ec2/init_file_options.rb', line 64 def self.jsii_properties { :base64_encoded => "base64Encoded", :group => "group", :mode => "mode", :owner => "owner", :service_restart_handles => "serviceRestartHandles", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'ec2/init_file_options.rb', line 74 def to_jsii result = {} result.merge!({ "base64Encoded" => @base64_encoded, "group" => @group, "mode" => @mode, "owner" => @owner, "serviceRestartHandles" => @service_restart_handles, }) result.compact end |