Class: AWSCDK::EKS::ServiceAccount
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::EKS::ServiceAccount
- Includes:
- IAM::IPrincipal
- Defined in:
- eks/service_account.rb
Overview
Service Account.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_to_principal_policy(statement) ⇒ AWSCDK::IAM::AddToPrincipalPolicyResult
Add to the policy of this principal.
-
#assume_role_action ⇒ String
When this Principal is used in an AssumeRole policy, the action to use.
-
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
-
#initialize(scope, id, props) ⇒ ServiceAccount
constructor
A new instance of ServiceAccount.
-
#node ⇒ Constructs::Node
The tree node.
-
#policy_fragment ⇒ AWSCDK::IAM::PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.
-
#role ⇒ AWSCDK::IAM::IRole
The role which is linked to the service account.
-
#service_account_name ⇒ String
The name of the service account.
-
#service_account_namespace ⇒ String
The namespace where the service account is located in.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ ServiceAccount
Returns a new instance of ServiceAccount.
12 13 14 15 16 17 18 |
# File 'eks/service_account.rb', line 12 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::EKS::ServiceAccountProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLlNlcnZpY2VBY2NvdW50UHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'eks/service_account.rb', line 20 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :assume_role_action => { kind: :property, name: "assumeRoleAction", is_optional: false }, :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false }, :policy_fragment => { kind: :property, name: "policyFragment", is_optional: false }, :role => { kind: :property, name: "role", is_optional: false }, :service_account_name => { kind: :property, name: "serviceAccountName", is_optional: false }, :service_account_namespace => { kind: :property, name: "serviceAccountNamespace", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :add_to_principal_policy => { kind: :method, name: "addToPrincipalPolicy", is_optional: false }, } end |
Instance Method Details
#add_to_principal_policy(statement) ⇒ AWSCDK::IAM::AddToPrincipalPolicyResult
Add to the policy of this principal.
111 112 113 114 |
# File 'eks/service_account.rb', line 111 def add_to_principal_policy(statement) Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement") jsii_call_method("addToPrincipalPolicy", [statement]) end |
#assume_role_action ⇒ String
When this Principal is used in an AssumeRole policy, the action to use.
45 46 47 |
# File 'eks/service_account.rb', line 45 def assume_role_action() jsii_get_property("assumeRoleAction") end |
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
52 53 54 |
# File 'eks/service_account.rb', line 52 def grant_principal() jsii_get_property("grantPrincipal") end |
#node ⇒ Constructs::Node
The tree node.
38 39 40 |
# File 'eks/service_account.rb', line 38 def node() jsii_get_property("node") end |
#policy_fragment ⇒ AWSCDK::IAM::PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.
59 60 61 |
# File 'eks/service_account.rb', line 59 def policy_fragment() jsii_get_property("policyFragment") end |
#role ⇒ AWSCDK::IAM::IRole
The role which is linked to the service account.
66 67 68 |
# File 'eks/service_account.rb', line 66 def role() jsii_get_property("role") end |
#service_account_name ⇒ String
The name of the service account.
73 74 75 |
# File 'eks/service_account.rb', line 73 def service_account_name() jsii_get_property("serviceAccountName") end |
#service_account_namespace ⇒ String
The namespace where the service account is located in.
80 81 82 |
# File 'eks/service_account.rb', line 80 def service_account_namespace() jsii_get_property("serviceAccountNamespace") end |
#to_string ⇒ String
Returns a string representation of this construct.
87 88 89 |
# File 'eks/service_account.rb', line 87 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
100 101 102 103 104 105 |
# File 'eks/service_account.rb', line 100 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |