Class FederatedPrincipal
Principal entity that represents a federated identity provider such as Amazon Cognito, that can be used to provide temporary security credentials to users who have been authenticated.
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class FederatedPrincipal : PrincipalBase, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Syntax (vb)
Public Class FederatedPrincipal Inherits PrincipalBase Implements IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
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;
var conditions;
var federatedPrincipal = new FederatedPrincipal("federated", new Dictionary<string, object> {
{ "conditionsKey", conditions }
}, "assumeRoleAction");
Synopsis
Constructors
| FederatedPrincipal(string, IDictionary<string, object>?, string?) | Principal entity that represents a federated identity provider such as Amazon Cognito, that can be used to provide temporary security credentials to users who have been authenticated. |
Properties
| AssumeRoleAction | When this Principal is used in an AssumeRole policy, the action to use. |
| Conditions | The conditions under which the policy is in effect. |
| Federated | federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito). |
| PolicyFragment | Return the policy fragment that identifies this principal in a Policy. |
Methods
| DedupeString() | Return whether or not this principal is equal to the given principal. |
| ToString() | Returns a string representation of an object. |
Constructors
FederatedPrincipal(string, IDictionary<string, object>?, string?)
Principal entity that represents a federated identity provider such as Amazon Cognito, that can be used to provide temporary security credentials to users who have been authenticated.
public FederatedPrincipal(string federated, IDictionary<string, object>? conditions = null, string? assumeRoleAction = null)
Parameters
- federated string
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
- conditions IDictionary<string, object>
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
- assumeRoleAction string
When this Principal is used in an AssumeRole policy, the action to use.
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated
Properties
AssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.
public override string AssumeRoleAction { get; }
Property Value
Overrides
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated
Conditions
The conditions under which the policy is in effect.
public virtual IDictionary<string, object> Conditions { get; }
Property Value
Remarks
Federated
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
public virtual string Federated { get; }
Property Value
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated
PolicyFragment
Return the policy fragment that identifies this principal in a Policy.
public override PrincipalPolicyFragment PolicyFragment { get; }
Property Value
Overrides
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated
Methods
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string? DedupeString()
Returns
Overrides
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
Overrides
Remarks
Additional condition keys are available when the temporary security credentials are used to make a request. You can use these keys to write policies that limit the access of federated users.
ExampleMetadata: fixture=_generated