@@ -0,0 +1,2078 @@
+package com.example.cognito;%0A%0Aimport software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.cognitoidentityprovider.CognitoIdentityProviderClient;%0A%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 AdminInitiateAuth %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    %3CAuthFlow%3E %3CClientId%3E %3CUserPoolId%3E%5Cn%5Cn%22 +%0A                %22Where:%5Cn%22 +%0A                %22    AuthFlow - The authentication flow for this call to run. %5Cn%5Cn%22 +%0A                %22    ClientId - The app client ID.%5Cn%5Cn%22%0A                %22    UserPoolId - 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 authFlow = args%5B0%5D;%0A        String clientId = args%5B1%5D;%0A        String userPoolId = args%5B2%5D;%0A%0A        CognitoIdentityProviderClient identityProviderClient = CognitoIdentityProviderClient.builder()%0A                .region(Region.US_EAST_1)%0A                .credentialsProvider(ProfileCredentialsProvider.create())%0A                .build();%0A%0A        adminInitiateAuth(identityProviderClient, authFlow, clientId, userPoolId);%0A%0A        identityProviderClient.close();%0A    %7D%0A%0A    public static void adminInitiateAuth(CognitoIdentityProviderClient identityProviderClient, String authFlow, String clientId, String userPoolId)%7B%0A%0A        AdminInitiateAuthRequest req = AdminInitiateAuthRequest.builder()%0A                .authFlow(authFlow)%0A                .clientId(clientId)%0A                .userPoolId(userPoolId)%0A                .build();%0A%0A        identityProviderClient.adminInitiateAuth(req);%0A%0A        System.out.println(%22Admin initiate auth%22);%0A    %7D%0A%0A%7D

add adminInitiateAuth example code