Class UserPoolClient

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.cognito.UserPoolClient
All Implemented Interfaces:
IConstruct, IDependable, IResource, IUserPoolClient, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.066Z") @Stability(Stable) public class UserPoolClient extends Resource implements IUserPoolClient
Define a UserPool App Client.

Example:

 UserPool pool = new UserPool(this, "Pool");
 UserPoolIdentityProviderAmazon provider = UserPoolIdentityProviderAmazon.Builder.create(this, "Amazon")
         .userPool(pool)
         .clientId("amzn-client-id")
         .clientSecret("amzn-client-secret")
         .build();
 UserPoolClient client = pool.addClient("app-client", UserPoolClientOptions.builder()
         // ...
         .supportedIdentityProviders(List.of(UserPoolClientIdentityProvider.AMAZON))
         .build());
 client.node.addDependency(provider);
 
  • Constructor Details

    • UserPoolClient

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

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

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

    • fromUserPoolClientId

      @Stability(Stable) @NotNull public static IUserPoolClient fromUserPoolClientId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String userPoolClientId)
      Import a user pool client given its id.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      userPoolClientId - This parameter is required.
    • getOAuthFlows

      @Stability(Stable) @NotNull public OAuthFlows getOAuthFlows()
      The OAuth flows enabled for this client.
    • getUserPoolClientId

      @Stability(Stable) @NotNull public String getUserPoolClientId()
      Name of the application client.
      Specified by:
      getUserPoolClientId in interface IUserPoolClient
    • getUserPoolClientName

      @Stability(Stable) @NotNull public String getUserPoolClientName()
      The client name that was specified via the userPoolClientName property during initialization, throws an error otherwise.