Class: AWSCDK::EC2::NamedPackageOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/named_package_options.rb

Overview

Options for InitPackage.yum/apt/rubyGem/python.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_restart_handles: nil, version: nil) ⇒ NamedPackageOptions

Returns a new instance of NamedPackageOptions.

Parameters:

  • service_restart_handles (Array<AWSCDK::EC2::InitServiceRestartHandle>, nil) (defaults to: nil)

    Restart the given services after this command has run.

  • version (Array<String>, nil) (defaults to: nil)

    Specify the versions to install.



9
10
11
12
13
14
# File 'ec2/named_package_options.rb', line 9

def initialize(service_restart_handles: nil, version: 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?
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "version") unless @version.nil?
end

Instance Attribute Details

#service_restart_handlesArray<AWSCDK::EC2::InitServiceRestartHandle>? (readonly)

Note:

Default: - Do not restart any service

Restart the given services after this command has run.

Returns:



20
21
22
# File 'ec2/named_package_options.rb', line 20

def service_restart_handles
  @service_restart_handles
end

#versionArray<String>? (readonly)

Note:

Default: - Install the latest version

Specify the versions to install.

Returns:

  • (Array<String>, nil)


25
26
27
# File 'ec2/named_package_options.rb', line 25

def version
  @version
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'ec2/named_package_options.rb', line 27

def self.jsii_properties
  {
    :service_restart_handles => "serviceRestartHandles",
    :version => "version",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'ec2/named_package_options.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "serviceRestartHandles" => @service_restart_handles,
    "version" => @version,
  })
  result.compact
end