Class: AWSCDK::EKS::AccessEntryProps

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

Overview

Represents the properties required to create an Amazon EKS access entry.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(access_policies:, cluster:, principal:, access_entry_name: nil, access_entry_type: nil, removal_policy: nil) ⇒ AccessEntryProps

Returns a new instance of AccessEntryProps.

Parameters:

  • access_policies (Array<AWSCDK::EKS::IAccessPolicy>)

    The access policies that define the permissions and scope for the access entry.

  • cluster (AWSCDK::EKS::ICluster)

    The Amazon EKS cluster to which the access entry applies.

  • principal (String)

    The Amazon Resource Name (ARN) of the principal (user or role) to associate the access entry with.

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

    The name of the AccessEntry.

  • access_entry_type (AWSCDK::EKS::AccessEntryType, nil) (defaults to: nil)

    The type of the AccessEntry.

  • removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    The removal policy applied to the access entry.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'eks/access_entry_props.rb', line 13

def initialize(access_policies:, cluster:, principal:, access_entry_name: nil, access_entry_type: nil, removal_policy: nil)
  @access_policies = access_policies
  Jsii::Type.check_type(@access_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuSUFjY2Vzc1BvbGljeSJ9LCJraW5kIjoiYXJyYXkifX0=")), "accessPolicies")
  @cluster = cluster
  Jsii::Type.check_type(@cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLklDbHVzdGVyIn0=")), "cluster")
  @principal = principal
  Jsii::Type.check_type(@principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal")
  @access_entry_name = access_entry_name
  Jsii::Type.check_type(@access_entry_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accessEntryName") unless @access_entry_name.nil?
  @access_entry_type = access_entry_type
  Jsii::Type.check_type(@access_entry_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkFjY2Vzc0VudHJ5VHlwZSJ9")), "accessEntryType") unless @access_entry_type.nil?
  @removal_policy = removal_policy
  Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil?
end

Instance Attribute Details

#access_entry_nameString? (readonly)

Note:

Default: - No access entry name is provided

The name of the AccessEntry.

Returns:

  • (String, nil)


44
45
46
# File 'eks/access_entry_props.rb', line 44

def access_entry_name
  @access_entry_name
end

#access_entry_typeAWSCDK::EKS::AccessEntryType? (readonly)

Note:

Default: STANDARD

The type of the AccessEntry.



49
50
51
# File 'eks/access_entry_props.rb', line 49

def access_entry_type
  @access_entry_type
end

#access_policiesArray<AWSCDK::EKS::IAccessPolicy> (readonly)

The access policies that define the permissions and scope for the access entry.

Returns:



31
32
33
# File 'eks/access_entry_props.rb', line 31

def access_policies
  @access_policies
end

#clusterAWSCDK::EKS::ICluster (readonly)

The Amazon EKS cluster to which the access entry applies.



35
36
37
# File 'eks/access_entry_props.rb', line 35

def cluster
  @cluster
end

#principalString (readonly)

The Amazon Resource Name (ARN) of the principal (user or role) to associate the access entry with.

Returns:

  • (String)


39
40
41
# File 'eks/access_entry_props.rb', line 39

def principal
  @principal
end

#removal_policyAWSCDK::RemovalPolicy? (readonly)

Note:

Default: RemovalPolicy.DESTROY

The removal policy applied to the access entry.

The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

  • The resource is removed from the template, so CloudFormation stops managing it
  • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
  • The stack is deleted, so CloudFormation stops managing all resources in it

Returns:



61
62
63
# File 'eks/access_entry_props.rb', line 61

def removal_policy
  @removal_policy
end

Class Method Details

.jsii_propertiesObject



63
64
65
66
67
68
69
70
71
72
# File 'eks/access_entry_props.rb', line 63

def self.jsii_properties
  {
    :access_policies => "accessPolicies",
    :cluster => "cluster",
    :principal => "principal",
    :access_entry_name => "accessEntryName",
    :access_entry_type => "accessEntryType",
    :removal_policy => "removalPolicy",
  }
end

Instance Method Details

#to_jsiiObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'eks/access_entry_props.rb', line 74

def to_jsii
  result = {}
  result.merge!({
    "accessPolicies" => @access_policies,
    "cluster" => @cluster,
    "principal" => @principal,
    "accessEntryName" => @access_entry_name,
    "accessEntryType" => @access_entry_type,
    "removalPolicy" => @removal_policy,
  })
  result.compact
end