Class FederatedPrincipal
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iam.PrincipalBase
software.amazon.awscdk.services.iam.FederatedPrincipal
- All Implemented Interfaces:
IAssumeRolePrincipal,IComparablePrincipal,IGrantable,IPrincipal,software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
SamlPrincipal,WebIdentityPrincipal
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:39.812Z")
@Stability(Stable)
public class FederatedPrincipal
extends PrincipalBase
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.
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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;
Object conditions;
FederatedPrincipal federatedPrincipal = new FederatedPrincipal("federated", Map.of(
"conditionsKey", conditions), "assumeRoleAction");
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IAssumeRolePrincipal
IAssumeRolePrincipal.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IComparablePrincipal
IComparablePrincipal.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionFederatedPrincipal(String federated) FederatedPrincipal(String federated, Map<String, Object> conditions) protectedFederatedPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFederatedPrincipal(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturn whether or not this principal is equal to the given principal.When this Principal is used in an AssumeRole policy, the action to use.The conditions under which the policy is in effect.federated identity provider (i.e.Return the policy fragment that identifies this principal in a Policy.toString()Returns a string representation of an object.Methods inherited from class software.amazon.awscdk.services.iam.PrincipalBase
addToAssumeRolePolicy, addToPolicy, addToPrincipalPolicy, getGrantPrincipal, getPrincipalAccount, toJSON, withConditions, withSessionTagsMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
FederatedPrincipal
protected FederatedPrincipal(software.amazon.jsii.JsiiObjectRef objRef) -
FederatedPrincipal
protected FederatedPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
FederatedPrincipal
@Stability(Stable) public FederatedPrincipal(@NotNull String federated, @Nullable Map<String, Object> conditions, @Nullable String assumeRoleAction) - Parameters:
federated- federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito). This parameter is required.conditions-assumeRoleAction- When this Principal is used in an AssumeRole policy, the action to use.
-
FederatedPrincipal
@Stability(Stable) public FederatedPrincipal(@NotNull String federated, @Nullable Map<String, Object> conditions) - Parameters:
federated- federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito). This parameter is required.conditions-
-
FederatedPrincipal
- Parameters:
federated- federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito). This parameter is required.
-
-
Method Details
-
dedupeString
Return whether or not this principal is equal to the given principal.- Specified by:
dedupeStringin interfaceIComparablePrincipal- Specified by:
dedupeStringin classPrincipalBase
-
toString
Returns a string representation of an object.- Overrides:
toStringin classPrincipalBase
-
getAssumeRoleAction
When this Principal is used in an AssumeRole policy, the action to use.- Specified by:
getAssumeRoleActionin interfaceIPrincipal- Overrides:
getAssumeRoleActionin classPrincipalBase
-
getConditions
The conditions under which the policy is in effect.- See Also:
-
getFederated
federated identity provider (i.e. 'cognito-identity.amazonaws.com' for users authenticated through Cognito). -
getPolicyFragment
Return the policy fragment that identifies this principal in a Policy.- Specified by:
getPolicyFragmentin interfaceIPrincipal- Specified by:
getPolicyFragmentin classPrincipalBase
-