@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:21.273Z") @Stability(value=Experimental) public interface IPrincipal extends software.amazon.jsii.JsiiSerializable, IGrantable
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-1234')
represents all
identities that are part of the given AWS Organization.
Modifier and Type | Interface and Description |
---|---|
static interface |
IPrincipal.Jsii$Default
Internal default implementation for
IPrincipal . |
static class |
IPrincipal.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
Modifier and Type | Method and Description |
---|---|
AddToPrincipalPolicyResult |
addToPrincipalPolicy(PolicyStatement statement)
(experimental) Add to the policy of this principal.
|
String |
getAssumeRoleAction()
(experimental) When this Principal is used in an AssumeRole policy, the action to use.
|
PrincipalPolicyFragment |
getPolicyFragment()
(experimental) Return the policy fragment that identifies this principal in a Policy.
|
default String |
getPrincipalAccount()
(experimental) The AWS account ID of this principal.
|
getGrantPrincipal
@Stability(value=Experimental) @NotNull String getAssumeRoleAction()
@Stability(value=Experimental) @NotNull PrincipalPolicyFragment getPolicyFragment()
@Stability(value=Experimental) @Nullable default String getPrincipalAccount()
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.
@Stability(value=Experimental) @NotNull AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement statement)
statement
- This parameter is required.Copyright © 2021. All rights reserved.