Class WebIdentityPrincipal
A principal that represents a federated identity provider as Web Identity such as Cognito, Amazon, Facebook, Google, etc.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class WebIdentityPrincipal : FederatedPrincipal, IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Syntax (vb)
Public Class WebIdentityPrincipal
Inherits FederatedPrincipal
Implements IAssumeRolePrincipal, IComparablePrincipal, IPrincipal, IGrantable
Remarks
ExampleMetadata: infused
Examples
var principal = new WebIdentityPrincipal("cognito-identity.amazonaws.com", new Dictionary<string, object> {
{ "StringEquals", new Dictionary<string, string> { { "cognito-identity.amazonaws.com:aud", "us-east-2:12345678-abcd-abcd-abcd-123456" } } },
{ "ForAnyValue:StringLike", new Dictionary<string, string> { { "cognito-identity.amazonaws.com:amr", "unauthenticated" } } }
});
Synopsis
Constructors
Web |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Web |
Used by jsii to construct an instance of this class from DeputyProps |
WebIdentityPrincipal(String, IDictionary<String, Object>) |
Properties
Policy |
Return the policy fragment that identifies this principal in a Policy. |
Methods
To |
Returns a string representation of an object. |
Constructors
WebIdentityPrincipal(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected WebIdentityPrincipal(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
WebIdentityPrincipal(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected WebIdentityPrincipal(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
WebIdentityPrincipal(String, IDictionary<String, Object>)
public WebIdentityPrincipal(string identityProvider, IDictionary<string, object> conditions = null)
Parameters
- identityProvider System.
String identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito).
- conditions System.
Collections. <System.Generic. IDictionary String , System.Object > The conditions under which the policy is in effect.
Properties
PolicyFragment
Return the policy fragment that identifies this principal in a Policy.
public override PrincipalPolicyFragment PolicyFragment { get; }
Property Value
Overrides
Methods
ToString()
Returns a string representation of an object.
public override string ToString()
Returns
System.