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

software.amazon.awssdk.services.finspacedata.DefaultFinspaceDataAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Finspace Data module holds the client classes that are used for communicating with Finspace Data.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 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.finspacedata;

import java.util.Collections;
import java.util.List;
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.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
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.core.metrics.CoreMetric;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
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.finspacedata.model.AccessDeniedException;
import software.amazon.awssdk.services.finspacedata.model.AssociateUserToPermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.AssociateUserToPermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.ConflictException;
import software.amazon.awssdk.services.finspacedata.model.CreateChangesetRequest;
import software.amazon.awssdk.services.finspacedata.model.CreateChangesetResponse;
import software.amazon.awssdk.services.finspacedata.model.CreateDataViewRequest;
import software.amazon.awssdk.services.finspacedata.model.CreateDataViewResponse;
import software.amazon.awssdk.services.finspacedata.model.CreateDatasetRequest;
import software.amazon.awssdk.services.finspacedata.model.CreateDatasetResponse;
import software.amazon.awssdk.services.finspacedata.model.CreatePermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.CreatePermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.CreateUserRequest;
import software.amazon.awssdk.services.finspacedata.model.CreateUserResponse;
import software.amazon.awssdk.services.finspacedata.model.DeleteDatasetRequest;
import software.amazon.awssdk.services.finspacedata.model.DeleteDatasetResponse;
import software.amazon.awssdk.services.finspacedata.model.DeletePermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.DeletePermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.DisableUserRequest;
import software.amazon.awssdk.services.finspacedata.model.DisableUserResponse;
import software.amazon.awssdk.services.finspacedata.model.DisassociateUserFromPermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.DisassociateUserFromPermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.EnableUserRequest;
import software.amazon.awssdk.services.finspacedata.model.EnableUserResponse;
import software.amazon.awssdk.services.finspacedata.model.FinspaceDataException;
import software.amazon.awssdk.services.finspacedata.model.GetChangesetRequest;
import software.amazon.awssdk.services.finspacedata.model.GetChangesetResponse;
import software.amazon.awssdk.services.finspacedata.model.GetDataViewRequest;
import software.amazon.awssdk.services.finspacedata.model.GetDataViewResponse;
import software.amazon.awssdk.services.finspacedata.model.GetDatasetRequest;
import software.amazon.awssdk.services.finspacedata.model.GetDatasetResponse;
import software.amazon.awssdk.services.finspacedata.model.GetExternalDataViewAccessDetailsRequest;
import software.amazon.awssdk.services.finspacedata.model.GetExternalDataViewAccessDetailsResponse;
import software.amazon.awssdk.services.finspacedata.model.GetPermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.GetPermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.GetProgrammaticAccessCredentialsRequest;
import software.amazon.awssdk.services.finspacedata.model.GetProgrammaticAccessCredentialsResponse;
import software.amazon.awssdk.services.finspacedata.model.GetUserRequest;
import software.amazon.awssdk.services.finspacedata.model.GetUserResponse;
import software.amazon.awssdk.services.finspacedata.model.GetWorkingLocationRequest;
import software.amazon.awssdk.services.finspacedata.model.GetWorkingLocationResponse;
import software.amazon.awssdk.services.finspacedata.model.InternalServerException;
import software.amazon.awssdk.services.finspacedata.model.LimitExceededException;
import software.amazon.awssdk.services.finspacedata.model.ListChangesetsRequest;
import software.amazon.awssdk.services.finspacedata.model.ListChangesetsResponse;
import software.amazon.awssdk.services.finspacedata.model.ListDataViewsRequest;
import software.amazon.awssdk.services.finspacedata.model.ListDataViewsResponse;
import software.amazon.awssdk.services.finspacedata.model.ListDatasetsRequest;
import software.amazon.awssdk.services.finspacedata.model.ListDatasetsResponse;
import software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsByUserRequest;
import software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsByUserResponse;
import software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsRequest;
import software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsResponse;
import software.amazon.awssdk.services.finspacedata.model.ListUsersByPermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.ListUsersByPermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.ListUsersRequest;
import software.amazon.awssdk.services.finspacedata.model.ListUsersResponse;
import software.amazon.awssdk.services.finspacedata.model.ResetUserPasswordRequest;
import software.amazon.awssdk.services.finspacedata.model.ResetUserPasswordResponse;
import software.amazon.awssdk.services.finspacedata.model.ResourceNotFoundException;
import software.amazon.awssdk.services.finspacedata.model.ThrottlingException;
import software.amazon.awssdk.services.finspacedata.model.UpdateChangesetRequest;
import software.amazon.awssdk.services.finspacedata.model.UpdateChangesetResponse;
import software.amazon.awssdk.services.finspacedata.model.UpdateDatasetRequest;
import software.amazon.awssdk.services.finspacedata.model.UpdateDatasetResponse;
import software.amazon.awssdk.services.finspacedata.model.UpdatePermissionGroupRequest;
import software.amazon.awssdk.services.finspacedata.model.UpdatePermissionGroupResponse;
import software.amazon.awssdk.services.finspacedata.model.UpdateUserRequest;
import software.amazon.awssdk.services.finspacedata.model.UpdateUserResponse;
import software.amazon.awssdk.services.finspacedata.model.ValidationException;
import software.amazon.awssdk.services.finspacedata.transform.AssociateUserToPermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.CreateChangesetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.CreateDataViewRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.CreateDatasetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.CreatePermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.CreateUserRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.DeleteDatasetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.DeletePermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.DisableUserRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.DisassociateUserFromPermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.EnableUserRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetChangesetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetDataViewRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetDatasetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetExternalDataViewAccessDetailsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetPermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetProgrammaticAccessCredentialsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetUserRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.GetWorkingLocationRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListChangesetsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListDataViewsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListDatasetsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListPermissionGroupsByUserRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListPermissionGroupsRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListUsersByPermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ListUsersRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.ResetUserPasswordRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.UpdateChangesetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.UpdateDatasetRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.UpdatePermissionGroupRequestMarshaller;
import software.amazon.awssdk.services.finspacedata.transform.UpdateUserRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;

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

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    private final FinspaceDataServiceClientConfiguration serviceClientConfiguration;

    protected DefaultFinspaceDataAsyncClient(FinspaceDataServiceClientConfiguration serviceClientConfiguration,
            SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.serviceClientConfiguration = serviceClientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    /**
     * 

* Adds a user account to a permission group to grant permissions for actions a user can perform in FinSpace. *

* * @param associateUserToPermissionGroupRequest * @return A Java Future containing the result of the AssociateUserToPermissionGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.AssociateUserToPermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture associateUserToPermissionGroup( AssociateUserToPermissionGroupRequest associateUserToPermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, associateUserToPermissionGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateUserToPermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateUserToPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateUserToPermissionGroup") .withMarshaller(new AssociateUserToPermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(associateUserToPermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new Changeset in a FinSpace Dataset. *

* * @param createChangesetRequest * The request for a CreateChangeset operation. * @return A Java Future containing the result of the CreateChangeset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.CreateChangeset * @see AWS API * Documentation */ @Override public CompletableFuture createChangeset(CreateChangesetRequest createChangesetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createChangesetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateChangeset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateChangeset") .withMarshaller(new CreateChangesetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createChangesetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a Dataview for a Dataset. *

* * @param createDataViewRequest * Request for creating a data view. * @return A Java Future containing the result of the CreateDataView operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.CreateDataView * @see AWS API * Documentation */ @Override public CompletableFuture createDataView(CreateDataViewRequest createDataViewRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createDataViewRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDataView"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateDataViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDataView") .withMarshaller(new CreateDataViewRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createDataViewRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new FinSpace Dataset. *

* * @param createDatasetRequest * The request for a CreateDataset operation * @return A Java Future containing the result of the CreateDataset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.CreateDataset * @see AWS API * Documentation */ @Override public CompletableFuture createDataset(CreateDatasetRequest createDatasetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateDataset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateDataset") .withMarshaller(new CreateDatasetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createDatasetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a group of permissions for various actions that a user can perform in FinSpace. *

* * @param createPermissionGroupRequest * @return A Java Future containing the result of the CreatePermissionGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.CreatePermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture createPermissionGroup( CreatePermissionGroupRequest createPermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createPermissionGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreatePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreatePermissionGroup") .withMarshaller(new CreatePermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createPermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a new user in FinSpace. *

* * @param createUserRequest * @return A Java Future containing the result of the CreateUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.CreateUser * @see AWS API * Documentation */ @Override public CompletableFuture createUser(CreateUserRequest createUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("CreateUser") .withMarshaller(new CreateUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a FinSpace Dataset. *

* * @param deleteDatasetRequest * The request for a DeleteDataset operation. * @return A Java Future containing the result of the DeleteDataset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.DeleteDataset * @see AWS API * Documentation */ @Override public CompletableFuture deleteDataset(DeleteDatasetRequest deleteDatasetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteDataset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteDataset") .withMarshaller(new DeleteDatasetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteDatasetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a permission group. This action is irreversible. *

* * @param deletePermissionGroupRequest * @return A Java Future containing the result of the DeletePermissionGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.DeletePermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture deletePermissionGroup( DeletePermissionGroupRequest deletePermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePermissionGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeletePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeletePermissionGroup") .withMarshaller(new DeletePermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deletePermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Denies access to the FinSpace web application and API for the specified user. *

* * @param disableUserRequest * @return A Java Future containing the result of the DisableUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.DisableUser * @see AWS API * Documentation */ @Override public CompletableFuture disableUser(DisableUserRequest disableUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, disableUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisableUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DisableUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisableUser").withMarshaller(new DisableUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disableUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes a user account from a permission group. *

* * @param disassociateUserFromPermissionGroupRequest * @return A Java Future containing the result of the DisassociateUserFromPermissionGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.DisassociateUserFromPermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture disassociateUserFromPermissionGroup( DisassociateUserFromPermissionGroupRequest disassociateUserFromPermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateUserFromPermissionGroupRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateUserFromPermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DisassociateUserFromPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateUserFromPermissionGroup") .withMarshaller(new DisassociateUserFromPermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(disassociateUserFromPermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Allows the specified user to access the FinSpace web application and API. *

* * @param enableUserRequest * @return A Java Future containing the result of the EnableUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • LimitExceededException A limit has exceeded.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.EnableUser * @see AWS API * Documentation */ @Override public CompletableFuture enableUser(EnableUserRequest enableUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, enableUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "EnableUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, EnableUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("EnableUser") .withMarshaller(new EnableUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(enableUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Get information about a Changeset. *

* * @param getChangesetRequest * Request to describe a changeset. * @return A Java Future containing the result of the GetChangeset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetChangeset * @see AWS API * Documentation */ @Override public CompletableFuture getChangeset(GetChangesetRequest getChangesetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getChangesetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetChangeset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetChangeset").withMarshaller(new GetChangesetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getChangesetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Gets information about a Dataview. *

* * @param getDataViewRequest * Request for retrieving a data view detail. Grouped / accessible within a dataset by its dataset id. * @return A Java Future containing the result of the GetDataView operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetDataView * @see AWS API * Documentation */ @Override public CompletableFuture getDataView(GetDataViewRequest getDataViewRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getDataViewRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDataView"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDataViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetDataView").withMarshaller(new GetDataViewRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getDataViewRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about a Dataset. *

* * @param getDatasetRequest * Request for the GetDataset operation. * @return A Java Future containing the result of the GetDataset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetDataset * @see AWS API * Documentation */ @Override public CompletableFuture getDataset(GetDatasetRequest getDatasetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetDataset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetDataset") .withMarshaller(new GetDatasetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getDatasetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the credentials to access the external Dataview from an S3 location. To call this API: *

*
    *
  • *

    * You must retrieve the programmatic credentials. *

    *
  • *
  • *

    * You must be a member of a FinSpace user group, where the dataset that you want to access has * Read Dataset Data permissions. *

    *
  • *
* * @param getExternalDataViewAccessDetailsRequest * @return A Java Future containing the result of the GetExternalDataViewAccessDetails operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetExternalDataViewAccessDetails * @see AWS API Documentation */ @Override public CompletableFuture getExternalDataViewAccessDetails( GetExternalDataViewAccessDetailsRequest getExternalDataViewAccessDetailsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getExternalDataViewAccessDetailsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetExternalDataViewAccessDetails"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, GetExternalDataViewAccessDetailsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetExternalDataViewAccessDetails") .withMarshaller(new GetExternalDataViewAccessDetailsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getExternalDataViewAccessDetailsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves the details of a specific permission group. *

* * @param getPermissionGroupRequest * @return A Java Future containing the result of the GetPermissionGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetPermissionGroup * @see AWS * API Documentation */ @Override public CompletableFuture getPermissionGroup(GetPermissionGroupRequest getPermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getPermissionGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetPermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetPermissionGroup") .withMarshaller(new GetPermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getPermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Request programmatic credentials to use with FinSpace SDK. *

* * @param getProgrammaticAccessCredentialsRequest * Request for GetProgrammaticAccessCredentials operation * @return A Java Future containing the result of the GetProgrammaticAccessCredentials operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetProgrammaticAccessCredentials * @see AWS API Documentation */ @Override public CompletableFuture getProgrammaticAccessCredentials( GetProgrammaticAccessCredentialsRequest getProgrammaticAccessCredentialsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getProgrammaticAccessCredentialsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetProgrammaticAccessCredentials"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, GetProgrammaticAccessCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetProgrammaticAccessCredentials") .withMarshaller(new GetProgrammaticAccessCredentialsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getProgrammaticAccessCredentialsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Retrieves details for a specific user. *

* * @param getUserRequest * @return A Java Future containing the result of the GetUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetUser * @see AWS API * Documentation */ @Override public CompletableFuture getUser(GetUserRequest getUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams().withOperationName("GetUser") .withMarshaller(new GetUserRequestMarshaller(protocolFactory)).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withMetricCollector(apiCallMetricCollector) .withInput(getUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* A temporary Amazon S3 location, where you can copy your files from a source location to stage or use as a scratch * space in FinSpace notebook. *

* * @param getWorkingLocationRequest * @return A Java Future containing the result of the GetWorkingLocation operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.GetWorkingLocation * @see AWS * API Documentation */ @Override public CompletableFuture getWorkingLocation(GetWorkingLocationRequest getWorkingLocationRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, getWorkingLocationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetWorkingLocation"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetWorkingLocationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("GetWorkingLocation") .withMarshaller(new GetWorkingLocationRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(getWorkingLocationRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists the FinSpace Changesets for a Dataset. *

* * @param listChangesetsRequest * Request to ListChangesetsRequest. It exposes minimal query filters. * @return A Java Future containing the result of the ListChangesets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListChangesets * @see AWS API * Documentation */ @Override public CompletableFuture listChangesets(ListChangesetsRequest listChangesetsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listChangesetsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListChangesets"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListChangesetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListChangesets") .withMarshaller(new ListChangesetsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listChangesetsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all available Dataviews for a Dataset. *

* * @param listDataViewsRequest * Request for a list data views. * @return A Java Future containing the result of the ListDataViews operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListDataViews * @see AWS API * Documentation */ @Override public CompletableFuture listDataViews(ListDataViewsRequest listDataViewsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listDataViewsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDataViews"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDataViewsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDataViews") .withMarshaller(new ListDataViewsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listDataViewsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all of the active Datasets that a user has access to. *

* * @param listDatasetsRequest * Request for the ListDatasets operation. * @return A Java Future containing the result of the ListDatasets operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListDatasets * @see AWS API * Documentation */ @Override public CompletableFuture listDatasets(ListDatasetsRequest listDatasetsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listDatasetsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListDatasets"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDatasetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListDatasets").withMarshaller(new ListDatasetsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listDatasetsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all available permission groups in FinSpace. *

* * @param listPermissionGroupsRequest * @return A Java Future containing the result of the ListPermissionGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListPermissionGroups * @see AWS * API Documentation */ @Override public CompletableFuture listPermissionGroups( ListPermissionGroupsRequest listPermissionGroupsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listPermissionGroupsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPermissionGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPermissionGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPermissionGroups") .withMarshaller(new ListPermissionGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listPermissionGroupsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the permission groups that are associated with a specific user account. *

* * @param listPermissionGroupsByUserRequest * @return A Java Future containing the result of the ListPermissionGroupsByUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListPermissionGroupsByUser * @see AWS API Documentation */ @Override public CompletableFuture listPermissionGroupsByUser( ListPermissionGroupsByUserRequest listPermissionGroupsByUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listPermissionGroupsByUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListPermissionGroupsByUser"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPermissionGroupsByUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPermissionGroupsByUser") .withMarshaller(new ListPermissionGroupsByUserRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listPermissionGroupsByUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all available user accounts in FinSpace. *

* * @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. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListUsers * @see AWS API * Documentation */ @Override public CompletableFuture listUsers(ListUsersRequest listUsersRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listUsersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUsers"); 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).withMetricCollector(apiCallMetricCollector) .withInput(listUsersRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists details of all the users in a specific permission group. *

* * @param listUsersByPermissionGroupRequest * @return A Java Future containing the result of the ListUsersByPermissionGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ListUsersByPermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture listUsersByPermissionGroup( ListUsersByPermissionGroupRequest listUsersByPermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listUsersByPermissionGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListUsersByPermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListUsersByPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUsersByPermissionGroup") .withMarshaller(new ListUsersByPermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listUsersByPermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Resets the password for a specified user ID and generates a temporary one. Only a superuser can reset password * for other users. Resetting the password immediately invalidates the previous password associated with the user. *

* * @param resetUserPasswordRequest * @return A Java Future containing the result of the ResetUserPassword operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.ResetUserPassword * @see AWS * API Documentation */ @Override public CompletableFuture resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, resetUserPasswordRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ResetUserPassword"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ResetUserPasswordResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ResetUserPassword") .withMarshaller(new ResetUserPasswordRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(resetUserPasswordRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a FinSpace Changeset. *

* * @param updateChangesetRequest * Request to update an existing changeset. * @return A Java Future containing the result of the UpdateChangeset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.UpdateChangeset * @see AWS API * Documentation */ @Override public CompletableFuture updateChangeset(UpdateChangesetRequest updateChangesetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateChangesetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateChangeset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateChangeset") .withMarshaller(new UpdateChangesetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateChangesetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Updates a FinSpace Dataset. *

* * @param updateDatasetRequest * The request for an UpdateDataset operation * @return A Java Future containing the result of the UpdateDataset operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.UpdateDataset * @see AWS API * Documentation */ @Override public CompletableFuture updateDataset(UpdateDatasetRequest updateDatasetRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateDataset"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateDataset") .withMarshaller(new UpdateDatasetRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateDatasetRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the details of a permission group. You cannot modify a permissionGroupID. *

* * @param updatePermissionGroupRequest * @return A Java Future containing the result of the UpdatePermissionGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.UpdatePermissionGroup * @see AWS API Documentation */ @Override public CompletableFuture updatePermissionGroup( UpdatePermissionGroupRequest updatePermissionGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updatePermissionGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdatePermissionGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdatePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdatePermissionGroup") .withMarshaller(new UpdatePermissionGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updatePermissionGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the details of the specified user account. You cannot update the userId for a user. *

* * @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. *
    *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure.
  • *
  • ValidationException The input fails to satisfy the constraints specified by an AWS service.
  • *
  • ThrottlingException The request was denied due to request throttling.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException One or more resources can't be found.
  • *
  • ConflictException The request conflicts with an existing resource.
  • *
  • 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.
  • *
  • FinspaceDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample FinspaceDataAsyncClient.UpdateUser * @see AWS API * Documentation */ @Override public CompletableFuture updateUser(UpdateUserRequest updateUserRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateUserRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "finspace data"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateUser"); 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) .withMetricCollector(apiCallMetricCollector).withInput(updateUserRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public final FinspaceDataServiceClientConfiguration serviceClientConfiguration() { return this.serviceClientConfiguration; } @Override public final String serviceName() { return SERVICE_NAME; } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(FinspaceDataException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerException") .exceptionBuilderSupplier(InternalServerException::builder).httpStatusCode(500).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("LimitExceededException") .exceptionBuilderSupplier(LimitExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy