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

software.amazon.awssdk.services.finspacedata.DefaultFinspaceDataClient 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.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
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.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
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.FinspaceDataRequest;
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.paginators.ListChangesetsIterable;
import software.amazon.awssdk.services.finspacedata.paginators.ListDataViewsIterable;
import software.amazon.awssdk.services.finspacedata.paginators.ListDatasetsIterable;
import software.amazon.awssdk.services.finspacedata.paginators.ListPermissionGroupsIterable;
import software.amazon.awssdk.services.finspacedata.paginators.ListUsersIterable;
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.Logger;

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

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

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

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

    /**
     * 

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

* * @param associateUserToPermissionGroupRequest * @return Result of the AssociateUserToPermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.AssociateUserToPermissionGroup * @see AWS API Documentation */ @Override public AssociateUserToPermissionGroupResponse associateUserToPermissionGroup( AssociateUserToPermissionGroupRequest associateUserToPermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AssociateUserToPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("AssociateUserToPermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(associateUserToPermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AssociateUserToPermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a new Changeset in a FinSpace Dataset. *

* * @param createChangesetRequest * The request for a CreateChangeset operation. * @return Result of the CreateChangeset operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.CreateChangeset * @see AWS API * Documentation */ @Override public CreateChangesetResponse createChangeset(CreateChangesetRequest createChangesetRequest) throws ResourceNotFoundException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateChangeset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createChangesetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateChangesetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a Dataview for a Dataset. *

* * @param createDataViewRequest * Request for creating a data view. * @return Result of the CreateDataView operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.CreateDataView * @see AWS API * Documentation */ @Override public CreateDataViewResponse createDataView(CreateDataViewRequest createDataViewRequest) throws InternalServerException, ThrottlingException, ValidationException, LimitExceededException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateDataViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDataView").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDataViewRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDataViewRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a new FinSpace Dataset. *

* * @param createDatasetRequest * The request for a CreateDataset operation * @return Result of the CreateDataset operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.CreateDataset * @see AWS API * Documentation */ @Override public CreateDatasetResponse createDataset(CreateDatasetRequest createDatasetRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, LimitExceededException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param createPermissionGroupRequest * @return Result of the CreatePermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.CreatePermissionGroup * @see AWS API Documentation */ @Override public CreatePermissionGroupResponse createPermissionGroup(CreatePermissionGroupRequest createPermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreatePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreatePermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createPermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreatePermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a new user in FinSpace. *

* * @param createUserRequest * @return Result of the CreateUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.CreateUser * @see AWS API * Documentation */ @Override public CreateUserResponse createUser(CreateUserRequest createUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams().withOperationName("CreateUser") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(createUserRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a FinSpace Dataset. *

* * @param deleteDatasetRequest * The request for a DeleteDataset operation. * @return Result of the DeleteDataset operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.DeleteDataset * @see AWS API * Documentation */ @Override public DeleteDatasetResponse deleteDataset(DeleteDatasetRequest deleteDatasetRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param deletePermissionGroupRequest * @return Result of the DeletePermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.DeletePermissionGroup * @see AWS API Documentation */ @Override public DeletePermissionGroupResponse deletePermissionGroup(DeletePermissionGroupRequest deletePermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeletePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeletePermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deletePermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeletePermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param disableUserRequest * @return Result of the DisableUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.DisableUser * @see AWS API * Documentation */ @Override public DisableUserResponse disableUser(DisableUserRequest disableUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DisableUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DisableUser").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(disableUserRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DisableUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes a user account from a permission group. *

* * @param disassociateUserFromPermissionGroupRequest * @return Result of the DisassociateUserFromPermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.DisassociateUserFromPermissionGroup * @see AWS API Documentation */ @Override public DisassociateUserFromPermissionGroupResponse disassociateUserFromPermissionGroup( DisassociateUserFromPermissionGroupRequest disassociateUserFromPermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DisassociateUserFromPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DisassociateUserFromPermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(disassociateUserFromPermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DisassociateUserFromPermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param enableUserRequest * @return Result of the EnableUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws LimitExceededException * A limit has exceeded. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.EnableUser * @see AWS API * Documentation */ @Override public EnableUserResponse enableUser(EnableUserRequest enableUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, LimitExceededException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, EnableUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams().withOperationName("EnableUser") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(enableUserRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new EnableUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get information about a Changeset. *

* * @param getChangesetRequest * Request to describe a changeset. * @return Result of the GetChangeset operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetChangeset * @see AWS API * Documentation */ @Override public GetChangesetResponse getChangeset(GetChangesetRequest getChangesetRequest) throws ResourceNotFoundException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetChangeset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getChangesetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetChangesetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets information about a Dataview. *

* * @param getDataViewRequest * Request for retrieving a data view detail. Grouped / accessible within a dataset by its dataset id. * @return Result of the GetDataView operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetDataView * @see AWS API * Documentation */ @Override public GetDataViewResponse getDataView(GetDataViewRequest getDataViewRequest) throws ResourceNotFoundException, InternalServerException, ThrottlingException, ValidationException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDataViewResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetDataView").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getDataViewRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetDataViewRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a Dataset. *

* * @param getDatasetRequest * Request for the GetDataset operation. * @return Result of the GetDataset operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetDataset * @see AWS API * Documentation */ @Override public GetDatasetResponse getDataset(GetDatasetRequest getDatasetRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams().withOperationName("GetDataset") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(getDatasetRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the GetExternalDataViewAccessDetails operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetExternalDataViewAccessDetails * @see AWS API Documentation */ @Override public GetExternalDataViewAccessDetailsResponse getExternalDataViewAccessDetails( GetExternalDataViewAccessDetailsRequest getExternalDataViewAccessDetailsRequest) throws ResourceNotFoundException, InternalServerException, ThrottlingException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetExternalDataViewAccessDetailsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetExternalDataViewAccessDetails").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getExternalDataViewAccessDetailsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetExternalDataViewAccessDetailsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves the details of a specific permission group. *

* * @param getPermissionGroupRequest * @return Result of the GetPermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetPermissionGroup * @see AWS * API Documentation */ @Override public GetPermissionGroupResponse getPermissionGroup(GetPermissionGroupRequest getPermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetPermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getPermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetPermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Request programmatic credentials to use with FinSpace SDK. *

* * @param getProgrammaticAccessCredentialsRequest * Request for GetProgrammaticAccessCredentials operation * @return Result of the GetProgrammaticAccessCredentials operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetProgrammaticAccessCredentials * @see AWS API Documentation */ @Override public GetProgrammaticAccessCredentialsResponse getProgrammaticAccessCredentials( GetProgrammaticAccessCredentialsRequest getProgrammaticAccessCredentialsRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetProgrammaticAccessCredentialsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetProgrammaticAccessCredentials").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getProgrammaticAccessCredentialsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetProgrammaticAccessCredentialsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Retrieves details for a specific user. *

* * @param getUserRequest * @return Result of the GetUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetUser * @see AWS API * Documentation */ @Override public GetUserResponse getUser(GetUserRequest getUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetUser").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getUserRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new GetUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the GetWorkingLocation operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.GetWorkingLocation * @see AWS * API Documentation */ @Override public GetWorkingLocationResponse getWorkingLocation(GetWorkingLocationRequest getWorkingLocationRequest) throws InternalServerException, AccessDeniedException, ThrottlingException, ValidationException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetWorkingLocationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetWorkingLocation").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getWorkingLocationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetWorkingLocationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the FinSpace Changesets for a Dataset. *

* * @param listChangesetsRequest * Request to ListChangesetsRequest. It exposes minimal query filters. * @return Result of the ListChangesets operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListChangesets * @see AWS API * Documentation */ @Override public ListChangesetsResponse listChangesets(ListChangesetsRequest listChangesetsRequest) throws ResourceNotFoundException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListChangesetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListChangesets").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listChangesetsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListChangesetsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the FinSpace Changesets for a Dataset. *

*
*

* This is a variant of * {@link #listChangesets(software.amazon.awssdk.services.finspacedata.model.ListChangesetsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListChangesetsIterable responses = client.listChangesetsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.finspacedata.paginators.ListChangesetsIterable responses = client
     *             .listChangesetsPaginator(request);
     *     for (software.amazon.awssdk.services.finspacedata.model.ListChangesetsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListChangesetsIterable responses = client.listChangesetsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listChangesets(software.amazon.awssdk.services.finspacedata.model.ListChangesetsRequest)} operation. *

* * @param listChangesetsRequest * Request to ListChangesetsRequest. It exposes minimal query filters. * @return A custom iterable that can be used to iterate through all the response pages. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListChangesets * @see AWS API * Documentation */ @Override public ListChangesetsIterable listChangesetsPaginator(ListChangesetsRequest listChangesetsRequest) throws ResourceNotFoundException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { return new ListChangesetsIterable(this, applyPaginatorUserAgent(listChangesetsRequest)); } /** *

* Lists all available Dataviews for a Dataset. *

* * @param listDataViewsRequest * Request for a list data views. * @return Result of the ListDataViews operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListDataViews * @see AWS API * Documentation */ @Override public ListDataViewsResponse listDataViews(ListDataViewsRequest listDataViewsRequest) throws ResourceNotFoundException, InternalServerException, ThrottlingException, ValidationException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDataViewsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDataViews").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDataViewsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDataViewsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all available Dataviews for a Dataset. *

*
*

* This is a variant of * {@link #listDataViews(software.amazon.awssdk.services.finspacedata.model.ListDataViewsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListDataViewsIterable responses = client.listDataViewsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.finspacedata.paginators.ListDataViewsIterable responses = client
     *             .listDataViewsPaginator(request);
     *     for (software.amazon.awssdk.services.finspacedata.model.ListDataViewsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListDataViewsIterable responses = client.listDataViewsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDataViews(software.amazon.awssdk.services.finspacedata.model.ListDataViewsRequest)} operation. *

* * @param listDataViewsRequest * Request for a list data views. * @return A custom iterable that can be used to iterate through all the response pages. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListDataViews * @see AWS API * Documentation */ @Override public ListDataViewsIterable listDataViewsPaginator(ListDataViewsRequest listDataViewsRequest) throws ResourceNotFoundException, InternalServerException, ThrottlingException, ValidationException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { return new ListDataViewsIterable(this, applyPaginatorUserAgent(listDataViewsRequest)); } /** *

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

* * @param listDatasetsRequest * Request for the ListDatasets operation. * @return Result of the ListDatasets operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request conflicts with an existing resource. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListDatasets * @see AWS API * Documentation */ @Override public ListDatasetsResponse listDatasets(ListDatasetsRequest listDatasetsRequest) throws InternalServerException, ThrottlingException, ValidationException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListDatasetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListDatasets").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listDatasetsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListDatasetsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

*
*

* This is a variant of * {@link #listDatasets(software.amazon.awssdk.services.finspacedata.model.ListDatasetsRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListDatasetsIterable responses = client.listDatasetsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.finspacedata.paginators.ListDatasetsIterable responses = client
     *             .listDatasetsPaginator(request);
     *     for (software.amazon.awssdk.services.finspacedata.model.ListDatasetsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListDatasetsIterable responses = client.listDatasetsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listDatasets(software.amazon.awssdk.services.finspacedata.model.ListDatasetsRequest)} operation. *

* * @param listDatasetsRequest * Request for the ListDatasets operation. * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ConflictException * The request conflicts with an existing resource. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListDatasets * @see AWS API * Documentation */ @Override public ListDatasetsIterable listDatasetsPaginator(ListDatasetsRequest listDatasetsRequest) throws InternalServerException, ThrottlingException, ValidationException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { return new ListDatasetsIterable(this, applyPaginatorUserAgent(listDatasetsRequest)); } /** *

* Lists all available permission groups in FinSpace. *

* * @param listPermissionGroupsRequest * @return Result of the ListPermissionGroups operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListPermissionGroups * @see AWS * API Documentation */ @Override public ListPermissionGroupsResponse listPermissionGroups(ListPermissionGroupsRequest listPermissionGroupsRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPermissionGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListPermissionGroups").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPermissionGroupsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListPermissionGroupsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all available permission groups in FinSpace. *

*
*

* This is a variant of * {@link #listPermissionGroups(software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListPermissionGroupsIterable responses = client.listPermissionGroupsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.finspacedata.paginators.ListPermissionGroupsIterable responses = client
     *             .listPermissionGroupsPaginator(request);
     *     for (software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListPermissionGroupsIterable responses = client.listPermissionGroupsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listPermissionGroups(software.amazon.awssdk.services.finspacedata.model.ListPermissionGroupsRequest)} * operation. *

* * @param listPermissionGroupsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListPermissionGroups * @see AWS * API Documentation */ @Override public ListPermissionGroupsIterable listPermissionGroupsPaginator(ListPermissionGroupsRequest listPermissionGroupsRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { return new ListPermissionGroupsIterable(this, applyPaginatorUserAgent(listPermissionGroupsRequest)); } /** *

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

* * @param listPermissionGroupsByUserRequest * @return Result of the ListPermissionGroupsByUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListPermissionGroupsByUser * @see AWS API Documentation */ @Override public ListPermissionGroupsByUserResponse listPermissionGroupsByUser( ListPermissionGroupsByUserRequest listPermissionGroupsByUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListPermissionGroupsByUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListPermissionGroupsByUser").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listPermissionGroupsByUserRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListPermissionGroupsByUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all available user accounts in FinSpace. *

* * @param listUsersRequest * @return Result of the ListUsers operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListUsers * @see AWS API * Documentation */ @Override public ListUsersResponse listUsers(ListUsersRequest listUsersRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListUsersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListUsers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listUsersRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new ListUsersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists all available user accounts in FinSpace. *

*
*

* This is a variant of {@link #listUsers(software.amazon.awssdk.services.finspacedata.model.ListUsersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListUsersIterable responses = client.listUsersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.finspacedata.paginators.ListUsersIterable responses = client.listUsersPaginator(request);
     *     for (software.amazon.awssdk.services.finspacedata.model.ListUsersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.finspacedata.paginators.ListUsersIterable responses = client.listUsersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listUsers(software.amazon.awssdk.services.finspacedata.model.ListUsersRequest)} operation. *

* * @param listUsersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListUsers * @see AWS API * Documentation */ @Override public ListUsersIterable listUsersPaginator(ListUsersRequest listUsersRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, AwsServiceException, SdkClientException, FinspaceDataException { return new ListUsersIterable(this, applyPaginatorUserAgent(listUsersRequest)); } /** *

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

* * @param listUsersByPermissionGroupRequest * @return Result of the ListUsersByPermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ListUsersByPermissionGroup * @see AWS API Documentation */ @Override public ListUsersByPermissionGroupResponse listUsersByPermissionGroup( ListUsersByPermissionGroupRequest listUsersByPermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListUsersByPermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListUsersByPermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listUsersByPermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListUsersByPermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* 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 Result of the ResetUserPassword operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.ResetUserPassword * @see AWS * API Documentation */ @Override public ResetUserPasswordResponse resetUserPassword(ResetUserPasswordRequest resetUserPasswordRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ResetUserPasswordResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ResetUserPassword").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(resetUserPasswordRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ResetUserPasswordRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a FinSpace Changeset. *

* * @param updateChangesetRequest * Request to update an existing changeset. * @return Result of the UpdateChangeset operation returned by the service. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.UpdateChangeset * @see AWS API * Documentation */ @Override public UpdateChangesetResponse updateChangeset(UpdateChangesetRequest updateChangesetRequest) throws ResourceNotFoundException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateChangesetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateChangeset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateChangesetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateChangesetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a FinSpace Dataset. *

* * @param updateDatasetRequest * The request for an UpdateDataset operation * @return Result of the UpdateDataset operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ConflictException * The request conflicts with an existing resource. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.UpdateDataset * @see AWS API * Documentation */ @Override public UpdateDatasetResponse updateDataset(UpdateDatasetRequest updateDatasetRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateDataset").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param updatePermissionGroupRequest * @return Result of the UpdatePermissionGroup operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.UpdatePermissionGroup * @see AWS API Documentation */ @Override public UpdatePermissionGroupResponse updatePermissionGroup(UpdatePermissionGroupRequest updatePermissionGroupRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdatePermissionGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdatePermissionGroup").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updatePermissionGroupRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdatePermissionGroupRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

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

* * @param updateUserRequest * @return Result of the UpdateUser operation returned by the service. * @throws InternalServerException * The request processing has failed because of an unknown error, exception or failure. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ThrottlingException * The request was denied due to request throttling. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * One or more resources can't be found. * @throws ConflictException * The request conflicts with an existing resource. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws FinspaceDataException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample FinspaceDataClient.UpdateUser * @see AWS API * Documentation */ @Override public UpdateUserResponse updateUser(UpdateUserRequest updateUserRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, ConflictException, AwsServiceException, SdkClientException, FinspaceDataException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateUserResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); 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"); return clientHandler .execute(new ClientExecutionParams().withOperationName("UpdateUser") .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withInput(updateUserRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateUserRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } 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); } 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()); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy