@@ -0,0 +1,2913 @@
+//snippet-sourcedescription:%5BDescribeDBInstances.java demonstrates how to obtain a summary of the metadata for an analysis.%5D%0A//snippet-keyword:%5BAWS SDK for Java v2%5D%0A//snippet-keyword:%5BCode Sample%5D%0A//snippet-service:%5BAmazon QuickSight%5D%0A//snippet-sourcetype:%5Bfull-example%5D%0A//snippet-sourcedate:%5B1/14/2021%5D%0A//snippet-sourceauthor:%5Bscmacdon - aws%5D%0A%0A/*%0A   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.%0A   SPDX-License-Identifier: Apache-2.0%0A*/%0A%0Apackage com.example.quicksight;%0A%0A// snippet-start:%5Bquicksight.java2.describe_analysis.import%5D%0Aimport software.amazon.awssdk.regions.Region;%0Aimport software.amazon.awssdk.services.quicksight.QuickSightClient;%0Aimport software.amazon.awssdk.services.quicksight.model.DescribeAnalysisRequest;%0Aimport software.amazon.awssdk.services.quicksight.model.DescribeAnalysisResponse;%0Aimport software.amazon.awssdk.services.quicksight.model.QuickSightException;%0A// snippet-end:%5Bquicksight.java2.describe_analysis.import%5D%0A%0Apublic class DescribeAnalysis %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        final String USAGE = %22%5Cn%22 +%0A                %22Usage: DescribeAnalysis %3Caccount%3E %3CanalysisId%3E%5Cn%5Cn%22 +%0A                %22Where:%5Cn%22 +%0A                %22  account - the ID of the AWS account that contains the analysis.%5Cn%5Cn%22 +%0A                %22  queueName - the ID of the Amazon QuickSight Analysis that you're describing.%5Cn%5Cn%22;%0A%0A        if (args.length != 2) %7B%0A            System.out.println(USAGE);%0A            System.exit(1);%0A        %7D%0A%0A        String account = args%5B0%5D;%0A        String analysisId = args%5B1%5D;%0A        QuickSightClient qsClient = QuickSightClient.builder()%0A                .region(Region.US_EAST_1)%0A                .build();%0A%0A        describeSpecificAnalysis(qsClient, account, analysisId);%0A        qsClient.close();%0A    %7D%0A%0A    // snippet-start:%5Bquicksight.java2.describe_analysis.main%5D%0A    public static void describeSpecificAnalysis(QuickSightClient qsClient, String account,String analysisId) %7B%0A%0A        try %7B%0A%0A            DescribeAnalysisRequest analysisRequest = DescribeAnalysisRequest.builder()%0A                    .awsAccountId(account)%0A                    .analysisId(analysisId)%0A                    .build();%0A%0A            DescribeAnalysisResponse analysisResponse = qsClient.describeAnalysis(analysisRequest);%0A            System.out.println(%22The Analysis ARN value is %22+ analysisResponse.analysis().arn());%0A            System.out.println(%22The Analysis ARN name is %22+ analysisResponse.analysis().name());%0A            System.out.println(%22The Analysis theme ARN value is %22+ analysisResponse.analysis().themeArn());%0A            System.out.println(%22The Analysis dataSet ARN  is %22+ analysisResponse.analysis().dataSetArns());%0A%0A        %7D catch (QuickSightException e) %7B%0A            System.err.println(e.awsErrorDetails().errorMessage());%0A            System.exit(1);%0A        %7D%0A    %7D%0A    // snippet-end:%5Bquicksight.java2.describe_analysis.main%5D%0A%7D%0A%0A

Create DescribeAnalysis.java