@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:10.042Z") @Stability(value=Experimental) public abstract class PrincipalBase extends software.amazon.jsii.JsiiObject implements IAssumeRolePrincipal
Example:
PrincipalBase principal = new AccountPrincipal("123456789000").withConditions(Map.of("StringEquals", Map.of("foo", "baz")));
software.amazon.jsii.JsiiObject.InitializationModeIAssumeRolePrincipal.Jsii$Default| Modifier | Constructor and Description |
|---|---|
protected |
PrincipalBase() |
protected |
PrincipalBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
PrincipalBase(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAssumeRolePolicy(PolicyDocument document)
(experimental) Add the princpial to the AssumeRolePolicyDocument.
|
Boolean |
addToPolicy(PolicyStatement statement)
(experimental) Add to the policy of this principal.
|
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.
|
IPrincipal |
getGrantPrincipal()
(experimental) The principal to grant permissions to.
|
abstract PrincipalPolicyFragment |
getPolicyFragment()
(experimental) Return the policy fragment that identifies this principal in a Policy.
|
String |
getPrincipalAccount()
(experimental) The AWS account ID of this principal.
|
Map<String,List<String>> |
toJSON()
(experimental) JSON-ify the principal.
|
String |
toString()
(experimental) Returns a string representation of an object.
|
PrincipalBase |
withConditions(Map<String,Object> conditions)
(experimental) Returns a new PrincipalWithConditions using this principal as the base, with the passed conditions added.
|
PrincipalBase |
withSessionTags()
(experimental) Returns a new principal using this principal as the base, with session tags enabled.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected PrincipalBase(software.amazon.jsii.JsiiObjectRef objRef)
protected PrincipalBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) protected PrincipalBase()
@Stability(value=Experimental)
public void addToAssumeRolePolicy(@NotNull
PolicyDocument document)
Add the statements to the AssumeRolePolicyDocument necessary to give this principal permissions to assume the given role.
addToAssumeRolePolicy in interface IAssumeRolePrincipaldocument - This parameter is required.@Stability(value=Experimental) @NotNull public Boolean addToPolicy(@NotNull PolicyStatement statement)
addToPolicy in interface IPrincipalstatement - This parameter is required.@Stability(value=Experimental) @NotNull public AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement _statement)
addToPrincipalPolicy in interface IPrincipal_statement - This parameter is required.@Stability(value=Experimental) @NotNull public Map<String,List<String>> toJSON()
Used when JSON.stringify() is called
@Stability(value=Experimental) @NotNull public String toString()
@Stability(value=Experimental) @NotNull public PrincipalBase withConditions(@NotNull Map<String,Object> conditions)
When there is a value for the same operator and key in both the principal and the conditions parameter, the value from the conditions parameter will be used.
conditions - This parameter is required.@Stability(value=Experimental) @NotNull public PrincipalBase withSessionTags()
@Stability(value=Experimental) @NotNull public String getAssumeRoleAction()
getAssumeRoleAction in interface IPrincipal@Stability(value=Experimental) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Experimental) @NotNull public abstract PrincipalPolicyFragment getPolicyFragment()
getPolicyFragment in interface IPrincipal@Stability(value=Experimental) @Nullable public 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.
getPrincipalAccount in interface IPrincipalCopyright © 2022. All rights reserved.