Class SessionTagsPrincipal
Enables session tags on role assumptions from a principal.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SessionTagsPrincipal : PrincipalBase, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Syntax (vb)
Public Class SessionTagsPrincipal
Inherits PrincipalBase
Implements IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Remarks
For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
IPrincipal principal;
var sessionTagsPrincipal = new SessionTagsPrincipal(principal);
Synopsis
Constructors
Session |
|
Session |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Session |
Used by jsii to construct an instance of this class from DeputyProps |
Properties
Assume |
When this Principal is used in an AssumeRole policy, the action to use. |
Policy |
Return the policy fragment that identifies this principal in a Policy. |
Principal |
The AWS account ID of this principal. |
Methods
Add |
Add the principal to the AssumeRolePolicyDocument. |
Add |
Add to the policy of this principal. |
Add |
Add to the policy of this principal. |
Append |
Append the given string to the wrapped principal's dedupe string (if available). |
Dedupe |
Return whether or not this principal is equal to the given principal. |
Constructors
SessionTagsPrincipal(IPrincipal)
SessionTagsPrincipal(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SessionTagsPrincipal(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
SessionTagsPrincipal(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SessionTagsPrincipal(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
Properties
AssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.
public override string AssumeRoleAction { get; }
Property Value
System.
Overrides
PolicyFragment
Return the policy fragment that identifies this principal in a Policy.
public override PrincipalPolicyFragment PolicyFragment { get; }
Property Value
Overrides
PrincipalAccount
The AWS account ID of this principal.
public override string PrincipalAccount { get; }
Property Value
System.
Overrides
Remarks
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
AddToAssumeRolePolicy(PolicyDocument)
Add the principal to the AssumeRolePolicyDocument.
public override void AddToAssumeRolePolicy(PolicyDocument doc)
Parameters
- doc Policy
Document
Overrides
Remarks
Add the statements to the AssumeRolePolicyDocument necessary to give this principal permissions to assume the given role.
AddToPolicy(PolicyStatement)
Add to the policy of this principal.
public override bool AddToPolicy(PolicyStatement statement)
Parameters
- statement Policy
Statement
Returns
System.
Overrides
AddToPrincipalPolicy(PolicyStatement)
Add to the policy of this principal.
public override IAddToPrincipalPolicyResult AddToPrincipalPolicy(PolicyStatement statement)
Parameters
- statement Policy
Statement
Returns
Overrides
AppendDedupe(String)
Append the given string to the wrapped principal's dedupe string (if available).
protected virtual string AppendDedupe(string append)
Parameters
- append System.
String
Returns
System.
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string DedupeString()
Returns
System.