
software.amazon.awssdk.services.cleanrooms.DefaultCleanRoomsAsyncClient Maven / Gradle / Ivy
/*
* 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.cleanrooms;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
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.retries.api.RetryStrategy;
import software.amazon.awssdk.services.cleanrooms.internal.CleanRoomsServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.cleanrooms.model.AccessDeniedException;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetCollaborationAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetCollaborationAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetSchemaAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetSchemaAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetSchemaRequest;
import software.amazon.awssdk.services.cleanrooms.model.BatchGetSchemaResponse;
import software.amazon.awssdk.services.cleanrooms.model.CleanRoomsException;
import software.amazon.awssdk.services.cleanrooms.model.ConflictException;
import software.amazon.awssdk.services.cleanrooms.model.CreateAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateCollaborationRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateCollaborationResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredAudienceModelAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredAudienceModelAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAssociationAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAssociationAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateConfiguredTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateIdMappingTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateIdMappingTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateIdNamespaceAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateIdNamespaceAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreateMembershipRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreateMembershipResponse;
import software.amazon.awssdk.services.cleanrooms.model.CreatePrivacyBudgetTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.CreatePrivacyBudgetTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteCollaborationRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteCollaborationResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredAudienceModelAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredAudienceModelAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAssociationAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAssociationAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteConfiguredTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteIdMappingTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteIdMappingTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteIdNamespaceAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteIdNamespaceAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteMemberRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteMemberResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeleteMembershipRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeleteMembershipResponse;
import software.amazon.awssdk.services.cleanrooms.model.DeletePrivacyBudgetTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.DeletePrivacyBudgetTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationConfiguredAudienceModelAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationConfiguredAudienceModelAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationIdNamespaceAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationIdNamespaceAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationPrivacyBudgetTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationPrivacyBudgetTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetCollaborationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredAudienceModelAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredAudienceModelAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAssociationAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAssociationAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetConfiguredTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetIdMappingTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetIdMappingTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetIdNamespaceAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetIdNamespaceAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetMembershipRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetMembershipResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetPrivacyBudgetTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetPrivacyBudgetTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetProtectedQueryRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetProtectedQueryResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetSchemaAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetSchemaAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.GetSchemaRequest;
import software.amazon.awssdk.services.cleanrooms.model.GetSchemaResponse;
import software.amazon.awssdk.services.cleanrooms.model.InternalServerException;
import software.amazon.awssdk.services.cleanrooms.model.ListAnalysisTemplatesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListAnalysisTemplatesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationAnalysisTemplatesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationAnalysisTemplatesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationConfiguredAudienceModelAssociationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationConfiguredAudienceModelAssociationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationIdNamespaceAssociationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationIdNamespaceAssociationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationPrivacyBudgetTemplatesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationPrivacyBudgetTemplatesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationPrivacyBudgetsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationPrivacyBudgetsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListCollaborationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredAudienceModelAssociationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredAudienceModelAssociationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredTableAssociationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredTableAssociationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredTablesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListConfiguredTablesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListIdMappingTablesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListIdMappingTablesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListIdNamespaceAssociationsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListIdNamespaceAssociationsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListMembersRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListMembersResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListMembershipsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListMembershipsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListPrivacyBudgetTemplatesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListPrivacyBudgetTemplatesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListPrivacyBudgetsRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListPrivacyBudgetsResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListProtectedQueriesRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListProtectedQueriesResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListSchemasRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListSchemasResponse;
import software.amazon.awssdk.services.cleanrooms.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.cleanrooms.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.cleanrooms.model.PopulateIdMappingTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.PopulateIdMappingTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.PreviewPrivacyImpactRequest;
import software.amazon.awssdk.services.cleanrooms.model.PreviewPrivacyImpactResponse;
import software.amazon.awssdk.services.cleanrooms.model.ResourceNotFoundException;
import software.amazon.awssdk.services.cleanrooms.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.cleanrooms.model.StartProtectedQueryRequest;
import software.amazon.awssdk.services.cleanrooms.model.StartProtectedQueryResponse;
import software.amazon.awssdk.services.cleanrooms.model.TagResourceRequest;
import software.amazon.awssdk.services.cleanrooms.model.TagResourceResponse;
import software.amazon.awssdk.services.cleanrooms.model.ThrottlingException;
import software.amazon.awssdk.services.cleanrooms.model.UntagResourceRequest;
import software.amazon.awssdk.services.cleanrooms.model.UntagResourceResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateAnalysisTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateAnalysisTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateCollaborationRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateCollaborationResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredAudienceModelAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredAudienceModelAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAssociationAnalysisRuleRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAssociationAnalysisRuleResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateConfiguredTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateIdMappingTableRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateIdMappingTableResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateIdNamespaceAssociationRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateIdNamespaceAssociationResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateMembershipRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateMembershipResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdatePrivacyBudgetTemplateRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdatePrivacyBudgetTemplateResponse;
import software.amazon.awssdk.services.cleanrooms.model.UpdateProtectedQueryRequest;
import software.amazon.awssdk.services.cleanrooms.model.UpdateProtectedQueryResponse;
import software.amazon.awssdk.services.cleanrooms.model.ValidationException;
import software.amazon.awssdk.services.cleanrooms.transform.BatchGetCollaborationAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.BatchGetSchemaAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.BatchGetSchemaRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateCollaborationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateConfiguredAudienceModelAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateConfiguredTableAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateConfiguredTableAssociationAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateConfiguredTableAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateConfiguredTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateIdMappingTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateIdNamespaceAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreateMembershipRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.CreatePrivacyBudgetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteCollaborationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteConfiguredAudienceModelAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteConfiguredTableAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteConfiguredTableAssociationAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteConfiguredTableAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteConfiguredTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteIdMappingTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteIdNamespaceAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteMemberRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeleteMembershipRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.DeletePrivacyBudgetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetCollaborationAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetCollaborationConfiguredAudienceModelAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetCollaborationIdNamespaceAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetCollaborationPrivacyBudgetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetCollaborationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetConfiguredAudienceModelAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetConfiguredTableAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetConfiguredTableAssociationAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetConfiguredTableAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetConfiguredTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetIdMappingTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetIdNamespaceAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetMembershipRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetPrivacyBudgetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetProtectedQueryRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetSchemaAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.GetSchemaRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListAnalysisTemplatesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationAnalysisTemplatesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationConfiguredAudienceModelAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationIdNamespaceAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationPrivacyBudgetTemplatesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationPrivacyBudgetsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListCollaborationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListConfiguredAudienceModelAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListConfiguredTableAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListConfiguredTablesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListIdMappingTablesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListIdNamespaceAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListMembersRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListMembershipsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListPrivacyBudgetTemplatesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListPrivacyBudgetsRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListProtectedQueriesRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListSchemasRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.PopulateIdMappingTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.PreviewPrivacyImpactRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.StartProtectedQueryRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateAnalysisTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateCollaborationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateConfiguredAudienceModelAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateConfiguredTableAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateConfiguredTableAssociationAnalysisRuleRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateConfiguredTableAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateConfiguredTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateIdMappingTableRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateIdNamespaceAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateMembershipRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdatePrivacyBudgetTemplateRequestMarshaller;
import software.amazon.awssdk.services.cleanrooms.transform.UpdateProtectedQueryRequestMarshaller;
import software.amazon.awssdk.utils.CompletableFutureUtils;
/**
* Internal implementation of {@link CleanRoomsAsyncClient}.
*
* @see CleanRoomsAsyncClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultCleanRoomsAsyncClient implements CleanRoomsAsyncClient {
private static final Logger log = LoggerFactory.getLogger(DefaultCleanRoomsAsyncClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.REST_JSON).build();
private final AsyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultCleanRoomsAsyncClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Retrieves multiple analysis templates within a collaboration by their Amazon Resource Names (ARNs).
*
*
* @param batchGetCollaborationAnalysisTemplateRequest
* @return A Java Future containing the result of the BatchGetCollaborationAnalysisTemplate operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.BatchGetCollaborationAnalysisTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture batchGetCollaborationAnalysisTemplate(
BatchGetCollaborationAnalysisTemplateRequest batchGetCollaborationAnalysisTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetCollaborationAnalysisTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
batchGetCollaborationAnalysisTemplateRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetCollaborationAnalysisTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, BatchGetCollaborationAnalysisTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchGetCollaborationAnalysisTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new BatchGetCollaborationAnalysisTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(batchGetCollaborationAnalysisTemplateRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves multiple schemas by their identifiers.
*
*
* @param batchGetSchemaRequest
* @return A Java Future containing the result of the BatchGetSchema operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.BatchGetSchema
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture batchGetSchema(BatchGetSchemaRequest batchGetSchemaRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetSchemaRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetSchemaRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetSchema");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, BatchGetSchemaResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchGetSchema").withProtocolMetadata(protocolMetadata)
.withMarshaller(new BatchGetSchemaRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(batchGetSchemaRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves multiple analysis rule schemas.
*
*
* @param batchGetSchemaAnalysisRuleRequest
* @return A Java Future containing the result of the BatchGetSchemaAnalysisRule operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.BatchGetSchemaAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture batchGetSchemaAnalysisRule(
BatchGetSchemaAnalysisRuleRequest batchGetSchemaAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(batchGetSchemaAnalysisRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, batchGetSchemaAnalysisRuleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "BatchGetSchemaAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, BatchGetSchemaAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("BatchGetSchemaAnalysisRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new BatchGetSchemaAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(batchGetSchemaAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new analysis template.
*
*
* @param createAnalysisTemplateRequest
* @return A Java Future containing the result of the CreateAnalysisTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateAnalysisTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture createAnalysisTemplate(
CreateAnalysisTemplateRequest createAnalysisTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAnalysisTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createAnalysisTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAnalysisTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateAnalysisTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateAnalysisTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateAnalysisTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createAnalysisTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new collaboration.
*
*
* @param createCollaborationRequest
* @return A Java Future containing the result of the CreateCollaboration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateCollaboration
* @see AWS API Documentation
*/
@Override
public CompletableFuture createCollaboration(
CreateCollaborationRequest createCollaborationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createCollaborationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createCollaborationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateCollaboration");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateCollaborationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateCollaboration").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateCollaborationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createCollaborationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides the details necessary to create a configured audience model association.
*
*
* @param createConfiguredAudienceModelAssociationRequest
* @return A Java Future containing the result of the CreateConfiguredAudienceModelAssociation operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateConfiguredAudienceModelAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfiguredAudienceModelAssociation(
CreateConfiguredAudienceModelAssociationRequest createConfiguredAudienceModelAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
createConfiguredAudienceModelAssociationRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfiguredAudienceModelAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredAudienceModelAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CreateConfiguredAudienceModelAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfiguredAudienceModelAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateConfiguredAudienceModelAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createConfiguredAudienceModelAssociationRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new configured table resource.
*
*
* @param createConfiguredTableRequest
* @return A Java Future containing the result of the CreateConfiguredTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateConfiguredTable
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfiguredTable(
CreateConfiguredTableRequest createConfiguredTableRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfiguredTableRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfiguredTableRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredTable");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateConfiguredTableResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfiguredTable").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateConfiguredTableRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createConfiguredTableRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new analysis rule for a configured table. Currently, only one analysis rule can be created for a given
* configured table.
*
*
* @param createConfiguredTableAnalysisRuleRequest
* @return A Java Future containing the result of the CreateConfiguredTableAnalysisRule operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateConfiguredTableAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfiguredTableAnalysisRule(
CreateConfiguredTableAnalysisRuleRequest createConfiguredTableAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfiguredTableAnalysisRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfiguredTableAnalysisRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredTableAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CreateConfiguredTableAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfiguredTableAnalysisRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateConfiguredTableAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createConfiguredTableAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a configured table association. A configured table association links a configured table with a
* collaboration.
*
*
* @param createConfiguredTableAssociationRequest
* @return A Java Future containing the result of the CreateConfiguredTableAssociation operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateConfiguredTableAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfiguredTableAssociation(
CreateConfiguredTableAssociationRequest createConfiguredTableAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfiguredTableAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfiguredTableAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredTableAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CreateConfiguredTableAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfiguredTableAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateConfiguredTableAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createConfiguredTableAssociationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a new analysis rule for an associated configured table.
*
*
* @param createConfiguredTableAssociationAnalysisRuleRequest
* @return A Java Future containing the result of the CreateConfiguredTableAssociationAnalysisRule operation
* returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateConfiguredTableAssociationAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture createConfiguredTableAssociationAnalysisRule(
CreateConfiguredTableAssociationAnalysisRuleRequest createConfiguredTableAssociationAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
createConfiguredTableAssociationAnalysisRuleRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
createConfiguredTableAssociationAnalysisRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredTableAssociationAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, CreateConfiguredTableAssociationAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConfiguredTableAssociationAnalysisRule")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateConfiguredTableAssociationAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createConfiguredTableAssociationAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((
r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an ID mapping table.
*
*
* @param createIdMappingTableRequest
* @return A Java Future containing the result of the CreateIdMappingTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateIdMappingTable
* @see AWS API Documentation
*/
@Override
public CompletableFuture createIdMappingTable(
CreateIdMappingTableRequest createIdMappingTableRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createIdMappingTableRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createIdMappingTableRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateIdMappingTable");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateIdMappingTableResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateIdMappingTable").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateIdMappingTableRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createIdMappingTableRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates an ID namespace association.
*
*
* @param createIdNamespaceAssociationRequest
* @return A Java Future containing the result of the CreateIdNamespaceAssociation operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateIdNamespaceAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture createIdNamespaceAssociation(
CreateIdNamespaceAssociationRequest createIdNamespaceAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createIdNamespaceAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createIdNamespaceAssociationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateIdNamespaceAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateIdNamespaceAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateIdNamespaceAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateIdNamespaceAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createIdNamespaceAssociationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a membership for a specific collaboration identifier and joins the collaboration.
*
*
* @param createMembershipRequest
* @return A Java Future containing the result of the CreateMembership operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ServiceQuotaExceededException Request denied because service quota has been exceeded.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreateMembership
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture createMembership(CreateMembershipRequest createMembershipRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createMembershipRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createMembershipRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateMembership");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateMembershipResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateMembership").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreateMembershipRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createMembershipRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Creates a privacy budget template for a specified membership. Each membership can have only one privacy budget
* template, but it can be deleted and recreated. If you need to change the privacy budget template for a
* membership, use the UpdatePrivacyBudgetTemplate operation.
*
*
* @param createPrivacyBudgetTemplateRequest
* @return A Java Future containing the result of the CreatePrivacyBudgetTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.CreatePrivacyBudgetTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture createPrivacyBudgetTemplate(
CreatePrivacyBudgetTemplateRequest createPrivacyBudgetTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createPrivacyBudgetTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createPrivacyBudgetTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreatePrivacyBudgetTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreatePrivacyBudgetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreatePrivacyBudgetTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new CreatePrivacyBudgetTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(createPrivacyBudgetTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an analysis template.
*
*
* @param deleteAnalysisTemplateRequest
* @return A Java Future containing the result of the DeleteAnalysisTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteAnalysisTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteAnalysisTemplate(
DeleteAnalysisTemplateRequest deleteAnalysisTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAnalysisTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAnalysisTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAnalysisTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteAnalysisTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteAnalysisTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteAnalysisTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteAnalysisTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a collaboration. It can only be called by the collaboration owner.
*
*
* @param deleteCollaborationRequest
* @return A Java Future containing the result of the DeleteCollaboration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteCollaboration
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteCollaboration(
DeleteCollaborationRequest deleteCollaborationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteCollaborationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCollaborationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCollaboration");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteCollaborationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteCollaboration").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteCollaborationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteCollaborationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Provides the information necessary to delete a configured audience model association.
*
*
* @param deleteConfiguredAudienceModelAssociationRequest
* @return A Java Future containing the result of the DeleteConfiguredAudienceModelAssociation operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteConfiguredAudienceModelAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfiguredAudienceModelAssociation(
DeleteConfiguredAudienceModelAssociationRequest deleteConfiguredAudienceModelAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
deleteConfiguredAudienceModelAssociationRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfiguredAudienceModelAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredAudienceModelAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DeleteConfiguredAudienceModelAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfiguredAudienceModelAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfiguredAudienceModelAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfiguredAudienceModelAssociationRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a configured table.
*
*
* @param deleteConfiguredTableRequest
* @return A Java Future containing the result of the DeleteConfiguredTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteConfiguredTable
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfiguredTable(
DeleteConfiguredTableRequest deleteConfiguredTableRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredTableRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfiguredTableRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredTable");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConfiguredTableResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfiguredTable").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfiguredTableRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfiguredTableRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a configured table analysis rule.
*
*
* @param deleteConfiguredTableAnalysisRuleRequest
* @return A Java Future containing the result of the DeleteConfiguredTableAnalysisRule operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteConfiguredTableAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfiguredTableAnalysisRule(
DeleteConfiguredTableAnalysisRuleRequest deleteConfiguredTableAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredTableAnalysisRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfiguredTableAnalysisRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredTableAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DeleteConfiguredTableAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfiguredTableAnalysisRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfiguredTableAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfiguredTableAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a configured table association.
*
*
* @param deleteConfiguredTableAssociationRequest
* @return A Java Future containing the result of the DeleteConfiguredTableAssociation operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteConfiguredTableAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfiguredTableAssociation(
DeleteConfiguredTableAssociationRequest deleteConfiguredTableAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredTableAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfiguredTableAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredTableAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DeleteConfiguredTableAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfiguredTableAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfiguredTableAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfiguredTableAssociationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an analysis rule for a configured table association.
*
*
* @param deleteConfiguredTableAssociationAnalysisRuleRequest
* @return A Java Future containing the result of the DeleteConfiguredTableAssociationAnalysisRule operation
* returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteConfiguredTableAssociationAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteConfiguredTableAssociationAnalysisRule(
DeleteConfiguredTableAssociationAnalysisRuleRequest deleteConfiguredTableAssociationAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
deleteConfiguredTableAssociationAnalysisRuleRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
deleteConfiguredTableAssociationAnalysisRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredTableAssociationAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, DeleteConfiguredTableAssociationAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConfiguredTableAssociationAnalysisRule")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteConfiguredTableAssociationAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteConfiguredTableAssociationAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((
r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an ID mapping table.
*
*
* @param deleteIdMappingTableRequest
* @return A Java Future containing the result of the DeleteIdMappingTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteIdMappingTable
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteIdMappingTable(
DeleteIdMappingTableRequest deleteIdMappingTableRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteIdMappingTableRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIdMappingTableRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIdMappingTable");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteIdMappingTableResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteIdMappingTable").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteIdMappingTableRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteIdMappingTableRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes an ID namespace association.
*
*
* @param deleteIdNamespaceAssociationRequest
* @return A Java Future containing the result of the DeleteIdNamespaceAssociation operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteIdNamespaceAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture deleteIdNamespaceAssociation(
DeleteIdNamespaceAssociationRequest deleteIdNamespaceAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteIdNamespaceAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIdNamespaceAssociationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIdNamespaceAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteIdNamespaceAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteIdNamespaceAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteIdNamespaceAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteIdNamespaceAssociationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Removes the specified member from a collaboration. The removed member is placed in the Removed status and can't
* interact with the collaboration. The removed member's data is inaccessible to active members of the
* collaboration.
*
*
* @param deleteMemberRequest
* @return A Java Future containing the result of the DeleteMember operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteMember
* @see AWS API
* Documentation
*/
@Override
public CompletableFuture deleteMember(DeleteMemberRequest deleteMemberRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMemberRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMemberRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMember");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteMemberResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteMember").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteMemberRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteMemberRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a specified membership. All resources under a membership must be deleted.
*
*
* @param deleteMembershipRequest
* @return A Java Future containing the result of the DeleteMembership operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ConflictException Updating or deleting a resource can cause an inconsistent state.
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeleteMembership
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture deleteMembership(DeleteMembershipRequest deleteMembershipRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMembershipRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMembershipRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMembership");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteMembershipResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteMembership").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeleteMembershipRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deleteMembershipRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Deletes a privacy budget template for a specified membership.
*
*
* @param deletePrivacyBudgetTemplateRequest
* @return A Java Future containing the result of the DeletePrivacyBudgetTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.DeletePrivacyBudgetTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture deletePrivacyBudgetTemplate(
DeletePrivacyBudgetTemplateRequest deletePrivacyBudgetTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deletePrivacyBudgetTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deletePrivacyBudgetTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeletePrivacyBudgetTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeletePrivacyBudgetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeletePrivacyBudgetTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new DeletePrivacyBudgetTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(deletePrivacyBudgetTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves an analysis template.
*
*
* @param getAnalysisTemplateRequest
* @return A Java Future containing the result of the GetAnalysisTemplate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetAnalysisTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture getAnalysisTemplate(
GetAnalysisTemplateRequest getAnalysisTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAnalysisTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAnalysisTemplateRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAnalysisTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetAnalysisTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetAnalysisTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetAnalysisTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getAnalysisTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns metadata about a collaboration.
*
*
* @param getCollaborationRequest
* @return A Java Future containing the result of the GetCollaboration operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetCollaboration
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture getCollaboration(GetCollaborationRequest getCollaborationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getCollaborationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaboration");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetCollaborationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCollaboration").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetCollaborationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getCollaborationRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves an analysis template within a collaboration.
*
*
* @param getCollaborationAnalysisTemplateRequest
* @return A Java Future containing the result of the GetCollaborationAnalysisTemplate operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetCollaborationAnalysisTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture getCollaborationAnalysisTemplate(
GetCollaborationAnalysisTemplateRequest getCollaborationAnalysisTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationAnalysisTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCollaborationAnalysisTemplateRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationAnalysisTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetCollaborationAnalysisTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCollaborationAnalysisTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetCollaborationAnalysisTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getCollaborationAnalysisTemplateRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves a configured audience model association within a collaboration.
*
*
* @param getCollaborationConfiguredAudienceModelAssociationRequest
* @return A Java Future containing the result of the GetCollaborationConfiguredAudienceModelAssociation operation
* returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetCollaborationConfiguredAudienceModelAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture getCollaborationConfiguredAudienceModelAssociation(
GetCollaborationConfiguredAudienceModelAssociationRequest getCollaborationConfiguredAudienceModelAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(
getCollaborationConfiguredAudienceModelAssociationRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCollaborationConfiguredAudienceModelAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationConfiguredAudienceModelAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetCollaborationConfiguredAudienceModelAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCollaborationConfiguredAudienceModelAssociation")
.withProtocolMetadata(protocolMetadata)
.withMarshaller(
new GetCollaborationConfiguredAudienceModelAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getCollaborationConfiguredAudienceModelAssociationRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves an ID namespace association from a specific collaboration.
*
*
* @param getCollaborationIdNamespaceAssociationRequest
* @return A Java Future containing the result of the GetCollaborationIdNamespaceAssociation operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetCollaborationIdNamespaceAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture getCollaborationIdNamespaceAssociation(
GetCollaborationIdNamespaceAssociationRequest getCollaborationIdNamespaceAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationIdNamespaceAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCollaborationIdNamespaceAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationIdNamespaceAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetCollaborationIdNamespaceAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCollaborationIdNamespaceAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetCollaborationIdNamespaceAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getCollaborationIdNamespaceAssociationRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns details about a specified privacy budget template.
*
*
* @param getCollaborationPrivacyBudgetTemplateRequest
* @return A Java Future containing the result of the GetCollaborationPrivacyBudgetTemplate operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetCollaborationPrivacyBudgetTemplate
* @see AWS API Documentation
*/
@Override
public CompletableFuture getCollaborationPrivacyBudgetTemplate(
GetCollaborationPrivacyBudgetTemplateRequest getCollaborationPrivacyBudgetTemplateRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationPrivacyBudgetTemplateRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getCollaborationPrivacyBudgetTemplateRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationPrivacyBudgetTemplate");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetCollaborationPrivacyBudgetTemplateResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetCollaborationPrivacyBudgetTemplate").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetCollaborationPrivacyBudgetTemplateRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getCollaborationPrivacyBudgetTemplateRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Returns information about a configured audience model association.
*
*
* @param getConfiguredAudienceModelAssociationRequest
* @return A Java Future containing the result of the GetConfiguredAudienceModelAssociation operation returned by
* the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetConfiguredAudienceModelAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture getConfiguredAudienceModelAssociation(
GetConfiguredAudienceModelAssociationRequest getConfiguredAudienceModelAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredAudienceModelAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getConfiguredAudienceModelAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredAudienceModelAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, GetConfiguredAudienceModelAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetConfiguredAudienceModelAssociation").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetConfiguredAudienceModelAssociationRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getConfiguredAudienceModelAssociationRequest));
CompletableFuture whenCompleted = executeFuture
.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves a configured table.
*
*
* @param getConfiguredTableRequest
* @return A Java Future containing the result of the GetConfiguredTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetConfiguredTable
* @see AWS
* API Documentation
*/
@Override
public CompletableFuture getConfiguredTable(GetConfiguredTableRequest getConfiguredTableRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredTableRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getConfiguredTableRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredTable");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetConfiguredTableResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetConfiguredTable").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetConfiguredTableRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getConfiguredTableRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves a configured table analysis rule.
*
*
* @param getConfiguredTableAnalysisRuleRequest
* @return A Java Future containing the result of the GetConfiguredTableAnalysisRule operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetConfiguredTableAnalysisRule
* @see AWS API Documentation
*/
@Override
public CompletableFuture getConfiguredTableAnalysisRule(
GetConfiguredTableAnalysisRuleRequest getConfiguredTableAnalysisRuleRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredTableAnalysisRuleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getConfiguredTableAnalysisRuleRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredTableAnalysisRule");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetConfiguredTableAnalysisRuleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams()
.withOperationName("GetConfiguredTableAnalysisRule").withProtocolMetadata(protocolMetadata)
.withMarshaller(new GetConfiguredTableAnalysisRuleRequestMarshaller(protocolFactory))
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withMetricCollector(apiCallMetricCollector)
.withInput(getConfiguredTableAnalysisRuleRequest));
CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
});
executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);
return executeFuture;
} catch (Throwable t) {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
return CompletableFutureUtils.failedFuture(t);
}
}
/**
*
* Retrieves a configured table association.
*
*
* @param getConfiguredTableAssociationRequest
* @return A Java Future containing the result of the GetConfiguredTableAssociation operation returned by the
* service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions. The exception returned is wrapped with CompletionException, so you need to invoke
* {@link Throwable#getCause} to retrieve the underlying exception.
*
* - ResourceNotFoundException Request references a resource which does not exist.
* - InternalServerException Unexpected error during processing of request.
* - ValidationException The input fails to satisfy the specified constraints.
* - ThrottlingException Request was denied due to request throttling.
* - AccessDeniedException Caller does not have sufficient access to perform this action.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - CleanRoomsException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample CleanRoomsAsyncClient.GetConfiguredTableAssociation
* @see AWS API Documentation
*/
@Override
public CompletableFuture getConfiguredTableAssociation(
GetConfiguredTableAssociationRequest getConfiguredTableAssociationRequest) {
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredTableAssociationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
getConfiguredTableAssociationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRooms");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredTableAssociation");
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, GetConfiguredTableAssociationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
CompletableFuture executeFuture = clientHandler
.execute(new ClientExecutionParams