@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T22:36:22.859Z") @Stability(value=Stable) public class SessionTagsPrincipal extends PrincipalBase
For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.iam.*; IPrincipal principal; SessionTagsPrincipal sessionTagsPrincipal = new SessionTagsPrincipal(principal);
software.amazon.jsii.JsiiObject.InitializationModeIAssumeRolePrincipal.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
SessionTagsPrincipal(IPrincipal principal) |
protected |
SessionTagsPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SessionTagsPrincipal(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAssumeRolePolicy(PolicyDocument doc)
Add the princpial to the AssumeRolePolicyDocument.
|
Boolean |
addToPolicy(PolicyStatement statement)
Add to the policy of this principal.
|
AddToPrincipalPolicyResult |
addToPrincipalPolicy(PolicyStatement statement)
Add to the policy of this principal.
|
String |
getAssumeRoleAction()
When this Principal is used in an AssumeRole policy, the action to use.
|
PrincipalPolicyFragment |
getPolicyFragment()
Return the policy fragment that identifies this principal in a Policy.
|
String |
getPrincipalAccount()
The AWS account ID of this principal.
|
getGrantPrincipal, toJSON, toString, withConditions, withSessionTagsjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected SessionTagsPrincipal(software.amazon.jsii.JsiiObjectRef objRef)
protected SessionTagsPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public SessionTagsPrincipal(@NotNull
IPrincipal principal)
principal - This parameter is required.@Stability(value=Stable)
public void addToAssumeRolePolicy(@NotNull
PolicyDocument doc)
Add the statements to the AssumeRolePolicyDocument necessary to give this principal permissions to assume the given role.
addToAssumeRolePolicy in interface IAssumeRolePrincipaladdToAssumeRolePolicy in class PrincipalBasedoc - This parameter is required.@Stability(value=Stable) @NotNull public Boolean addToPolicy(@NotNull PolicyStatement statement)
addToPolicy in class PrincipalBasestatement - This parameter is required.@Stability(value=Stable) @NotNull public AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement statement)
addToPrincipalPolicy in interface IPrincipaladdToPrincipalPolicy in class PrincipalBasestatement - This parameter is required.@Stability(value=Stable) @NotNull public String getAssumeRoleAction()
getAssumeRoleAction in interface IPrincipalgetAssumeRoleAction in class PrincipalBase@Stability(value=Stable) @NotNull public PrincipalPolicyFragment getPolicyFragment()
getPolicyFragment in interface IPrincipalgetPolicyFragment in class PrincipalBase@Stability(value=Stable) @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 IPrincipalgetPrincipalAccount in class PrincipalBaseCopyright © 2022. All rights reserved.