Class SessionTagsPrincipal
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iam.PrincipalBase
software.amazon.awscdk.services.iam.SessionTagsPrincipal
- All Implemented Interfaces:
IAssumeRolePrincipal
,IComparablePrincipal
,IGrantable
,IPrincipal
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-27T16:50:58.712Z")
@Stability(Stable)
public class SessionTagsPrincipal
extends PrincipalBase
Enables session tags on role assumptions from a principal.
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);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IAssumeRolePrincipal
IAssumeRolePrincipal.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IComparablePrincipal
IComparablePrincipal.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionSessionTagsPrincipal
(IPrincipal principal) protected
SessionTagsPrincipal
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
SessionTagsPrincipal
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the principal to the AssumeRolePolicyDocument.addToPolicy
(PolicyStatement statement) Add to the policy of this principal.addToPrincipalPolicy
(PolicyStatement statement) Add to the policy of this principal.protected String
appendDedupe
(String append) Append the given string to the wrapped principal's dedupe string (if available).Return whether or not this principal is equal to the given principal.When this Principal is used in an AssumeRole policy, the action to use.Return the policy fragment that identifies this principal in a Policy.The AWS account ID of this principal.Methods inherited from class software.amazon.awscdk.services.iam.PrincipalBase
getGrantPrincipal, toJSON, toString, withConditions, withSessionTags
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SessionTagsPrincipal
protected SessionTagsPrincipal(software.amazon.jsii.JsiiObjectRef objRef) -
SessionTagsPrincipal
protected SessionTagsPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SessionTagsPrincipal
- Parameters:
principal
- This parameter is required.
-
-
Method Details
-
addToAssumeRolePolicy
Add the principal to the AssumeRolePolicyDocument.Add the statements to the AssumeRolePolicyDocument necessary to give this principal permissions to assume the given role.
- Specified by:
addToAssumeRolePolicy
in interfaceIAssumeRolePrincipal
- Overrides:
addToAssumeRolePolicy
in classPrincipalBase
- Parameters:
doc
- This parameter is required.
-
addToPolicy
Add to the policy of this principal.- Overrides:
addToPolicy
in classPrincipalBase
- Parameters:
statement
- This parameter is required.
-
addToPrincipalPolicy
@Stability(Stable) @NotNull public AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement statement) Add to the policy of this principal.- Specified by:
addToPrincipalPolicy
in interfaceIPrincipal
- Overrides:
addToPrincipalPolicy
in classPrincipalBase
- Parameters:
statement
- This parameter is required.
-
appendDedupe
Append the given string to the wrapped principal's dedupe string (if available).- Parameters:
append
- This parameter is required.
-
dedupeString
Return whether or not this principal is equal to the given principal.- Specified by:
dedupeString
in interfaceIComparablePrincipal
- Specified by:
dedupeString
in classPrincipalBase
-
getAssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.- Specified by:
getAssumeRoleAction
in interfaceIPrincipal
- Overrides:
getAssumeRoleAction
in classPrincipalBase
-
getPolicyFragment
Return the policy fragment that identifies this principal in a Policy.- Specified by:
getPolicyFragment
in interfaceIPrincipal
- Specified by:
getPolicyFragment
in classPrincipalBase
-
getPrincipalAccount
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.
- Specified by:
getPrincipalAccount
in interfaceIPrincipal
- Overrides:
getPrincipalAccount
in classPrincipalBase
-