Class: AWSCDK::EKSv2::ServiceAccount
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::EKSv2::ServiceAccount
- Includes:
- IAM::IPrincipal
- Defined in:
- ek_sv2/service_account.rb
Overview
Service Account.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_to_policy(statement) ⇒ Boolean
deprecated
Deprecated.
use
addToPrincipalPolicy() -
#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 'ek_sv2/service_account.rb', line 12 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::EKSv2::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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzX3YyLlNlcnZpY2VBY2NvdW50UHJvcHMifQ==")), "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 34 |
# File 'ek_sv2/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_policy => { kind: :method, name: "addToPolicy", is_optional: false }, :add_to_principal_policy => { kind: :method, name: "addToPrincipalPolicy", is_optional: false }, } end |
Instance Method Details
#add_to_policy(statement) ⇒ Boolean
use addToPrincipalPolicy()
Add to the policy of this principal.
113 114 115 116 |
# File 'ek_sv2/service_account.rb', line 113 def add_to_policy(statement) Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement") jsii_call_method("addToPolicy", [statement]) end |
#add_to_principal_policy(statement) ⇒ AWSCDK::IAM::AddToPrincipalPolicyResult
Add to the policy of this principal.
122 123 124 125 |
# File 'ek_sv2/service_account.rb', line 122 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.
46 47 48 |
# File 'ek_sv2/service_account.rb', line 46 def assume_role_action() jsii_get_property("assumeRoleAction") end |
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
53 54 55 |
# File 'ek_sv2/service_account.rb', line 53 def grant_principal() jsii_get_property("grantPrincipal") end |
#node ⇒ Constructs::Node
The tree node.
39 40 41 |
# File 'ek_sv2/service_account.rb', line 39 def node() jsii_get_property("node") end |
#policy_fragment ⇒ AWSCDK::IAM::PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.
60 61 62 |
# File 'ek_sv2/service_account.rb', line 60 def policy_fragment() jsii_get_property("policyFragment") end |
#role ⇒ AWSCDK::IAM::IRole
The role which is linked to the service account.
67 68 69 |
# File 'ek_sv2/service_account.rb', line 67 def role() jsii_get_property("role") end |
#service_account_name ⇒ String
The name of the service account.
74 75 76 |
# File 'ek_sv2/service_account.rb', line 74 def service_account_name() jsii_get_property("serviceAccountName") end |
#service_account_namespace ⇒ String
The namespace where the service account is located in.
81 82 83 |
# File 'ek_sv2/service_account.rb', line 81 def service_account_namespace() jsii_get_property("serviceAccountNamespace") end |
#to_string ⇒ String
Returns a string representation of this construct.
88 89 90 |
# File 'ek_sv2/service_account.rb', line 88 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.
101 102 103 104 105 106 |
# File 'ek_sv2/service_account.rb', line 101 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 |