java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cognito.identitypool.alpha.IdentityPool
All Implemented Interfaces:
IResource, IIdentityPool, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:19.506Z") @Stability(Experimental) public class IdentityPool extends Resource implements IIdentityPool
(experimental) Define a Cognito Identity Pool.

Example:

 OpenIdConnectProvider openIdConnectProvider;
 IdentityPool.Builder.create(this, "myidentitypool")
         .identityPoolName("myidentitypool")
         .authenticationProviders(IdentityPoolAuthenticationProviders.builder()
                 .google(IdentityPoolGoogleLoginProvider.builder()
                         .clientId("12345678012.apps.googleusercontent.com")
                         .build())
                 .openIdConnectProviders(List.of(openIdConnectProvider))
                 .customProvider("my-custom-provider.example.com")
                 .build())
         .build();
 
  • Constructor Details

    • IdentityPool

      protected IdentityPool(software.amazon.jsii.JsiiObjectRef objRef)
    • IdentityPool

      protected IdentityPool(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • IdentityPool

      @Stability(Experimental) public IdentityPool(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable IdentityPoolProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • IdentityPool

      @Stability(Experimental) public IdentityPool(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromIdentityPoolArn

      @Stability(Experimental) @NotNull public static IIdentityPool fromIdentityPoolArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String identityPoolArn)
      (experimental) Import an existing Identity Pool from its Arn.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      identityPoolArn - This parameter is required.
    • fromIdentityPoolId

      @Stability(Experimental) @NotNull public static IIdentityPool fromIdentityPoolId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String identityPoolId)
      (experimental) Import an existing Identity Pool from its id.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      identityPoolId - This parameter is required.
    • addRoleMappings

      @Stability(Experimental) public void addRoleMappings(@NotNull @NotNull IdentityPoolRoleMapping... roleMappings)
      (experimental) Adds Role Mappings to Identity Pool.

      Parameters:
      roleMappings - This parameter is required.
    • addUserPoolAuthentication

      @Stability(Experimental) public void addUserPoolAuthentication(@NotNull IUserPoolAuthenticationProvider userPool)
      (experimental) Add a User Pool to the IdentityPool and configure User Pool Client to handle identities.

      Parameters:
      userPool - This parameter is required.
    • getAuthenticatedRole

      @Stability(Experimental) @NotNull public IRole getAuthenticatedRole()
      (experimental) Default role for authenticated users.
    • getIdentityPoolArn

      @Stability(Experimental) @NotNull public String getIdentityPoolArn()
      (experimental) The ARN of the Identity Pool.
      Specified by:
      getIdentityPoolArn in interface IIdentityPool
    • getIdentityPoolId

      @Stability(Experimental) @NotNull public String getIdentityPoolId()
      (experimental) The id of the Identity Pool in the format REGION:GUID.
      Specified by:
      getIdentityPoolId in interface IIdentityPool
    • getIdentityPoolName

      @Stability(Experimental) @NotNull public String getIdentityPoolName()
      (experimental) The name of the Identity Pool.
      Specified by:
      getIdentityPoolName in interface IIdentityPool
    • getUnauthenticatedRole

      @Stability(Experimental) @NotNull public IRole getUnauthenticatedRole()
      (experimental) Default role for unauthenticated users.