@@ -0,0 +1,2412 @@
+package com.example.cognito;%0A%0A%0Aimport software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.cognitoidentity.CognitoIdentityClient;%0Aimport software.amazon.awssdk.services.cognitoidentity.model.GetIdRequest;%0Aimport software.amazon.awssdk.services.cognitoidentity.model.GetIdResponse;%0Aimport software.amazon.awssdk.services.cognitoidentityprovider.model.CognitoIdentityProviderException;%0A%0A/**%0A * Before running this Java V2 code example, set up your development environment, including your credentials.%0A *%0A * For more information, see the following documentation topic:%0A *%0A * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html%0A */%0A%0Apublic class ConfirmSignUp %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        final String usage = %22%5Cn%22 +%0A                %22Usage:%5Cn%22 +%0A                %22    %3CClientId%3E %3CConfirmationCode%3E %3CUsername%3E%5Cn%5Cn%22 +%0A                %22Where:%5Cn%22 +%0A                %22    ClientId - The ID of the app client associated with the user pool.%5Cn%5Cn%22 +%0A                %22    ConfirmationCode - The confirmation code sent by a user's request to confirm registration.%5Cn%5Cn%22 +%0A                %22    Username - The user name of the user whose registration you want to confirm.%5Cn%5Cn%22%0A%0A        if (args.length != 1) %7B%0A            System.out.println(usage);%0A            System.exit(1);%0A        %7D%0A%0A        String clientId = args%5B0%5D;%0A        String confirmationCode = args%5B1%5D;%0A        String username = args%5B2%5D;%0A%0A        CognitoIdentityProviderClient identityProviderClient = CognitoIdentityProviderClient.builder()%0A                .region(Region.US_EAST_1)%0A                .credentialsProvider(ProfileCredentialsProvider.create())%0A                .build();%0A%0A        confirmSignUp(identityProviderClient, confirmationCode, username);%0A        cognitoClient.close();%0A    %7D%0A%0A    public static void confirmSignUp(CognitoIdentityProviderClient identityProviderClient, String confirmationCode, String username)%7B%0A%0A        ConfirmSignUpRequest req = ConfirmSignUpRequest.builder()%0A        %09                .clientId(clientId)%0A        %09                .confirmationCode(confirmationCode)%0A        %09                .username(username)%0A        %09                .build();%0A%0A        identityProviderClient.confirmSignUp(req);%0A%0A        System.out.println(username + %22's sign up is confirmed%22);%0A    %7D%0A%0A%7D

add confirm sign up example in Java