Class: AWSCDK::EKS::NodegroupRemoteAccess

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
eks/nodegroup_remote_access.rb

Overview

The remote access (SSH) configuration to use with your node group.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ssh_key_name:, source_security_groups: nil) ⇒ NodegroupRemoteAccess

Returns a new instance of NodegroupRemoteAccess.

Parameters:

  • ssh_key_name (String)

    The Amazon EC2 SSH key that provides access for SSH communication with the worker nodes in the managed node group.

  • source_security_groups (Array<AWSCDK::EC2::ISecurityGroup>, nil) (defaults to: nil)

    The security groups that are allowed SSH access (port 22) to the worker nodes.



11
12
13
14
15
16
# File 'eks/nodegroup_remote_access.rb', line 11

def initialize(ssh_key_name:, source_security_groups: nil)
  @ssh_key_name = ssh_key_name
  Jsii::Type.check_type(@ssh_key_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sshKeyName")
  @source_security_groups = source_security_groups
  Jsii::Type.check_type(@source_security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "sourceSecurityGroups") unless @source_security_groups.nil?
end

Instance Attribute Details

#source_security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

Default: - port 22 on the worker nodes is opened to the internet (0.0.0.0/0)

The security groups that are allowed SSH access (port 22) to the worker nodes.

If you specify an Amazon EC2 SSH key but do not specify a source security group when you create a managed node group, then port 22 on the worker nodes is opened to the internet (0.0.0.0/0).

Returns:



30
31
32
# File 'eks/nodegroup_remote_access.rb', line 30

def source_security_groups
  @source_security_groups
end

#ssh_key_nameString (readonly)

The Amazon EC2 SSH key that provides access for SSH communication with the worker nodes in the managed node group.

Returns:

  • (String)


21
22
23
# File 'eks/nodegroup_remote_access.rb', line 21

def ssh_key_name
  @ssh_key_name
end

Class Method Details

.jsii_propertiesObject



32
33
34
35
36
37
# File 'eks/nodegroup_remote_access.rb', line 32

def self.jsii_properties
  {
    :ssh_key_name => "sshKeyName",
    :source_security_groups => "sourceSecurityGroups",
  }
end

Instance Method Details

#to_jsiiObject



39
40
41
42
43
44
45
46
# File 'eks/nodegroup_remote_access.rb', line 39

def to_jsii
  result = {}
  result.merge!({
    "sshKeyName" => @ssh_key_name,
    "sourceSecurityGroups" => @source_security_groups,
  })
  result.compact
end