All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.quicksight.DefaultQuickSightAsyncClient Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.quicksight;

import java.util.concurrent.CompletableFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.quicksight.model.AccessDeniedException;
import software.amazon.awssdk.services.quicksight.model.CreateGroupMembershipRequest;
import software.amazon.awssdk.services.quicksight.model.CreateGroupMembershipResponse;
import software.amazon.awssdk.services.quicksight.model.CreateGroupRequest;
import software.amazon.awssdk.services.quicksight.model.CreateGroupResponse;
import software.amazon.awssdk.services.quicksight.model.DeleteGroupMembershipRequest;
import software.amazon.awssdk.services.quicksight.model.DeleteGroupMembershipResponse;
import software.amazon.awssdk.services.quicksight.model.DeleteGroupRequest;
import software.amazon.awssdk.services.quicksight.model.DeleteGroupResponse;
import software.amazon.awssdk.services.quicksight.model.DeleteUserByPrincipalIdRequest;
import software.amazon.awssdk.services.quicksight.model.DeleteUserByPrincipalIdResponse;
import software.amazon.awssdk.services.quicksight.model.DeleteUserRequest;
import software.amazon.awssdk.services.quicksight.model.DeleteUserResponse;
import software.amazon.awssdk.services.quicksight.model.DescribeGroupRequest;
import software.amazon.awssdk.services.quicksight.model.DescribeGroupResponse;
import software.amazon.awssdk.services.quicksight.model.DescribeUserRequest;
import software.amazon.awssdk.services.quicksight.model.DescribeUserResponse;
import software.amazon.awssdk.services.quicksight.model.DomainNotWhitelistedException;
import software.amazon.awssdk.services.quicksight.model.GetDashboardEmbedUrlRequest;
import software.amazon.awssdk.services.quicksight.model.GetDashboardEmbedUrlResponse;
import software.amazon.awssdk.services.quicksight.model.IdentityTypeNotSupportedException;
import software.amazon.awssdk.services.quicksight.model.InternalFailureException;
import software.amazon.awssdk.services.quicksight.model.InvalidNextTokenException;
import software.amazon.awssdk.services.quicksight.model.InvalidParameterValueException;
import software.amazon.awssdk.services.quicksight.model.LimitExceededException;
import software.amazon.awssdk.services.quicksight.model.ListGroupMembershipsRequest;
import software.amazon.awssdk.services.quicksight.model.ListGroupMembershipsResponse;
import software.amazon.awssdk.services.quicksight.model.ListGroupsRequest;
import software.amazon.awssdk.services.quicksight.model.ListGroupsResponse;
import software.amazon.awssdk.services.quicksight.model.ListUserGroupsRequest;
import software.amazon.awssdk.services.quicksight.model.ListUserGroupsResponse;
import software.amazon.awssdk.services.quicksight.model.ListUsersRequest;
import software.amazon.awssdk.services.quicksight.model.ListUsersResponse;
import software.amazon.awssdk.services.quicksight.model.PreconditionNotMetException;
import software.amazon.awssdk.services.quicksight.model.QuickSightException;
import software.amazon.awssdk.services.quicksight.model.QuickSightUserNotFoundException;
import software.amazon.awssdk.services.quicksight.model.RegisterUserRequest;
import software.amazon.awssdk.services.quicksight.model.RegisterUserResponse;
import software.amazon.awssdk.services.quicksight.model.ResourceExistsException;
import software.amazon.awssdk.services.quicksight.model.ResourceNotFoundException;
import software.amazon.awssdk.services.quicksight.model.ResourceUnavailableException;
import software.amazon.awssdk.services.quicksight.model.SessionLifetimeInMinutesInvalidException;
import software.amazon.awssdk.services.quicksight.model.ThrottlingException;
import software.amazon.awssdk.services.quicksight.model.UnsupportedUserEditionException;
import software.amazon.awssdk.services.quicksight.model.UpdateGroupRequest;
import software.amazon.awssdk.services.quicksight.model.UpdateGroupResponse;
import software.amazon.awssdk.services.quicksight.model.UpdateUserRequest;
import software.amazon.awssdk.services.quicksight.model.UpdateUserResponse;
import software.amazon.awssdk.services.quicksight.transform.CreateGroupMembershipRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.CreateGroupRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DeleteGroupMembershipRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DeleteGroupRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DeleteUserByPrincipalIdRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DeleteUserRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DescribeGroupRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.DescribeUserRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.GetDashboardEmbedUrlRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.ListGroupMembershipsRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.ListGroupsRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.ListUserGroupsRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.ListUsersRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.RegisterUserRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.UpdateGroupRequestMarshaller;
import software.amazon.awssdk.services.quicksight.transform.UpdateUserRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

/**
 * Internal implementation of {@link QuickSightAsyncClient}.
 *
 * @see QuickSightAsyncClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultQuickSightAsyncClient implements QuickSightAsyncClient {
    private static final Logger log = LoggerFactory.getLogger(DefaultQuickSightAsyncClient.class);

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultQuickSightAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Creates an Amazon QuickSight group. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<relevant-aws-account-id>:group/default/<group-name> * . *

*

* The response is a group object. *

*

* CLI Sample: *

*

* aws quicksight create-group --aws-account-id=111122223333 --namespace=default --group-name="Sales-Management" --description="Sales Management - Forecasting" *

* * @param createGroupRequest * The request object for this operation. * @return A Java Future containing the result of the CreateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceExistsException The resource specified doesn't exist.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • LimitExceededException A limit is exceeded.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.CreateGroup * @see AWS API * Documentation */ @Override public CompletableFuture createGroup(CreateGroupRequest createGroupRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateGroup").withMarshaller(new CreateGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(createGroupRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Adds an Amazon QuickSight user to an Amazon QuickSight group. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/<group-name> . *

*

* The condition resource is the user name. *

*

* The condition key is quicksight:UserName. *

*

* The response is the group member object. *

*

* CLI Sample: *

*

* aws quicksight create-group-membership --aws-account-id=111122223333 --namespace=default --group-name=Sales --member-name=Pat *

* * @param createGroupMembershipRequest * @return A Java Future containing the result of the CreateGroupMembership operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.CreateGroupMembership * @see AWS API Documentation */ @Override public CompletableFuture createGroupMembership( CreateGroupMembershipRequest createGroupMembershipRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateGroupMembershipResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateGroupMembership") .withMarshaller(new CreateGroupMembershipRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(createGroupMembershipRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes a user group from Amazon QuickSight. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/<group-name> . *

*

* CLI Sample: *

*

* aws quicksight delete-group -\-aws-account-id=111122223333 -\-namespace=default -\-group-name=Sales-Management *

* * @param deleteGroupRequest * @return A Java Future containing the result of the DeleteGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DeleteGroup * @see AWS API * Documentation */ @Override public CompletableFuture deleteGroup(DeleteGroupRequest deleteGroupRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteGroup").withMarshaller(new DeleteGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(deleteGroupRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes a user from a group so that the user is no longer a member of the group. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/<group-name> . *

*

* The condition resource is the user name. *

*

* The condition key is quicksight:UserName. *

*

* CLI Sample: *

*

* aws quicksight delete-group-membership --aws-account-id=111122223333 --namespace=default --group-name=Sales-Management --member-name=Charlie *

* * @param deleteGroupMembershipRequest * @return A Java Future containing the result of the DeleteGroupMembership operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DeleteGroupMembership * @see AWS API Documentation */ @Override public CompletableFuture deleteGroupMembership( DeleteGroupMembershipRequest deleteGroupMembershipRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteGroupMembershipResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteGroupMembership") .withMarshaller(new DeleteGroupMembershipRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(deleteGroupMembershipRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the Amazon QuickSight user that is associated with the identity of the AWS Identity and Access Management * (IAM) user or role that's making the call. The IAM user isn't deleted as a result of this call. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* CLI Sample: *

*

* aws quicksight delete-user --aws-account-id=111122223333 --namespace=default --user-name=Pat *

* * @param deleteUserRequest * @return A Java Future containing the result of the DeleteUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DeleteUser * @see AWS API * Documentation */ @Override public CompletableFuture deleteUser(DeleteUserRequest deleteUserRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("DeleteUser") .withMarshaller(new DeleteUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(deleteUserRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a user identified by its principal ID. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* CLI Sample: *

*

* aws quicksight delete-user-by-principal-id --aws-account-id=111122223333 --namespace=default --principal-id=ABCDEFJA26JLI7EUUOEHS *

* * @param deleteUserByPrincipalIdRequest * @return A Java Future containing the result of the DeleteUserByPrincipalId operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DeleteUserByPrincipalId * @see AWS API Documentation */ @Override public CompletableFuture deleteUserByPrincipalId( DeleteUserByPrincipalIdRequest deleteUserByPrincipalIdRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteUserByPrincipalIdResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteUserByPrincipalId") .withMarshaller(new DeleteUserByPrincipalIdRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(deleteUserByPrincipalIdRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns an Amazon QuickSight group's description and Amazon Resource Name (ARN). *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<relevant-aws-account-id>:group/default/<group-name> * . *

*

* The response is the group object. *

*

* CLI Sample: *

*

* aws quicksight describe-group -\-aws-account-id=11112222333 -\-namespace=default -\-group-name=Sales *

* * @param describeGroupRequest * @return A Java Future containing the result of the DescribeGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DescribeGroup * @see AWS API * Documentation */ @Override public CompletableFuture describeGroup(DescribeGroupRequest describeGroupRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeGroup") .withMarshaller(new DescribeGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(describeGroupRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about a user, given the user name. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* The response is a user object that contains the user's Amazon Resource Name (ARN), AWS Identity and Access * Management (IAM) role, and email address. *

*

* CLI Sample: *

*

* aws quicksight describe-user --aws-account-id=111122223333 --namespace=default --user-name=Pat *

* * @param describeUserRequest * @return A Java Future containing the result of the DescribeUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.DescribeUser * @see AWS API * Documentation */ @Override public CompletableFuture describeUser(DescribeUserRequest describeUserRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DescribeUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeUser").withMarshaller(new DescribeUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(describeUserRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Generates a server-side embeddable URL and authorization code. Before this can work properly, first you need to * configure the dashboards and user permissions. For more information, see Embedding Amazon QuickSight * Dashboards. *

*

* Currently, you can use GetDashboardEmbedURL only from the server, not from the user’s browser. *

*

* CLI Sample: *

*

* Assume the role with permissions enabled for actions: quickSight:RegisterUser and * quicksight:GetDashboardEmbedURL. You can use assume-role, assume-role-with-web-identity, or * assume-role-with-saml. *

*

* aws sts assume-role --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" --role-session-name embeddingsession *

*

* If the user does not exist in QuickSight, register the user: *

*

* aws quicksight register-user --aws-account-id 111122223333 --namespace default --identity-type IAM --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" --user-role READER --session-name "embeddingsession" --email [email protected] --region us-east-1 *

*

* Get the URL for the embedded dashboard *

*

* aws quicksight get-dashboard-embed-url --aws-account-id 111122223333 --dashboard-id 1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89 --identity-type IAM *

* * @param getDashboardEmbedUrlRequest * @return A Java Future containing the result of the GetDashboardEmbedUrl operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceExistsException The resource specified doesn't exist.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • DomainNotWhitelistedException The domain specified is not on the allowlist. All domains for embedded * dashboards must be added to the approved list by an Amazon QuickSight admin.
  • *
  • QuickSightUserNotFoundException The user is not found. This error can happen in any operation that * requires finding a user based on a provided user name, such as DeleteUser, * DescribeUser, and so on.
  • *
  • IdentityTypeNotSupportedException The identity type specified is not supported. Supported identity * types include IAM and QUICKSIGHT.
  • *
  • SessionLifetimeInMinutesInvalidException The number of minutes specified for the lifetime of a * session is not valid. The session lifetime must be from 15 to 600 minutes.
  • *
  • UnsupportedUserEditionException This error indicates that you are calling an operation on an Amazon * QuickSight subscription where the edition doesn't include support for that operation. Amazon QuickSight * currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in * every edition.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.GetDashboardEmbedUrl * @see AWS API Documentation */ @Override public CompletableFuture getDashboardEmbedUrl( GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetDashboardEmbedUrlResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetDashboardEmbedUrl") .withMarshaller(new GetDashboardEmbedUrlRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(getDashboardEmbedUrlRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists member users in a group. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/<group-name> . *

*

* The response is a list of group member objects. *

*

* CLI Sample: *

*

* aws quicksight list-group-memberships -\-aws-account-id=111122223333 -\-namespace=default *

* * @param listGroupMembershipsRequest * @return A Java Future containing the result of the ListGroupMemberships operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InvalidNextTokenException The NextToken value isn't valid.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.ListGroupMemberships * @see AWS API Documentation */ @Override public CompletableFuture listGroupMemberships( ListGroupMembershipsRequest listGroupMembershipsRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListGroupMembershipsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListGroupMemberships") .withMarshaller(new ListGroupMembershipsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(listGroupMembershipsRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all user groups in Amazon QuickSight. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/*. *

*

* The response is a list of group objects. *

*

* CLI Sample: *

*

* aws quicksight list-groups -\-aws-account-id=111122223333 -\-namespace=default *

* * @param listGroupsRequest * @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InvalidNextTokenException The NextToken value isn't valid.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.ListGroups * @see AWS API * Documentation */ @Override public CompletableFuture listGroups(ListGroupsRequest listGroupsRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListGroups") .withMarshaller(new ListGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(listGroupsRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the Amazon QuickSight groups that an Amazon QuickSight user is a member of. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* The response is a one or more group objects. *

*

* CLI Sample: *

*

* aws quicksight list-user-groups -\-user-name=Pat -\-aws-account-id=111122223333 -\-namespace=default -\-region=us-east-1 *

* * @param listUserGroupsRequest * @return A Java Future containing the result of the ListUserGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.ListUserGroups * @see AWS API * Documentation */ @Override public CompletableFuture listUserGroups(ListUserGroupsRequest listUserGroupsRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListUserGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUserGroups") .withMarshaller(new ListUserGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(listUserGroupsRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of all of the Amazon QuickSight users belonging to this account. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/* . *

*

* The response is a list of user objects, containing each user's Amazon Resource Name (ARN), AWS Identity and * Access Management (IAM) role, and email address. *

*

* CLI Sample: *

*

* aws quicksight list-users --aws-account-id=111122223333 --namespace=default *

* * @param listUsersRequest * @return A Java Future containing the result of the ListUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InvalidNextTokenException The NextToken value isn't valid.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.ListUsers * @see AWS API * Documentation */ @Override public CompletableFuture listUsers(ListUsersRequest listUsersRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("ListUsers") .withMarshaller(new ListUsersRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listUsersRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an Amazon QuickSight user, whose identity is associated with the AWS Identity and Access Management (IAM) * identity or role specified in the request. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* The condition resource is the Amazon Resource Name (ARN) for the IAM user or role, and the session name. *

*

* The condition keys are quicksight:IamArn and quicksight:SessionName. *

*

* CLI Sample: *

*

* aws quicksight register-user -\-aws-account-id=111122223333 -\-namespace=default -\[email protected] -\-identity-type=IAM -\-user-role=AUTHOR -\-iam-arn=arn:aws:iam::111122223333:user/Pat *

* * @param registerUserRequest * @return A Java Future containing the result of the RegisterUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • LimitExceededException A limit is exceeded.
  • *
  • ResourceExistsException The resource specified doesn't exist.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.RegisterUser * @see AWS API * Documentation */ @Override public CompletableFuture registerUser(RegisterUserRequest registerUserRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, RegisterUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RegisterUser").withMarshaller(new RegisterUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(registerUserRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Changes a group description. *

*

* The permissions resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:group/default/<group-name> . *

*

* The response is a group object. *

*

* CLI Sample: *

*

* aws quicksight update-group --aws-account-id=111122223333 --namespace=default --group-name=Sales --description="Sales BI Dashboards" *

* * @param updateGroupRequest * @return A Java Future containing the result of the UpdateGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • PreconditionNotMetException One or more preconditions aren't met.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.UpdateGroup * @see AWS API * Documentation */ @Override public CompletableFuture updateGroup(UpdateGroupRequest updateGroupRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateGroup").withMarshaller(new UpdateGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(updateGroupRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates an Amazon QuickSight user. *

*

* The permission resource is * arn:aws:quicksight:us-east-1:<aws-account-id>:user/default/<user-name> . *

*

* The response is a user object that contains the user's Amazon QuickSight user name, email address, active or * inactive status in Amazon QuickSight, Amazon QuickSight role, and Amazon Resource Name (ARN). *

*

* CLI Sample: *

*

* aws quicksight update-user --user-name=Pat --role=ADMIN [email protected] --aws-account-id=111122223333 --namespace=default --region=us-east-1 *

* * @param updateUserRequest * @return A Java Future containing the result of the UpdateUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException You don't have access to this. The provided credentials couldn't be validated. * You might not be authorized to carry out the request. Ensure that your account is authorized to use the * Amazon QuickSight service, that your policies have the correct permissions, and that you are using the * correct access keys.
  • *
  • InvalidParameterValueException One or more parameters don't have a valid value.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ThrottlingException Access is throttled.
  • *
  • InternalFailureException An internal failure occurred.
  • *
  • ResourceUnavailableException This resource is currently unavailable.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • QuickSightException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample QuickSightAsyncClient.UpdateUser * @see AWS API * Documentation */ @Override public CompletableFuture updateUser(UpdateUserRequest updateUserRequest) { try { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateUser") .withMarshaller(new UpdateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(updateUserRequest)); return executeFuture; } catch (Throwable t) { return CompletableFutureUtils.failedFuture(t); } } @Override public void close() { clientHandler.close(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(QuickSightException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.0") .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(401).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("DomainNotWhitelistedException") .exceptionBuilderSupplier(DomainNotWhitelistedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("QuickSightUserNotFoundException") .exceptionBuilderSupplier(QuickSightUserNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalFailureException") .exceptionBuilderSupplier(InternalFailureException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidParameterValueException") .exceptionBuilderSupplier(InvalidParameterValueException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("IdentityTypeNotSupportedException") .exceptionBuilderSupplier(IdentityTypeNotSupportedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceUnavailableException") .exceptionBuilderSupplier(ResourceUnavailableException::builder).httpStatusCode(503).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceExistsException") .exceptionBuilderSupplier(ResourceExistsException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SessionLifetimeInMinutesInvalidException") .exceptionBuilderSupplier(SessionLifetimeInMinutesInvalidException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UnsupportedUserEditionException") .exceptionBuilderSupplier(UnsupportedUserEditionException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidNextTokenException") .exceptionBuilderSupplier(InvalidNextTokenException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("PreconditionNotMetException") .exceptionBuilderSupplier(PreconditionNotMetException::builder).httpStatusCode(400).build()); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy