IPrincipal Interface
Represents a logical IAM principal.
An IPrincipal describes a logical entity that can perform AWS API calls against sets of resources, optionally under certain conditions.
Examples of simple principals are IAM objects that you create, such as Users or Roles.
An example of a more complex principals is a ServicePrincipal (such as new ServicePrincipal("sns.amazonaws.com"), which represents the Simple Notifications Service).
A single logical Principal may also map to a set of physical principals. For example, new OrganizationPrincipal('o-12345abcde') represents all identities that are part of the given AWS Organization.
| Source | aws-iam/lib/principals.ts |
|---|
Properties
assumeRoleActionstringassume_role_actionstrassumeRoleActionStringAssumeRoleActionstringAssumeRoleAction*string #grantPrincipalIPrincipalgrant_principalIPrincipalgrantPrincipalIPrincipalGrantPrincipalIPrincipalGrantPrincipalIPrincipal #policyFragmentPrincipalPolicyFragmentpolicy_fragmentPrincipalPolicyFragmentpolicyFragmentPrincipalPolicyFragmentPolicyFragmentPrincipalPolicyFragmentPolicyFragmentPrincipalPolicyFragment #principalAccountmay be undefinedstringprincipal_accountmay be undefinedstrprincipalAccountmay be undefinedStringPrincipalAccountmay be undefinedstringPrincipalAccountmay be undefined*string #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.
Methods
addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResultdef add_to_principal_policy(self, statement: PolicyStatement) -> AddToPrincipalPolicyResultpublic AddToPrincipalPolicyResult addToPrincipalPolicy(PolicyStatement statement)public AddToPrincipalPolicyResult AddToPrincipalPolicy(PolicyStatement statement)func AddToPrincipalPolicy(Statement PolicyStatement) AddToPrincipalPolicyResult #