/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.healthlake; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.healthlake.AmazonHealthLakeClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.healthlake.model.*; import com.amazonaws.services.healthlake.model.transform.*; /** * Client for accessing HealthLake. All service calls made using this client are blocking, and will not return until the * service call completes. *
*
* AWS HealthLake is a HIPAA eligibile service that allows customers to store, transform, query, and analyze their * FHIR-formatted data in a consistent fashion in the cloud. *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonHealthLakeClient extends AmazonWebServiceClient implements AmazonHealthLake { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonHealthLake.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "healthlake"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.0") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.healthlake.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.healthlake.model.AmazonHealthLakeException.class)); public static AmazonHealthLakeClientBuilder builder() { return AmazonHealthLakeClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on HealthLake using the specified parameters. * ** All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonHealthLakeClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on HealthLake using the specified parameters. * *
* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonHealthLakeClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("healthlake.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/healthlake/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/healthlake/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *
* Creates a data store that can ingest and export FHIR formatted data. *
* * @param createFHIRDatastoreRequest * @return Result of the CreateFHIRDatastore operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.CreateFHIRDatastore * @see AWS * API Documentation */ @Override public CreateFHIRDatastoreResult createFHIRDatastore(CreateFHIRDatastoreRequest request) { request = beforeClientExecution(request); return executeCreateFHIRDatastore(request); } @SdkInternalApi final CreateFHIRDatastoreResult executeCreateFHIRDatastore(CreateFHIRDatastoreRequest createFHIRDatastoreRequest) { ExecutionContext executionContext = createExecutionContext(createFHIRDatastoreRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes a data store. *
* * @param deleteFHIRDatastoreRequest * @return Result of the DeleteFHIRDatastore operation returned by the service. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws ConflictException * The data store is in a transition state and the user requested action can not be performed. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.DeleteFHIRDatastore * @see AWS * API Documentation */ @Override public DeleteFHIRDatastoreResult deleteFHIRDatastore(DeleteFHIRDatastoreRequest request) { request = beforeClientExecution(request); return executeDeleteFHIRDatastore(request); } @SdkInternalApi final DeleteFHIRDatastoreResult executeDeleteFHIRDatastore(DeleteFHIRDatastoreRequest deleteFHIRDatastoreRequest) { ExecutionContext executionContext = createExecutionContext(deleteFHIRDatastoreRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Gets the properties associated with the FHIR data store, including the data store ID, data store ARN, data store * name, data store status, when the data store was created, data store type version, and the data store's endpoint. *
* * @param describeFHIRDatastoreRequest * @return Result of the DescribeFHIRDatastore operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.DescribeFHIRDatastore * @see AWS API Documentation */ @Override public DescribeFHIRDatastoreResult describeFHIRDatastore(DescribeFHIRDatastoreRequest request) { request = beforeClientExecution(request); return executeDescribeFHIRDatastore(request); } @SdkInternalApi final DescribeFHIRDatastoreResult executeDescribeFHIRDatastore(DescribeFHIRDatastoreRequest describeFHIRDatastoreRequest) { ExecutionContext executionContext = createExecutionContext(describeFHIRDatastoreRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Displays the properties of a FHIR export job, including the ID, ARN, name, and the status of the job. *
* * @param describeFHIRExportJobRequest * @return Result of the DescribeFHIRExportJob operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.DescribeFHIRExportJob * @see AWS API Documentation */ @Override public DescribeFHIRExportJobResult describeFHIRExportJob(DescribeFHIRExportJobRequest request) { request = beforeClientExecution(request); return executeDescribeFHIRExportJob(request); } @SdkInternalApi final DescribeFHIRExportJobResult executeDescribeFHIRExportJob(DescribeFHIRExportJobRequest describeFHIRExportJobRequest) { ExecutionContext executionContext = createExecutionContext(describeFHIRExportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Displays the properties of a FHIR import job, including the ID, ARN, name, and the status of the job. *
* * @param describeFHIRImportJobRequest * @return Result of the DescribeFHIRImportJob operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.DescribeFHIRImportJob * @see AWS API Documentation */ @Override public DescribeFHIRImportJobResult describeFHIRImportJob(DescribeFHIRImportJobRequest request) { request = beforeClientExecution(request); return executeDescribeFHIRImportJob(request); } @SdkInternalApi final DescribeFHIRImportJobResult executeDescribeFHIRImportJob(DescribeFHIRImportJobRequest describeFHIRImportJobRequest) { ExecutionContext executionContext = createExecutionContext(describeFHIRImportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists all FHIR data stores that are in the user’s account, regardless of data store status. *
* * @param listFHIRDatastoresRequest * @return Result of the ListFHIRDatastores operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.ListFHIRDatastores * @see AWS * API Documentation */ @Override public ListFHIRDatastoresResult listFHIRDatastores(ListFHIRDatastoresRequest request) { request = beforeClientExecution(request); return executeListFHIRDatastores(request); } @SdkInternalApi final ListFHIRDatastoresResult executeListFHIRDatastores(ListFHIRDatastoresRequest listFHIRDatastoresRequest) { ExecutionContext executionContext = createExecutionContext(listFHIRDatastoresRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists all FHIR export jobs associated with an account and their statuses. *
* * @param listFHIRExportJobsRequest * @return Result of the ListFHIRExportJobs operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.ListFHIRExportJobs * @see AWS * API Documentation */ @Override public ListFHIRExportJobsResult listFHIRExportJobs(ListFHIRExportJobsRequest request) { request = beforeClientExecution(request); return executeListFHIRExportJobs(request); } @SdkInternalApi final ListFHIRExportJobsResult executeListFHIRExportJobs(ListFHIRExportJobsRequest listFHIRExportJobsRequest) { ExecutionContext executionContext = createExecutionContext(listFHIRExportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists all FHIR import jobs associated with an account and their statuses. *
* * @param listFHIRImportJobsRequest * @return Result of the ListFHIRImportJobs operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.ListFHIRImportJobs * @see AWS * API Documentation */ @Override public ListFHIRImportJobsResult listFHIRImportJobs(ListFHIRImportJobsRequest request) { request = beforeClientExecution(request); return executeListFHIRImportJobs(request); } @SdkInternalApi final ListFHIRImportJobsResult executeListFHIRImportJobs(ListFHIRImportJobsRequest listFHIRImportJobsRequest) { ExecutionContext executionContext = createExecutionContext(listFHIRImportJobsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Returns a list of all existing tags associated with a data store. *
* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @sample AmazonHealthLake.ListTagsForResource * @see AWS * API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Begins a FHIR export job. *
* * @param startFHIRExportJobRequest * @return Result of the StartFHIRExportJob operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws ResourceNotFoundException * The requested data store was not found. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.StartFHIRExportJob * @see AWS * API Documentation */ @Override public StartFHIRExportJobResult startFHIRExportJob(StartFHIRExportJobRequest request) { request = beforeClientExecution(request); return executeStartFHIRExportJob(request); } @SdkInternalApi final StartFHIRExportJobResult executeStartFHIRExportJob(StartFHIRExportJobRequest startFHIRExportJobRequest) { ExecutionContext executionContext = createExecutionContext(startFHIRExportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Begins a FHIR Import job. *
* * @param startFHIRImportJobRequest * @return Result of the StartFHIRImportJob operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ThrottlingException * The user has exceeded their maximum number of allowed calls to the given API. * @throws AccessDeniedException * Access is denied. Your account is not authorized to perform this operation. * @throws ResourceNotFoundException * The requested data store was not found. * @throws InternalServerException * Unknown error occurs in the service. * @sample AmazonHealthLake.StartFHIRImportJob * @see AWS * API Documentation */ @Override public StartFHIRImportJobResult startFHIRImportJob(StartFHIRImportJobRequest request) { request = beforeClientExecution(request); return executeStartFHIRImportJob(request); } @SdkInternalApi final StartFHIRImportJobResult executeStartFHIRImportJob(StartFHIRImportJobRequest startFHIRImportJobRequest) { ExecutionContext executionContext = createExecutionContext(startFHIRImportJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Adds a user specified key and value tag to a data store. *
* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @sample AmazonHealthLake.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Removes tags from a data store. *
* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ValidationException * The user input parameter was invalid. * @throws ResourceNotFoundException * The requested data store was not found. * @sample AmazonHealthLake.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private