Module: AWSCDK::IAM::IComparablePrincipal
Overview
Interface for principals that can be compared.
This only needs to be implemented for principals that could potentially be value-equal. Identity-equal principals will be handled correctly by default.
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.
-
#dedupe_string ⇒ String?
Return a string format of this principal which should be identical if the two principals are the same.
-
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
-
#policy_fragment ⇒ AWSCDK::IAM::PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.
-
#principal_account ⇒ String?
The AWS account ID of this principal.
Class Method Details
.jsii_overridable_methods ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'iam/i_comparable_principal.rb', line 60 def self.jsii_overridable_methods { :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false }, :assume_role_action => { kind: :property, name: "assumeRoleAction", is_optional: false }, :policy_fragment => { kind: :property, name: "policyFragment", is_optional: false }, :principal_account => { kind: :property, name: "principalAccount", is_optional: true }, :add_to_principal_policy => { kind: :method, name: "addToPrincipalPolicy", is_optional: false }, :dedupe_string => { kind: :method, name: "dedupeString", is_optional: false }, } end |
Instance Method Details
#add_to_principal_policy(statement) ⇒ AWSCDK::IAM::AddToPrincipalPolicyResult
Add to the policy of this principal.
48 49 50 51 |
# File 'iam/i_comparable_principal.rb', line 48 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.
21 22 23 |
# File 'iam/i_comparable_principal.rb', line 21 def assume_role_action() jsii_get_property("assumeRoleAction") end |
#dedupe_string ⇒ String?
Return a string format of this principal which should be identical if the two principals are the same.
56 57 58 |
# File 'iam/i_comparable_principal.rb', line 56 def dedupe_string() jsii_call_method("dedupeString", []) end |
#grant_principal ⇒ AWSCDK::IAM::IPrincipal
The principal to grant permissions to.
14 15 16 |
# File 'iam/i_comparable_principal.rb', line 14 def grant_principal() jsii_get_property("grantPrincipal") end |
#policy_fragment ⇒ AWSCDK::IAM::PrincipalPolicyFragment
Return the policy fragment that identifies this principal in a Policy.
28 29 30 |
# File 'iam/i_comparable_principal.rb', line 28 def policy_fragment() jsii_get_property("policyFragment") end |
#principal_account ⇒ String?
The AWS account ID of this principal.
Can be undefined when the account is not known (for example, for service principals). Can be a Token - in that case, it's assumed to be AWS::AccountId.
40 41 42 |
# File 'iam/i_comparable_principal.rb', line 40 def principal_account() jsii_get_property("principalAccount") end |