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.AWS.IAM.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(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
FederatedPrincipal(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
FederatedPrincipal(String, IDictionary<String, Object>, String) |
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(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected FederatedPrincipal(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
FederatedPrincipal(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected FederatedPrincipal(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
FederatedPrincipal(String, IDictionary<String, Object>, String)
public FederatedPrincipal(string federated, IDictionary<string, object> conditions, string assumeRoleAction = null)
Parameters
- federated System.String
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
- conditions System.Collections.Generic.IDictionary<System.String, System.Object>
The conditions under which the policy is in effect.
- assumeRoleAction System.String
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
Properties
AssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.
public override string AssumeRoleAction { get; }
Property Value
System.String
Overrides
Conditions
The conditions under which the policy is in effect.
public virtual IDictionary<string, object> Conditions { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
Federated
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
public virtual string Federated { get; }
Property Value
System.String
PolicyFragment
Return the policy fragment that identifies this principal in a Policy.
public override PrincipalPolicyFragment PolicyFragment { get; }
Property Value
Overrides
Methods
DedupeString()
Return whether or not this principal is equal to the given principal.
public override string DedupeString()
Returns
System.String
Overrides
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
System.String