Show / Hide Table of Contents

Class SessionTagsPrincipal

Enables session tags on role assumptions from a principal.

Inheritance
object
PrincipalBase
SessionTagsPrincipal
Implements
IAssumeRolePrincipal
IComparablePrincipal
IPrincipal
IGrantable
Inherited Members
PrincipalBase.ToJSON()
PrincipalBase.ToString()
PrincipalBase.WithConditions(IDictionary<string, object>)
PrincipalBase.WithSessionTags()
PrincipalBase.GrantPrincipal
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

SessionTagsPrincipal(IPrincipal)

Enables session tags on role assumptions from a principal.

Properties

AssumeRoleAction

When this Principal is used in an AssumeRole policy, the action to use.

PolicyFragment

Return the policy fragment that identifies this principal in a Policy.

PrincipalAccount

The AWS account ID of this principal.

Methods

AddToAssumeRolePolicy(PolicyDocument)

Add the principal to the AssumeRolePolicyDocument.

AddToPolicy(PolicyStatement)

Add to the policy of this principal.

AddToPrincipalPolicy(PolicyStatement)

Add to the policy of this principal.

AppendDedupe(string)

Append the given string to the wrapped principal's dedupe string (if available).

DedupeString()

Return whether or not this principal is equal to the given principal.

Constructors

SessionTagsPrincipal(IPrincipal)

Enables session tags on role assumptions from a principal.

public SessionTagsPrincipal(IPrincipal principal)
Parameters
principal IPrincipal
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);

Properties

AssumeRoleAction

When this Principal is used in an AssumeRole policy, the action to use.

public override string AssumeRoleAction { get; }
Property Value

string

Overrides
PrincipalBase.AssumeRoleAction
Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

PolicyFragment

Return the policy fragment that identifies this principal in a Policy.

public override PrincipalPolicyFragment PolicyFragment { get; }
Property Value

PrincipalPolicyFragment

Overrides
PrincipalBase.PolicyFragment
Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

PrincipalAccount

The AWS account ID of this principal.

public override string? PrincipalAccount { get; }
Property Value

string

Overrides
PrincipalBase.PrincipalAccount
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 PolicyDocument
Overrides
PrincipalBase.AddToAssumeRolePolicy(PolicyDocument)
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 PolicyStatement
Returns

bool

Overrides
PrincipalBase.AddToPolicy(PolicyStatement)
Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

AddToPrincipalPolicy(PolicyStatement)

Add to the policy of this principal.

public override IAddToPrincipalPolicyResult AddToPrincipalPolicy(PolicyStatement statement)
Parameters
statement PolicyStatement
Returns

IAddToPrincipalPolicyResult

Overrides
PrincipalBase.AddToPrincipalPolicy(PolicyStatement)
Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

AppendDedupe(string)

Append the given string to the wrapped principal's dedupe string (if available).

protected virtual string? AppendDedupe(string append)
Parameters
append string
Returns

string

Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

DedupeString()

Return whether or not this principal is equal to the given principal.

public override string? DedupeString()
Returns

string

Overrides
PrincipalBase.DedupeString()
Remarks

For more information on session tags, see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html

ExampleMetadata: fixture=_generated

Implements

IAssumeRolePrincipal
IComparablePrincipal
IPrincipal
IGrantable
Back to top Generated by DocFX