Class: AWSCDK::EKS::AccessScope
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKS::AccessScope
- Defined in:
- eks/access_scope.rb
Overview
Represents the scope of an access policy.
The scope defines the namespaces or cluster-level access granted by the policy.
Instance Attribute Summary collapse
-
#namespaces ⇒ Array<String>?
readonly
A Kubernetes namespace that an access policy is scoped to.
-
#type ⇒ AWSCDK::EKS::AccessScopeType
readonly
The scope type of the policy, either 'namespace' or 'cluster'.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, namespaces: nil) ⇒ AccessScope
constructor
A new instance of AccessScope.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, namespaces: nil) ⇒ AccessScope
Returns a new instance of AccessScope.
11 12 13 14 15 16 |
# File 'eks/access_scope.rb', line 11 def initialize(type:, namespaces: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkFjY2Vzc1Njb3BlVHlwZSJ9")), "type") @namespaces = namespaces Jsii::Type.check_type(@namespaces, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "namespaces") unless @namespaces.nil? end |
Instance Attribute Details
#namespaces ⇒ Array<String>? (readonly)
Note:
Default: - no specific namespaces for this scope.
A Kubernetes namespace that an access policy is scoped to.
A value is required if you specified namespace for Type.
29 30 31 |
# File 'eks/access_scope.rb', line 29 def namespaces @namespaces end |
#type ⇒ AWSCDK::EKS::AccessScopeType (readonly)
The scope type of the policy, either 'namespace' or 'cluster'.
21 22 23 |
# File 'eks/access_scope.rb', line 21 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
31 32 33 34 35 36 |
# File 'eks/access_scope.rb', line 31 def self.jsii_properties { :type => "type", :namespaces => "namespaces", } end |
Instance Method Details
#to_jsii ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'eks/access_scope.rb', line 38 def to_jsii result = {} result.merge!({ "type" => @type, "namespaces" => @namespaces, }) result.compact end |