Class: AWSCDK::EKS::CfnNodegroup::RemoteAccessProperty

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

Overview

An object representing the remote access configuration for the managed node group.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ec2_ssh_key:, source_security_groups: nil) ⇒ RemoteAccessProperty

Returns a new instance of RemoteAccessProperty.

Parameters:

  • ec2_ssh_key (String)

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

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

    The security group IDs that are allowed SSH access (port 22) to the nodes.



1023
1024
1025
1026
1027
1028
# File 'eks/cfn_nodegroup.rb', line 1023

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

Instance Attribute Details

#ec2_ssh_keyString (readonly)

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

For more information, see Amazon EC2 key pairs and Linux instances in the Amazon Elastic Compute Cloud User Guide for Linux Instances . For Windows, an Amazon EC2 SSH key is used to obtain the RDP password. For more information, see Amazon EC2 key pairs and Windows instances in the Amazon Elastic Compute Cloud User Guide for Windows Instances .



1036
1037
1038
# File 'eks/cfn_nodegroup.rb', line 1036

def ec2_ssh_key
  @ec2_ssh_key
end

#source_security_groupsArray<String>? (readonly)

The security group IDs that are allowed SSH access (port 22) to the nodes.

For Windows, the port is 3389. If you specify an Amazon EC2 SSH key but don't specify a source security group when you create a managed node group, then the port on the nodes is opened to the internet ( 0.0.0.0/0 ). For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide .



1043
1044
1045
# File 'eks/cfn_nodegroup.rb', line 1043

def source_security_groups
  @source_security_groups
end

Class Method Details

.jsii_propertiesObject



1045
1046
1047
1048
1049
1050
# File 'eks/cfn_nodegroup.rb', line 1045

def self.jsii_properties
  {
    :ec2_ssh_key => "ec2SshKey",
    :source_security_groups => "sourceSecurityGroups",
  }
end

Instance Method Details

#to_jsiiObject



1052
1053
1054
1055
1056
1057
1058
1059
# File 'eks/cfn_nodegroup.rb', line 1052

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