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.104.0 (build e79254c)", date="2024-11-06T23:25:18.571Z") @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) Add Role Mappings to the Identity Pool.

      Parameters:
      roleMappings - This parameter is required.
    • addUserPoolAuthentication

      @Stability(Experimental) public void addUserPoolAuthentication(@NotNull IUserPoolAuthenticationProvider userPool)
      (experimental) Add a User Pool to the Identity Pool and configure the 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.