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

com.amazonaws.services.quicksight.AmazonQuickSightClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon QuickSight module holds the client classes that are used for communicating with Amazon QuickSight Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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 com.amazonaws.services.quicksight;

import org.w3c.dom.*;

import java.net.*;
import java.util.*;

import javax.annotation.Generated;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;

import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;

import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.quicksight.model.*;
import com.amazonaws.services.quicksight.model.transform.*;

/**
 * Client for accessing Amazon QuickSight. All service calls made using this client are blocking, and will not return
 * until the service call completes.
 * 

* Amazon QuickSight API Reference *

* Amazon QuickSight is a fully managed, serverless, cloud business intelligence service that makes it easy to extend * data and insights to every user in your organization. This API interface reference contains documentation for a * programming interface that you can use to manage Amazon QuickSight. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonQuickSightClient extends AmazonWebServiceClient implements AmazonQuickSight { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonQuickSight.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "quicksight"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.0") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withModeledClass( com.amazonaws.services.quicksight.model.AccessDeniedException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("DomainNotWhitelistedException").withModeledClass( com.amazonaws.services.quicksight.model.DomainNotWhitelistedException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("QuickSightUserNotFoundException").withModeledClass( com.amazonaws.services.quicksight.model.QuickSightUserNotFoundException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalFailureException").withModeledClass( com.amazonaws.services.quicksight.model.InternalFailureException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterValueException").withModeledClass( com.amazonaws.services.quicksight.model.InvalidParameterValueException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withModeledClass( com.amazonaws.services.quicksight.model.ResourceNotFoundException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("IdentityTypeNotSupportedException").withModeledClass( com.amazonaws.services.quicksight.model.IdentityTypeNotSupportedException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceUnavailableException").withModeledClass( com.amazonaws.services.quicksight.model.ResourceUnavailableException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withModeledClass( com.amazonaws.services.quicksight.model.ThrottlingException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceExistsException").withModeledClass( com.amazonaws.services.quicksight.model.ResourceExistsException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SessionLifetimeInMinutesInvalidException").withModeledClass( com.amazonaws.services.quicksight.model.SessionLifetimeInMinutesInvalidException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("UnsupportedUserEditionException").withModeledClass( com.amazonaws.services.quicksight.model.UnsupportedUserEditionException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidNextTokenException").withModeledClass( com.amazonaws.services.quicksight.model.InvalidNextTokenException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withModeledClass( com.amazonaws.services.quicksight.model.LimitExceededException.class)) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PreconditionNotMetException").withModeledClass( com.amazonaws.services.quicksight.model.PreconditionNotMetException.class)) .withBaseServiceExceptionClass(com.amazonaws.services.quicksight.model.AmazonQuickSightException.class)); public static AmazonQuickSightClientBuilder builder() { return AmazonQuickSightClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon QuickSight using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonQuickSightClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon QuickSight using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonQuickSightClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("quicksight.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/quicksight/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/quicksight/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* 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 Result of the CreateGroup operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceExistsException * The resource specified doesn't exist. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws LimitExceededException * A limit is exceeded. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.CreateGroup * @see AWS API * Documentation */ @Override public CreateGroupResult createGroup(CreateGroupRequest request) { request = beforeClientExecution(request); return executeCreateGroup(request); } @SdkInternalApi final CreateGroupResult executeCreateGroup(CreateGroupRequest createGroupRequest) { ExecutionContext executionContext = createExecutionContext(createGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the CreateGroupMembership operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.CreateGroupMembership * @see AWS API Documentation */ @Override public CreateGroupMembershipResult createGroupMembership(CreateGroupMembershipRequest request) { request = beforeClientExecution(request); return executeCreateGroupMembership(request); } @SdkInternalApi final CreateGroupMembershipResult executeCreateGroupMembership(CreateGroupMembershipRequest createGroupMembershipRequest) { ExecutionContext executionContext = createExecutionContext(createGroupMembershipRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateGroupMembershipRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createGroupMembershipRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGroupMembership"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateGroupMembershipResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DeleteGroup operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DeleteGroup * @see AWS API * Documentation */ @Override public DeleteGroupResult deleteGroup(DeleteGroupRequest request) { request = beforeClientExecution(request); return executeDeleteGroup(request); } @SdkInternalApi final DeleteGroupResult executeDeleteGroup(DeleteGroupRequest deleteGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DeleteGroupMembership operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DeleteGroupMembership * @see AWS API Documentation */ @Override public DeleteGroupMembershipResult deleteGroupMembership(DeleteGroupMembershipRequest request) { request = beforeClientExecution(request); return executeDeleteGroupMembership(request); } @SdkInternalApi final DeleteGroupMembershipResult executeDeleteGroupMembership(DeleteGroupMembershipRequest deleteGroupMembershipRequest) { ExecutionContext executionContext = createExecutionContext(deleteGroupMembershipRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteGroupMembershipRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteGroupMembershipRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteGroupMembership"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteGroupMembershipResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DeleteUser operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DeleteUser * @see AWS API * Documentation */ @Override public DeleteUserResult deleteUser(DeleteUserRequest request) { request = beforeClientExecution(request); return executeDeleteUser(request); } @SdkInternalApi final DeleteUserResult executeDeleteUser(DeleteUserRequest deleteUserRequest) { ExecutionContext executionContext = createExecutionContext(deleteUserRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteUserRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUser"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DeleteUserByPrincipalId operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DeleteUserByPrincipalId * @see AWS API Documentation */ @Override public DeleteUserByPrincipalIdResult deleteUserByPrincipalId(DeleteUserByPrincipalIdRequest request) { request = beforeClientExecution(request); return executeDeleteUserByPrincipalId(request); } @SdkInternalApi final DeleteUserByPrincipalIdResult executeDeleteUserByPrincipalId(DeleteUserByPrincipalIdRequest deleteUserByPrincipalIdRequest) { ExecutionContext executionContext = createExecutionContext(deleteUserByPrincipalIdRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteUserByPrincipalIdRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteUserByPrincipalIdRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteUserByPrincipalId"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteUserByPrincipalIdResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DescribeGroup operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DescribeGroup * @see AWS API * Documentation */ @Override public DescribeGroupResult describeGroup(DescribeGroupRequest request) { request = beforeClientExecution(request); return executeDescribeGroup(request); } @SdkInternalApi final DescribeGroupResult executeDescribeGroup(DescribeGroupRequest describeGroupRequest) { ExecutionContext executionContext = createExecutionContext(describeGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the DescribeUser operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.DescribeUser * @see AWS API * Documentation */ @Override public DescribeUserResult describeUser(DescribeUserRequest request) { request = beforeClientExecution(request); return executeDescribeUser(request); } @SdkInternalApi final DescribeUserResult executeDescribeUser(DescribeUserRequest describeUserRequest) { ExecutionContext executionContext = createExecutionContext(describeUserRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeUserRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeUser"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeUserResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the GetDashboardEmbedUrl operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceExistsException * The resource specified doesn't exist. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws 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. * @throws 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. * @throws IdentityTypeNotSupportedException * The identity type specified is not supported. Supported identity types include IAM and QUICKSIGHT. * @throws 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. * @throws 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. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.GetDashboardEmbedUrl * @see AWS API Documentation */ @Override public GetDashboardEmbedUrlResult getDashboardEmbedUrl(GetDashboardEmbedUrlRequest request) { request = beforeClientExecution(request); return executeGetDashboardEmbedUrl(request); } @SdkInternalApi final GetDashboardEmbedUrlResult executeGetDashboardEmbedUrl(GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest) { ExecutionContext executionContext = createExecutionContext(getDashboardEmbedUrlRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDashboardEmbedUrlRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDashboardEmbedUrlRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDashboardEmbedUrl"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDashboardEmbedUrlResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the ListGroupMemberships operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InvalidNextTokenException * The NextToken value isn't valid. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.ListGroupMemberships * @see AWS API Documentation */ @Override public ListGroupMembershipsResult listGroupMemberships(ListGroupMembershipsRequest request) { request = beforeClientExecution(request); return executeListGroupMemberships(request); } @SdkInternalApi final ListGroupMembershipsResult executeListGroupMemberships(ListGroupMembershipsRequest listGroupMembershipsRequest) { ExecutionContext executionContext = createExecutionContext(listGroupMembershipsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListGroupMembershipsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listGroupMembershipsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListGroupMemberships"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListGroupMembershipsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the ListGroups operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InvalidNextTokenException * The NextToken value isn't valid. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.ListGroups * @see AWS API * Documentation */ @Override public ListGroupsResult listGroups(ListGroupsRequest request) { request = beforeClientExecution(request); return executeListGroups(request); } @SdkInternalApi final ListGroupsResult executeListGroups(ListGroupsRequest listGroupsRequest) { ExecutionContext executionContext = createExecutionContext(listGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the ListUserGroups operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.ListUserGroups * @see AWS API * Documentation */ @Override public ListUserGroupsResult listUserGroups(ListUserGroupsRequest request) { request = beforeClientExecution(request); return executeListUserGroups(request); } @SdkInternalApi final ListUserGroupsResult executeListUserGroups(ListUserGroupsRequest listUserGroupsRequest) { ExecutionContext executionContext = createExecutionContext(listUserGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListUserGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUserGroupsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUserGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUserGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the ListUsers operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InvalidNextTokenException * The NextToken value isn't valid. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.ListUsers * @see AWS API * Documentation */ @Override public ListUsersResult listUsers(ListUsersRequest request) { request = beforeClientExecution(request); return executeListUsers(request); } @SdkInternalApi final ListUsersResult executeListUsers(ListUsersRequest listUsersRequest) { ExecutionContext executionContext = createExecutionContext(listUsersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListUsersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listUsersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUsers"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListUsersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the RegisterUser operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws LimitExceededException * A limit is exceeded. * @throws ResourceExistsException * The resource specified doesn't exist. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.RegisterUser * @see AWS API * Documentation */ @Override public RegisterUserResult registerUser(RegisterUserRequest request) { request = beforeClientExecution(request); return executeRegisterUser(request); } @SdkInternalApi final RegisterUserResult executeRegisterUser(RegisterUserRequest registerUserRequest) { ExecutionContext executionContext = createExecutionContext(registerUserRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RegisterUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(registerUserRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RegisterUser"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RegisterUserResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the UpdateGroup operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws PreconditionNotMetException * One or more preconditions aren't met. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.UpdateGroup * @see AWS API * Documentation */ @Override public UpdateGroupResult updateGroup(UpdateGroupRequest request) { request = beforeClientExecution(request); return executeUpdateGroup(request); } @SdkInternalApi final UpdateGroupResult executeUpdateGroup(UpdateGroupRequest updateGroupRequest) { ExecutionContext executionContext = createExecutionContext(updateGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateGroupRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Result of the UpdateUser operation returned by the service. * @throws 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. * @throws InvalidParameterValueException * One or more parameters don't have a valid value. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ThrottlingException * Access is throttled. * @throws InternalFailureException * An internal failure occurred. * @throws ResourceUnavailableException * This resource is currently unavailable. * @sample AmazonQuickSight.UpdateUser * @see AWS API * Documentation */ @Override public UpdateUserResult updateUser(UpdateUserRequest request) { request = beforeClientExecution(request); return executeUpdateUser(request); } @SdkInternalApi final UpdateUserResult executeUpdateUser(UpdateUserRequest updateUserRequest) { ExecutionContext executionContext = createExecutionContext(updateUserRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateUserRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateUserRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateUser"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateUserResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy