Class: AWSCDK::EKS::AWSAuthMapping

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

Overview

AwsAuth mapping.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(groups:, username: nil) ⇒ AWSAuthMapping

Returns a new instance of AWSAuthMapping.

Parameters:

  • groups (Array<String>)

    A list of groups within Kubernetes to which the role is mapped.

  • username (String, nil) (defaults to: nil)

    The user name within Kubernetes to map to the IAM role.



9
10
11
12
13
14
# File 'eks/aws_auth_mapping.rb', line 9

def initialize(groups:, username: nil)
  @groups = groups
  Jsii::Type.check_type(@groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "groups")
  @username = username
  Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "username") unless @username.nil?
end

Instance Attribute Details

#groupsArray<String> (readonly)

A list of groups within Kubernetes to which the role is mapped.



20
21
22
# File 'eks/aws_auth_mapping.rb', line 20

def groups
  @groups
end

#usernameString? (readonly)

Note:

Default: - By default, the user name is the ARN of the IAM role.

The user name within Kubernetes to map to the IAM role.

Returns:

  • (String, nil)


25
26
27
# File 'eks/aws_auth_mapping.rb', line 25

def username
  @username
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'eks/aws_auth_mapping.rb', line 27

def self.jsii_properties
  {
    :groups => "groups",
    :username => "username",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "groups" => @groups,
    "username" => @username,
  })
  result.compact
end