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

software.amazon.awssdk.services.cleanroomsml.DefaultCleanRoomsMlClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Clean Rooms ML module holds the client classes that are used for communicating with Clean Rooms ML.

There is a newer version: 2.29.19
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.cleanroomsml;

import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
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.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.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.cleanroomsml.internal.CleanRoomsMlServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.cleanroomsml.model.AccessDeniedException;
import software.amazon.awssdk.services.cleanroomsml.model.CancelTrainedModelInferenceJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CancelTrainedModelInferenceJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CancelTrainedModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CancelTrainedModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CleanRoomsMlException;
import software.amazon.awssdk.services.cleanroomsml.model.ConflictException;
import software.amazon.awssdk.services.cleanroomsml.model.CreateAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredModelAlgorithmAssociationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredModelAlgorithmAssociationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredModelAlgorithmRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateConfiguredModelAlgorithmResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateMlInputChannelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateMlInputChannelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateTrainedModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateTrainedModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.CreateTrainingDatasetRequest;
import software.amazon.awssdk.services.cleanroomsml.model.CreateTrainingDatasetResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteAudienceGenerationJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteAudienceGenerationJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredAudienceModelPolicyRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredAudienceModelPolicyResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredModelAlgorithmAssociationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredModelAlgorithmAssociationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredModelAlgorithmRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteConfiguredModelAlgorithmResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteMlConfigurationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteMlConfigurationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteMlInputChannelDataRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteMlInputChannelDataResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteTrainedModelOutputRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteTrainedModelOutputResponse;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteTrainingDatasetRequest;
import software.amazon.awssdk.services.cleanroomsml.model.DeleteTrainingDatasetResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetAudienceGenerationJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetAudienceGenerationJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationConfiguredModelAlgorithmAssociationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationConfiguredModelAlgorithmAssociationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationMlInputChannelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationMlInputChannelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationTrainedModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetCollaborationTrainedModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredAudienceModelPolicyRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredAudienceModelPolicyResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredModelAlgorithmAssociationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredModelAlgorithmAssociationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredModelAlgorithmRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetConfiguredModelAlgorithmResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetMlConfigurationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetMlConfigurationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetMlInputChannelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetMlInputChannelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainedModelInferenceJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainedModelInferenceJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainedModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainedModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainingDatasetRequest;
import software.amazon.awssdk.services.cleanroomsml.model.GetTrainingDatasetResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceExportJobsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceExportJobsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceGenerationJobsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceGenerationJobsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceModelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListAudienceModelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationConfiguredModelAlgorithmAssociationsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationConfiguredModelAlgorithmAssociationsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationMlInputChannelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationMlInputChannelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelExportJobsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelExportJobsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelInferenceJobsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelInferenceJobsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListCollaborationTrainedModelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredAudienceModelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredAudienceModelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredModelAlgorithmAssociationsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredModelAlgorithmAssociationsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredModelAlgorithmsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListConfiguredModelAlgorithmsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListMlInputChannelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListMlInputChannelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainedModelInferenceJobsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainedModelInferenceJobsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainedModelsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainedModelsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainingDatasetsRequest;
import software.amazon.awssdk.services.cleanroomsml.model.ListTrainingDatasetsResponse;
import software.amazon.awssdk.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyRequest;
import software.amazon.awssdk.services.cleanroomsml.model.PutConfiguredAudienceModelPolicyResponse;
import software.amazon.awssdk.services.cleanroomsml.model.PutMlConfigurationRequest;
import software.amazon.awssdk.services.cleanroomsml.model.PutMlConfigurationResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ResourceNotFoundException;
import software.amazon.awssdk.services.cleanroomsml.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.cleanroomsml.model.StartAudienceExportJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.StartAudienceExportJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.StartAudienceGenerationJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.StartAudienceGenerationJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.StartTrainedModelExportJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.StartTrainedModelExportJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.StartTrainedModelInferenceJobRequest;
import software.amazon.awssdk.services.cleanroomsml.model.StartTrainedModelInferenceJobResponse;
import software.amazon.awssdk.services.cleanroomsml.model.TagResourceRequest;
import software.amazon.awssdk.services.cleanroomsml.model.TagResourceResponse;
import software.amazon.awssdk.services.cleanroomsml.model.UntagResourceRequest;
import software.amazon.awssdk.services.cleanroomsml.model.UntagResourceResponse;
import software.amazon.awssdk.services.cleanroomsml.model.UpdateConfiguredAudienceModelRequest;
import software.amazon.awssdk.services.cleanroomsml.model.UpdateConfiguredAudienceModelResponse;
import software.amazon.awssdk.services.cleanroomsml.model.ValidationException;
import software.amazon.awssdk.services.cleanroomsml.transform.CancelTrainedModelInferenceJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CancelTrainedModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateConfiguredAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateConfiguredModelAlgorithmAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateConfiguredModelAlgorithmRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateMlInputChannelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateTrainedModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.CreateTrainingDatasetRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteAudienceGenerationJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteConfiguredAudienceModelPolicyRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteConfiguredAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteConfiguredModelAlgorithmAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteConfiguredModelAlgorithmRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteMlConfigurationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteMlInputChannelDataRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteTrainedModelOutputRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.DeleteTrainingDatasetRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetAudienceGenerationJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetCollaborationConfiguredModelAlgorithmAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetCollaborationMlInputChannelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetCollaborationTrainedModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetConfiguredAudienceModelPolicyRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetConfiguredAudienceModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetConfiguredModelAlgorithmAssociationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetConfiguredModelAlgorithmRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetMlConfigurationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetMlInputChannelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetTrainedModelInferenceJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetTrainedModelRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.GetTrainingDatasetRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListAudienceExportJobsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListAudienceGenerationJobsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListAudienceModelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListCollaborationConfiguredModelAlgorithmAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListCollaborationMlInputChannelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListCollaborationTrainedModelExportJobsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListCollaborationTrainedModelInferenceJobsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListCollaborationTrainedModelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListConfiguredAudienceModelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListConfiguredModelAlgorithmAssociationsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListConfiguredModelAlgorithmsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListMlInputChannelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListTrainedModelInferenceJobsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListTrainedModelsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.ListTrainingDatasetsRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.PutConfiguredAudienceModelPolicyRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.PutMlConfigurationRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.StartAudienceExportJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.StartAudienceGenerationJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.StartTrainedModelExportJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.StartTrainedModelInferenceJobRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.cleanroomsml.transform.UpdateConfiguredAudienceModelRequestMarshaller;
import software.amazon.awssdk.utils.Logger;

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

    private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
            .serviceProtocol(AwsServiceProtocol.REST_JSON).build();

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultCleanRoomsMlClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    /**
     * 

* Submits a request to cancel the trained model job. *

* * @param cancelTrainedModelRequest * @return Result of the CancelTrainedModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CancelTrainedModel * @see AWS API Documentation */ @Override public CancelTrainedModelResponse cancelTrainedModel(CancelTrainedModelRequest cancelTrainedModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CancelTrainedModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(cancelTrainedModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelTrainedModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelTrainedModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CancelTrainedModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(cancelTrainedModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CancelTrainedModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Submits a request to cancel a trained model inference job. *

* * @param cancelTrainedModelInferenceJobRequest * @return Result of the CancelTrainedModelInferenceJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CancelTrainedModelInferenceJob * @see AWS API Documentation */ @Override public CancelTrainedModelInferenceJobResponse cancelTrainedModelInferenceJob( CancelTrainedModelInferenceJobRequest cancelTrainedModelInferenceJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CancelTrainedModelInferenceJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(cancelTrainedModelInferenceJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelTrainedModelInferenceJobRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelTrainedModelInferenceJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CancelTrainedModelInferenceJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(cancelTrainedModelInferenceJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CancelTrainedModelInferenceJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Defines the information necessary to create an audience model. An audience model is a machine learning model that * Clean Rooms ML trains to measure similarity between users. Clean Rooms ML manages training and storing the * audience model. The audience model can be used in multiple calls to the StartAudienceGenerationJob API. *

* * @param createAudienceModelRequest * @return Result of the CreateAudienceModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateAudienceModel * @see AWS API Documentation */ @Override public CreateAudienceModelResponse createAudienceModel(CreateAudienceModelRequest createAudienceModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createAudienceModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAudienceModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Defines the information necessary to create a configured audience model. *

* * @param createConfiguredAudienceModelRequest * @return Result of the CreateConfiguredAudienceModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateConfiguredAudienceModel * @see AWS API Documentation */ @Override public CreateConfiguredAudienceModelResponse createConfiguredAudienceModel( CreateConfiguredAudienceModelRequest createConfiguredAudienceModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateConfiguredAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfiguredAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfiguredAudienceModelRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredAudienceModel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateConfiguredAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createConfiguredAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateConfiguredAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a configured model algorithm using a container image stored in an ECR repository. *

* * @param createConfiguredModelAlgorithmRequest * @return Result of the CreateConfiguredModelAlgorithm operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateConfiguredModelAlgorithm * @see AWS API Documentation */ @Override public CreateConfiguredModelAlgorithmResponse createConfiguredModelAlgorithm( CreateConfiguredModelAlgorithmRequest createConfiguredModelAlgorithmRequest) throws ConflictException, ValidationException, AccessDeniedException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateConfiguredModelAlgorithmResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConfiguredModelAlgorithmRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfiguredModelAlgorithmRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredModelAlgorithm"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateConfiguredModelAlgorithm").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createConfiguredModelAlgorithmRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateConfiguredModelAlgorithmRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Associates a configured model algorithm to a collaboration for use by any member of the collaboration. *

* * @param createConfiguredModelAlgorithmAssociationRequest * @return Result of the CreateConfiguredModelAlgorithmAssociation operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateConfiguredModelAlgorithmAssociation * @see AWS API Documentation */ @Override public CreateConfiguredModelAlgorithmAssociationResponse createConfiguredModelAlgorithmAssociation( CreateConfiguredModelAlgorithmAssociationRequest createConfiguredModelAlgorithmAssociationRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, CreateConfiguredModelAlgorithmAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( createConfiguredModelAlgorithmAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createConfiguredModelAlgorithmAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConfiguredModelAlgorithmAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateConfiguredModelAlgorithmAssociation") .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(createConfiguredModelAlgorithmAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateConfiguredModelAlgorithmAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides the information to create an ML input channel. An ML input channel is the result of a query that can be * used for ML modeling. *

* * @param createMlInputChannelRequest * @return Result of the CreateMLInputChannel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateMLInputChannel * @see AWS API Documentation */ @Override public CreateMlInputChannelResponse createMLInputChannel(CreateMlInputChannelRequest createMlInputChannelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateMlInputChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createMlInputChannelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createMlInputChannelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateMLInputChannel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateMLInputChannel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createMlInputChannelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateMlInputChannelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a trained model from an associated configured model algorithm using data from any member of the * collaboration. *

* * @param createTrainedModelRequest * @return Result of the CreateTrainedModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateTrainedModel * @see AWS API Documentation */ @Override public CreateTrainedModelResponse createTrainedModel(CreateTrainedModelRequest createTrainedModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateTrainedModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTrainedModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createTrainedModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTrainedModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateTrainedModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createTrainedModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateTrainedModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Defines the information necessary to create a training dataset. In Clean Rooms ML, the * TrainingDataset is metadata that points to a Glue table, which is read only during * AudienceModel creation. *

* * @param createTrainingDatasetRequest * @return Result of the CreateTrainingDataset operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.CreateTrainingDataset * @see AWS API Documentation */ @Override public CreateTrainingDatasetResponse createTrainingDataset(CreateTrainingDatasetRequest createTrainingDatasetRequest) throws ConflictException, ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateTrainingDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTrainingDatasetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, createTrainingDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTrainingDataset"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateTrainingDataset").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(createTrainingDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateTrainingDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified audience generation job, and removes all data associated with the job. *

* * @param deleteAudienceGenerationJobRequest * @return Result of the DeleteAudienceGenerationJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteAudienceGenerationJob * @see AWS API Documentation */ @Override public DeleteAudienceGenerationJobResponse deleteAudienceGenerationJob( DeleteAudienceGenerationJobRequest deleteAudienceGenerationJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteAudienceGenerationJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAudienceGenerationJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAudienceGenerationJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAudienceGenerationJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteAudienceGenerationJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteAudienceGenerationJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteAudienceGenerationJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Specifies an audience model that you want to delete. You can't delete an audience model if there are any * configured audience models that depend on the audience model. *

* * @param deleteAudienceModelRequest * @return Result of the DeleteAudienceModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteAudienceModel * @see AWS API Documentation */ @Override public DeleteAudienceModelResponse deleteAudienceModel(DeleteAudienceModelRequest deleteAudienceModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAudienceModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAudienceModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified configured audience model. You can't delete a configured audience model if there are any * lookalike models that use the configured audience model. If you delete a configured audience model, it will be * removed from any collaborations that it is associated to. *

* * @param deleteConfiguredAudienceModelRequest * @return Result of the DeleteConfiguredAudienceModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteConfiguredAudienceModel * @see AWS API Documentation */ @Override public DeleteConfiguredAudienceModelResponse deleteConfiguredAudienceModel( DeleteConfiguredAudienceModelRequest deleteConfiguredAudienceModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteConfiguredAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfiguredAudienceModelRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredAudienceModel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConfiguredAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteConfiguredAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteConfiguredAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the specified configured audience model policy. *

* * @param deleteConfiguredAudienceModelPolicyRequest * @return Result of the DeleteConfiguredAudienceModelPolicy operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteConfiguredAudienceModelPolicy * @see AWS API Documentation */ @Override public DeleteConfiguredAudienceModelPolicyResponse deleteConfiguredAudienceModelPolicy( DeleteConfiguredAudienceModelPolicyRequest deleteConfiguredAudienceModelPolicyRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteConfiguredAudienceModelPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredAudienceModelPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfiguredAudienceModelPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredAudienceModelPolicy"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConfiguredAudienceModelPolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteConfiguredAudienceModelPolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteConfiguredAudienceModelPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a configured model algorithm. *

* * @param deleteConfiguredModelAlgorithmRequest * @return Result of the DeleteConfiguredModelAlgorithm operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteConfiguredModelAlgorithm * @see AWS API Documentation */ @Override public DeleteConfiguredModelAlgorithmResponse deleteConfiguredModelAlgorithm( DeleteConfiguredModelAlgorithmRequest deleteConfiguredModelAlgorithmRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteConfiguredModelAlgorithmResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConfiguredModelAlgorithmRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfiguredModelAlgorithmRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredModelAlgorithm"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConfiguredModelAlgorithm").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteConfiguredModelAlgorithmRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteConfiguredModelAlgorithmRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a configured model algorithm association. *

* * @param deleteConfiguredModelAlgorithmAssociationRequest * @return Result of the DeleteConfiguredModelAlgorithmAssociation operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteConfiguredModelAlgorithmAssociation * @see AWS API Documentation */ @Override public DeleteConfiguredModelAlgorithmAssociationResponse deleteConfiguredModelAlgorithmAssociation( DeleteConfiguredModelAlgorithmAssociationRequest deleteConfiguredModelAlgorithmAssociationRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DeleteConfiguredModelAlgorithmAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( deleteConfiguredModelAlgorithmAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConfiguredModelAlgorithmAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConfiguredModelAlgorithmAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConfiguredModelAlgorithmAssociation") .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(deleteConfiguredModelAlgorithmAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteConfiguredModelAlgorithmAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a ML modeling configuration. *

* * @param deleteMlConfigurationRequest * @return Result of the DeleteMLConfiguration operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteMLConfiguration * @see AWS API Documentation */ @Override public DeleteMlConfigurationResponse deleteMLConfiguration(DeleteMlConfigurationRequest deleteMlConfigurationRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteMlConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMlConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMlConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMLConfiguration"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteMLConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteMlConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteMlConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides the information necessary to delete an ML input channel. *

* * @param deleteMlInputChannelDataRequest * @return Result of the DeleteMLInputChannelData operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteMLInputChannelData * @see AWS API Documentation */ @Override public DeleteMlInputChannelDataResponse deleteMLInputChannelData( DeleteMlInputChannelDataRequest deleteMlInputChannelDataRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteMlInputChannelDataResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteMlInputChannelDataRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteMlInputChannelDataRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteMLInputChannelData"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteMLInputChannelData").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteMlInputChannelDataRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteMlInputChannelDataRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the output of a trained model. *

* * @param deleteTrainedModelOutputRequest * @return Result of the DeleteTrainedModelOutput operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteTrainedModelOutput * @see AWS API Documentation */ @Override public DeleteTrainedModelOutputResponse deleteTrainedModelOutput( DeleteTrainedModelOutputRequest deleteTrainedModelOutputRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteTrainedModelOutputResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTrainedModelOutputRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTrainedModelOutputRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTrainedModelOutput"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteTrainedModelOutput").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteTrainedModelOutputRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteTrainedModelOutputRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Specifies a training dataset that you want to delete. You can't delete a training dataset if there are any * audience models that depend on the training dataset. In Clean Rooms ML, the TrainingDataset is * metadata that points to a Glue table, which is read only during AudienceModel creation. This action * deletes the metadata. *

* * @param deleteTrainingDatasetRequest * @return Result of the DeleteTrainingDataset operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.DeleteTrainingDataset * @see AWS API Documentation */ @Override public DeleteTrainingDatasetResponse deleteTrainingDataset(DeleteTrainingDatasetRequest deleteTrainingDatasetRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteTrainingDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTrainingDatasetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTrainingDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTrainingDataset"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteTrainingDataset").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(deleteTrainingDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteTrainingDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about an audience generation job. *

* * @param getAudienceGenerationJobRequest * @return Result of the GetAudienceGenerationJob operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetAudienceGenerationJob * @see AWS API Documentation */ @Override public GetAudienceGenerationJobResponse getAudienceGenerationJob( GetAudienceGenerationJobRequest getAudienceGenerationJobRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetAudienceGenerationJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAudienceGenerationJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAudienceGenerationJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAudienceGenerationJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetAudienceGenerationJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getAudienceGenerationJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetAudienceGenerationJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about an audience model *

* * @param getAudienceModelRequest * @return Result of the GetAudienceModel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetAudienceModel * @see AWS * API Documentation */ @Override public GetAudienceModelResponse getAudienceModel(GetAudienceModelRequest getAudienceModelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getAudienceModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAudienceModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about the configured model algorithm association in a collaboration. *

* * @param getCollaborationConfiguredModelAlgorithmAssociationRequest * @return Result of the GetCollaborationConfiguredModelAlgorithmAssociation operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetCollaborationConfiguredModelAlgorithmAssociation * @see AWS API Documentation */ @Override public GetCollaborationConfiguredModelAlgorithmAssociationResponse getCollaborationConfiguredModelAlgorithmAssociation( GetCollaborationConfiguredModelAlgorithmAssociationRequest getCollaborationConfiguredModelAlgorithmAssociationRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, GetCollaborationConfiguredModelAlgorithmAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( getCollaborationConfiguredModelAlgorithmAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCollaborationConfiguredModelAlgorithmAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationConfiguredModelAlgorithmAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCollaborationConfiguredModelAlgorithmAssociation") .withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(getCollaborationConfiguredModelAlgorithmAssociationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller( new GetCollaborationConfiguredModelAlgorithmAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a specific ML input channel in a collaboration. *

* * @param getCollaborationMlInputChannelRequest * @return Result of the GetCollaborationMLInputChannel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetCollaborationMLInputChannel * @see AWS API Documentation */ @Override public GetCollaborationMlInputChannelResponse getCollaborationMLInputChannel( GetCollaborationMlInputChannelRequest getCollaborationMlInputChannelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetCollaborationMlInputChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationMlInputChannelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCollaborationMlInputChannelRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationMLInputChannel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCollaborationMLInputChannel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getCollaborationMlInputChannelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetCollaborationMlInputChannelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a trained model in a collaboration. *

* * @param getCollaborationTrainedModelRequest * @return Result of the GetCollaborationTrainedModel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetCollaborationTrainedModel * @see AWS API Documentation */ @Override public GetCollaborationTrainedModelResponse getCollaborationTrainedModel( GetCollaborationTrainedModelRequest getCollaborationTrainedModelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetCollaborationTrainedModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getCollaborationTrainedModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getCollaborationTrainedModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetCollaborationTrainedModel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetCollaborationTrainedModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getCollaborationTrainedModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetCollaborationTrainedModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a specified configured audience model. *

* * @param getConfiguredAudienceModelRequest * @return Result of the GetConfiguredAudienceModel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetConfiguredAudienceModel * @see AWS API Documentation */ @Override public GetConfiguredAudienceModelResponse getConfiguredAudienceModel( GetConfiguredAudienceModelRequest getConfiguredAudienceModelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetConfiguredAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConfiguredAudienceModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredAudienceModel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConfiguredAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getConfiguredAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetConfiguredAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a configured audience model policy. *

* * @param getConfiguredAudienceModelPolicyRequest * @return Result of the GetConfiguredAudienceModelPolicy operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetConfiguredAudienceModelPolicy * @see AWS API Documentation */ @Override public GetConfiguredAudienceModelPolicyResponse getConfiguredAudienceModelPolicy( GetConfiguredAudienceModelPolicyRequest getConfiguredAudienceModelPolicyRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetConfiguredAudienceModelPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredAudienceModelPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConfiguredAudienceModelPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredAudienceModelPolicy"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConfiguredAudienceModelPolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getConfiguredAudienceModelPolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetConfiguredAudienceModelPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a configured model algorithm. *

* * @param getConfiguredModelAlgorithmRequest * @return Result of the GetConfiguredModelAlgorithm operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetConfiguredModelAlgorithm * @see AWS API Documentation */ @Override public GetConfiguredModelAlgorithmResponse getConfiguredModelAlgorithm( GetConfiguredModelAlgorithmRequest getConfiguredModelAlgorithmRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetConfiguredModelAlgorithmResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredModelAlgorithmRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConfiguredModelAlgorithmRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredModelAlgorithm"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConfiguredModelAlgorithm").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getConfiguredModelAlgorithmRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetConfiguredModelAlgorithmRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a configured model algorithm association. *

* * @param getConfiguredModelAlgorithmAssociationRequest * @return Result of the GetConfiguredModelAlgorithmAssociation operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetConfiguredModelAlgorithmAssociation * @see AWS API Documentation */ @Override public GetConfiguredModelAlgorithmAssociationResponse getConfiguredModelAlgorithmAssociation( GetConfiguredModelAlgorithmAssociationRequest getConfiguredModelAlgorithmAssociationRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, GetConfiguredModelAlgorithmAssociationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getConfiguredModelAlgorithmAssociationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getConfiguredModelAlgorithmAssociationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetConfiguredModelAlgorithmAssociation"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetConfiguredModelAlgorithmAssociation").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(getConfiguredModelAlgorithmAssociationRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetConfiguredModelAlgorithmAssociationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a specific ML configuration. *

* * @param getMlConfigurationRequest * @return Result of the GetMLConfiguration operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetMLConfiguration * @see AWS API Documentation */ @Override public GetMlConfigurationResponse getMLConfiguration(GetMlConfigurationRequest getMlConfigurationRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetMlConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMlConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMlConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMLConfiguration"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetMLConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getMlConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetMlConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about an ML input channel. *

* * @param getMlInputChannelRequest * @return Result of the GetMLInputChannel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetMLInputChannel * @see AWS API Documentation */ @Override public GetMlInputChannelResponse getMLInputChannel(GetMlInputChannelRequest getMlInputChannelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetMlInputChannelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getMlInputChannelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getMlInputChannelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetMLInputChannel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetMLInputChannel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getMlInputChannelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetMlInputChannelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a trained model. *

* * @param getTrainedModelRequest * @return Result of the GetTrainedModel operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetTrainedModel * @see AWS * API Documentation */ @Override public GetTrainedModelResponse getTrainedModel(GetTrainedModelRequest getTrainedModelRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetTrainedModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTrainedModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTrainedModelRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTrainedModel"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetTrainedModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getTrainedModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTrainedModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a trained model inference job. *

* * @param getTrainedModelInferenceJobRequest * @return Result of the GetTrainedModelInferenceJob operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetTrainedModelInferenceJob * @see AWS API Documentation */ @Override public GetTrainedModelInferenceJobResponse getTrainedModelInferenceJob( GetTrainedModelInferenceJobRequest getTrainedModelInferenceJobRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTrainedModelInferenceJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTrainedModelInferenceJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTrainedModelInferenceJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTrainedModelInferenceJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetTrainedModelInferenceJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getTrainedModelInferenceJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTrainedModelInferenceJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns information about a training dataset. *

* * @param getTrainingDatasetRequest * @return Result of the GetTrainingDataset operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.GetTrainingDataset * @see AWS API Documentation */ @Override public GetTrainingDatasetResponse getTrainingDataset(GetTrainingDatasetRequest getTrainingDatasetRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetTrainingDatasetResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getTrainingDatasetRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, getTrainingDatasetRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetTrainingDataset"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetTrainingDataset").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(getTrainingDatasetRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetTrainingDatasetRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the audience export jobs. *

* * @param listAudienceExportJobsRequest * @return Result of the ListAudienceExportJobs operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListAudienceExportJobs * @see AWS API Documentation */ @Override public ListAudienceExportJobsResponse listAudienceExportJobs(ListAudienceExportJobsRequest listAudienceExportJobsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAudienceExportJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAudienceExportJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAudienceExportJobsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAudienceExportJobs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAudienceExportJobs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listAudienceExportJobsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAudienceExportJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of audience generation jobs. *

* * @param listAudienceGenerationJobsRequest * @return Result of the ListAudienceGenerationJobs operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListAudienceGenerationJobs * @see AWS API Documentation */ @Override public ListAudienceGenerationJobsResponse listAudienceGenerationJobs( ListAudienceGenerationJobsRequest listAudienceGenerationJobsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAudienceGenerationJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAudienceGenerationJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAudienceGenerationJobsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAudienceGenerationJobs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListAudienceGenerationJobs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listAudienceGenerationJobsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAudienceGenerationJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of audience models. *

* * @param listAudienceModelsRequest * @return Result of the ListAudienceModels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListAudienceModels * @see AWS API Documentation */ @Override public ListAudienceModelsResponse listAudienceModels(ListAudienceModelsRequest listAudienceModelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListAudienceModelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAudienceModelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listAudienceModelsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAudienceModels"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListAudienceModels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listAudienceModelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListAudienceModelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the configured model algorithm associations in a collaboration. *

* * @param listCollaborationConfiguredModelAlgorithmAssociationsRequest * @return Result of the ListCollaborationConfiguredModelAlgorithmAssociations operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListCollaborationConfiguredModelAlgorithmAssociations * @see AWS API Documentation */ @Override public ListCollaborationConfiguredModelAlgorithmAssociationsResponse listCollaborationConfiguredModelAlgorithmAssociations( ListCollaborationConfiguredModelAlgorithmAssociationsRequest listCollaborationConfiguredModelAlgorithmAssociationsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListCollaborationConfiguredModelAlgorithmAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( listCollaborationConfiguredModelAlgorithmAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCollaborationConfiguredModelAlgorithmAssociationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCollaborationConfiguredModelAlgorithmAssociations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCollaborationConfiguredModelAlgorithmAssociations") .withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(listCollaborationConfiguredModelAlgorithmAssociationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller( new ListCollaborationConfiguredModelAlgorithmAssociationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the ML input channels in a collaboration. *

* * @param listCollaborationMlInputChannelsRequest * @return Result of the ListCollaborationMLInputChannels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListCollaborationMLInputChannels * @see AWS API Documentation */ @Override public ListCollaborationMlInputChannelsResponse listCollaborationMLInputChannels( ListCollaborationMlInputChannelsRequest listCollaborationMlInputChannelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCollaborationMlInputChannelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listCollaborationMlInputChannelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCollaborationMlInputChannelsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCollaborationMLInputChannels"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCollaborationMLInputChannels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listCollaborationMlInputChannelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCollaborationMlInputChannelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the export jobs for a trained model in a collaboration. *

* * @param listCollaborationTrainedModelExportJobsRequest * @return Result of the ListCollaborationTrainedModelExportJobs operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListCollaborationTrainedModelExportJobs * @see AWS API Documentation */ @Override public ListCollaborationTrainedModelExportJobsResponse listCollaborationTrainedModelExportJobs( ListCollaborationTrainedModelExportJobsRequest listCollaborationTrainedModelExportJobsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListCollaborationTrainedModelExportJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listCollaborationTrainedModelExportJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCollaborationTrainedModelExportJobsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCollaborationTrainedModelExportJobs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCollaborationTrainedModelExportJobs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(listCollaborationTrainedModelExportJobsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCollaborationTrainedModelExportJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of trained model inference jobs in a specified collaboration. *

* * @param listCollaborationTrainedModelInferenceJobsRequest * @return Result of the ListCollaborationTrainedModelInferenceJobs operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListCollaborationTrainedModelInferenceJobs * @see AWS API Documentation */ @Override public ListCollaborationTrainedModelInferenceJobsResponse listCollaborationTrainedModelInferenceJobs( ListCollaborationTrainedModelInferenceJobsRequest listCollaborationTrainedModelInferenceJobsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListCollaborationTrainedModelInferenceJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( listCollaborationTrainedModelInferenceJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCollaborationTrainedModelInferenceJobsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCollaborationTrainedModelInferenceJobs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCollaborationTrainedModelInferenceJobs") .withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(listCollaborationTrainedModelInferenceJobsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCollaborationTrainedModelInferenceJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the trained models in a collaboration. *

* * @param listCollaborationTrainedModelsRequest * @return Result of the ListCollaborationTrainedModels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListCollaborationTrainedModels * @see AWS API Documentation */ @Override public ListCollaborationTrainedModelsResponse listCollaborationTrainedModels( ListCollaborationTrainedModelsRequest listCollaborationTrainedModelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListCollaborationTrainedModelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listCollaborationTrainedModelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listCollaborationTrainedModelsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListCollaborationTrainedModels"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListCollaborationTrainedModels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listCollaborationTrainedModelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListCollaborationTrainedModelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of the configured audience models. *

* * @param listConfiguredAudienceModelsRequest * @return Result of the ListConfiguredAudienceModels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListConfiguredAudienceModels * @see AWS API Documentation */ @Override public ListConfiguredAudienceModelsResponse listConfiguredAudienceModels( ListConfiguredAudienceModelsRequest listConfiguredAudienceModelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListConfiguredAudienceModelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listConfiguredAudienceModelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listConfiguredAudienceModelsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListConfiguredAudienceModels"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListConfiguredAudienceModels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listConfiguredAudienceModelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListConfiguredAudienceModelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of configured model algorithm associations. *

* * @param listConfiguredModelAlgorithmAssociationsRequest * @return Result of the ListConfiguredModelAlgorithmAssociations operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListConfiguredModelAlgorithmAssociations * @see AWS API Documentation */ @Override public ListConfiguredModelAlgorithmAssociationsResponse listConfiguredModelAlgorithmAssociations( ListConfiguredModelAlgorithmAssociationsRequest listConfiguredModelAlgorithmAssociationsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, ListConfiguredModelAlgorithmAssociationsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration( listConfiguredModelAlgorithmAssociationsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listConfiguredModelAlgorithmAssociationsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListConfiguredModelAlgorithmAssociations"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListConfiguredModelAlgorithmAssociations").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration) .withInput(listConfiguredModelAlgorithmAssociationsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListConfiguredModelAlgorithmAssociationsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of configured model algorithms. *

* * @param listConfiguredModelAlgorithmsRequest * @return Result of the ListConfiguredModelAlgorithms operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListConfiguredModelAlgorithms * @see AWS API Documentation */ @Override public ListConfiguredModelAlgorithmsResponse listConfiguredModelAlgorithms( ListConfiguredModelAlgorithmsRequest listConfiguredModelAlgorithmsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListConfiguredModelAlgorithmsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listConfiguredModelAlgorithmsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listConfiguredModelAlgorithmsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListConfiguredModelAlgorithms"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListConfiguredModelAlgorithms").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listConfiguredModelAlgorithmsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListConfiguredModelAlgorithmsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of ML input channels. *

* * @param listMlInputChannelsRequest * @return Result of the ListMLInputChannels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListMLInputChannels * @see AWS API Documentation */ @Override public ListMlInputChannelsResponse listMLInputChannels(ListMlInputChannelsRequest listMlInputChannelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListMlInputChannelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listMlInputChannelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listMlInputChannelsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListMLInputChannels"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListMLInputChannels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listMlInputChannelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListMlInputChannelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of tags for a provided resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTagsForResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTagsForResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of trained model inference jobs that match the request parameters. *

* * @param listTrainedModelInferenceJobsRequest * @return Result of the ListTrainedModelInferenceJobs operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListTrainedModelInferenceJobs * @see AWS API Documentation */ @Override public ListTrainedModelInferenceJobsResponse listTrainedModelInferenceJobs( ListTrainedModelInferenceJobsRequest listTrainedModelInferenceJobsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTrainedModelInferenceJobsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTrainedModelInferenceJobsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTrainedModelInferenceJobsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTrainedModelInferenceJobs"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTrainedModelInferenceJobs").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTrainedModelInferenceJobsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTrainedModelInferenceJobsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of trained models. *

* * @param listTrainedModelsRequest * @return Result of the ListTrainedModels operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListTrainedModels * @see AWS API Documentation */ @Override public ListTrainedModelsResponse listTrainedModels(ListTrainedModelsRequest listTrainedModelsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListTrainedModelsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTrainedModelsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTrainedModelsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTrainedModels"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTrainedModels").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTrainedModelsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTrainedModelsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Returns a list of training datasets. *

* * @param listTrainingDatasetsRequest * @return Result of the ListTrainingDatasets operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.ListTrainingDatasets * @see AWS API Documentation */ @Override public ListTrainingDatasetsResponse listTrainingDatasets(ListTrainingDatasetsRequest listTrainingDatasetsRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTrainingDatasetsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listTrainingDatasetsRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTrainingDatasetsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTrainingDatasets"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTrainingDatasets").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(listTrainingDatasetsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTrainingDatasetsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Create or update the resource policy for a configured audience model. *

* * @param putConfiguredAudienceModelPolicyRequest * @return Result of the PutConfiguredAudienceModelPolicy operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.PutConfiguredAudienceModelPolicy * @see AWS API Documentation */ @Override public PutConfiguredAudienceModelPolicyResponse putConfiguredAudienceModelPolicy( PutConfiguredAudienceModelPolicyRequest putConfiguredAudienceModelPolicyRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutConfiguredAudienceModelPolicyResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putConfiguredAudienceModelPolicyRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putConfiguredAudienceModelPolicyRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutConfiguredAudienceModelPolicy"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("PutConfiguredAudienceModelPolicy").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(putConfiguredAudienceModelPolicyRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutConfiguredAudienceModelPolicyRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Assigns information about an ML configuration. *

* * @param putMlConfigurationRequest * @return Result of the PutMLConfiguration operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.PutMLConfiguration * @see AWS API Documentation */ @Override public PutMlConfigurationResponse putMLConfiguration(PutMlConfigurationRequest putMlConfigurationRequest) throws ValidationException, AccessDeniedException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutMlConfigurationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(putMlConfigurationRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, putMlConfigurationRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutMLConfiguration"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("PutMLConfiguration").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(putMlConfigurationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutMlConfigurationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Export an audience of a specified size after you have generated an audience. *

* * @param startAudienceExportJobRequest * @return Result of the StartAudienceExportJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.StartAudienceExportJob * @see AWS API Documentation */ @Override public StartAudienceExportJobResponse startAudienceExportJob(StartAudienceExportJobRequest startAudienceExportJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartAudienceExportJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startAudienceExportJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startAudienceExportJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartAudienceExportJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartAudienceExportJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startAudienceExportJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartAudienceExportJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Information necessary to start the audience generation job. *

* * @param startAudienceGenerationJobRequest * @return Result of the StartAudienceGenerationJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.StartAudienceGenerationJob * @see AWS API Documentation */ @Override public StartAudienceGenerationJobResponse startAudienceGenerationJob( StartAudienceGenerationJobRequest startAudienceGenerationJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartAudienceGenerationJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startAudienceGenerationJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startAudienceGenerationJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartAudienceGenerationJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartAudienceGenerationJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startAudienceGenerationJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartAudienceGenerationJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides the information necessary to start a trained model export job. *

* * @param startTrainedModelExportJobRequest * @return Result of the StartTrainedModelExportJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.StartTrainedModelExportJob * @see AWS API Documentation */ @Override public StartTrainedModelExportJobResponse startTrainedModelExportJob( StartTrainedModelExportJobRequest startTrainedModelExportJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartTrainedModelExportJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startTrainedModelExportJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startTrainedModelExportJobRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartTrainedModelExportJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartTrainedModelExportJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startTrainedModelExportJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartTrainedModelExportJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Defines the information necessary to begin a trained model inference job. *

* * @param startTrainedModelInferenceJobRequest * @return Result of the StartTrainedModelInferenceJob operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws ServiceQuotaExceededException * You have exceeded your service quota. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.StartTrainedModelInferenceJob * @see AWS API Documentation */ @Override public StartTrainedModelInferenceJobResponse startTrainedModelInferenceJob( StartTrainedModelInferenceJobRequest startTrainedModelInferenceJobRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartTrainedModelInferenceJobResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(startTrainedModelInferenceJobRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, startTrainedModelInferenceJobRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartTrainedModelInferenceJob"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartTrainedModelInferenceJob").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(startTrainedModelInferenceJobRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartTrainedModelInferenceJobRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Adds metadata tags to a specified resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.TagResource * @see AWS API * Documentation */ @Override public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(tagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TagResource").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration) .withInput(tagResourceRequest).withMetricCollector(apiCallMetricCollector) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Removes metadata tags from a specified resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.UntagResource * @see AWS * API Documentation */ @Override public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(untagResourceRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UntagResource").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(untagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Provides the information necessary to update a configured audience model. Updates that impact audience generation * jobs take effect when a new job starts, but do not impact currently running jobs. *

* * @param updateConfiguredAudienceModelRequest * @return Result of the UpdateConfiguredAudienceModel operation returned by the service. * @throws ConflictException * You can't complete this action because another resource depends on this resource. * @throws ValidationException * The request parameters for this request are incorrect. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @throws ResourceNotFoundException * The resource you are requesting does not exist. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws CleanRoomsMlException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample CleanRoomsMlClient.UpdateConfiguredAudienceModel * @see AWS API Documentation */ @Override public UpdateConfiguredAudienceModelResponse updateConfiguredAudienceModel( UpdateConfiguredAudienceModelRequest updateConfiguredAudienceModelRequest) throws ConflictException, ValidationException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, CleanRoomsMlException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateConfiguredAudienceModelResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(updateConfiguredAudienceModelRequest, this.clientConfiguration); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateConfiguredAudienceModelRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "CleanRoomsML"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateConfiguredAudienceModel"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateConfiguredAudienceModel").withProtocolMetadata(protocolMetadata) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withRequestConfiguration(clientConfiguration).withInput(updateConfiguredAudienceModelRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateConfiguredAudienceModelRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } @Override public final String serviceName() { return SERVICE_NAME; } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private void updateRetryStrategyClientConfiguration(SdkClientConfiguration.Builder configuration) { ClientOverrideConfiguration.Builder builder = configuration.asOverrideConfigurationBuilder(); RetryMode retryMode = builder.retryMode(); if (retryMode != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, AwsRetryStrategy.forRetryMode(retryMode)); } else { Consumer> configurator = builder.retryStrategyConfigurator(); if (configurator != null) { RetryStrategy.Builder defaultBuilder = AwsRetryStrategy.defaultRetryStrategy().toBuilder(); configurator.accept(defaultBuilder); configuration.option(SdkClientOption.RETRY_STRATEGY, defaultBuilder.build()); } else { RetryStrategy retryStrategy = builder.retryStrategy(); if (retryStrategy != null) { configuration.option(SdkClientOption.RETRY_STRATEGY, retryStrategy); } } } configuration.option(SdkClientOption.CONFIGURED_RETRY_MODE, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_STRATEGY, null); configuration.option(SdkClientOption.CONFIGURED_RETRY_CONFIGURATOR, null); } private SdkClientConfiguration updateSdkClientConfiguration(SdkRequest request, SdkClientConfiguration clientConfiguration) { List plugins = request.overrideConfiguration().map(c -> c.plugins()).orElse(Collections.emptyList()); SdkClientConfiguration.Builder configuration = clientConfiguration.toBuilder(); if (plugins.isEmpty()) { return configuration.build(); } CleanRoomsMlServiceClientConfigurationBuilder serviceConfigBuilder = new CleanRoomsMlServiceClientConfigurationBuilder( configuration); for (SdkPlugin plugin : plugins) { plugin.configureClient(serviceConfigBuilder); } updateRetryStrategyClientConfiguration(configuration); return configuration.build(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(CleanRoomsMlException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceQuotaExceededException") .exceptionBuilderSupplier(ServiceQuotaExceededException::builder).httpStatusCode(402).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build()); } @Override public final CleanRoomsMlServiceClientConfiguration serviceClientConfiguration() { return new CleanRoomsMlServiceClientConfigurationBuilder(this.clientConfiguration.toBuilder()).build(); } @Override public void close() { clientHandler.close(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy