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

software.amazon.awssdk.services.databasemigration.DefaultDatabaseMigrationAsyncClient Maven / Gradle / Ivy

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

package software.amazon.awssdk.services.databasemigration;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsAsyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.AsyncClientHandler;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.databasemigration.model.AccessDeniedException;
import software.amazon.awssdk.services.databasemigration.model.AddTagsToResourceRequest;
import software.amazon.awssdk.services.databasemigration.model.AddTagsToResourceResponse;
import software.amazon.awssdk.services.databasemigration.model.ApplyPendingMaintenanceActionRequest;
import software.amazon.awssdk.services.databasemigration.model.ApplyPendingMaintenanceActionResponse;
import software.amazon.awssdk.services.databasemigration.model.CancelReplicationTaskAssessmentRunRequest;
import software.amazon.awssdk.services.databasemigration.model.CancelReplicationTaskAssessmentRunResponse;
import software.amazon.awssdk.services.databasemigration.model.CollectorNotFoundException;
import software.amazon.awssdk.services.databasemigration.model.CreateEndpointRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateEndpointResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateEventSubscriptionRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateEventSubscriptionResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateFleetAdvisorCollectorRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateFleetAdvisorCollectorResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationInstanceRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationInstanceResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationSubnetGroupRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationSubnetGroupResponse;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.CreateReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.DatabaseMigrationException;
import software.amazon.awssdk.services.databasemigration.model.DatabaseMigrationRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteCertificateRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteCertificateResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteConnectionRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteConnectionResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteEndpointRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteEndpointResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteEventSubscriptionRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteEventSubscriptionResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteFleetAdvisorCollectorRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteFleetAdvisorCollectorResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteFleetAdvisorDatabasesRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteFleetAdvisorDatabasesResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationInstanceRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationInstanceResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationSubnetGroupRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationSubnetGroupResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationTaskAssessmentRunRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationTaskAssessmentRunResponse;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.DeleteReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeAccountAttributesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeAccountAttributesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeApplicableIndividualAssessmentsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeApplicableIndividualAssessmentsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeConnectionsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeConnectionsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointSettingsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointSettingsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointTypesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointTypesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEndpointsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventCategoriesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventCategoriesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventSubscriptionsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventSubscriptionsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeEventsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorCollectorsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorCollectorsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorDatabasesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorDatabasesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorLsaAnalysisRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorLsaAnalysisResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemaObjectSummaryRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemaObjectSummaryResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemasRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemasResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeOrderableReplicationInstancesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeOrderableReplicationInstancesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribePendingMaintenanceActionsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribePendingMaintenanceActionsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeRefreshSchemasStatusRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeRefreshSchemasStatusResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstanceTaskLogsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstanceTaskLogsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstancesRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstancesResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationSubnetGroupsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationSubnetGroupsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentResultsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentResultsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentRunsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentRunsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskIndividualAssessmentsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskIndividualAssessmentsResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTasksRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTasksResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeSchemasRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeSchemasResponse;
import software.amazon.awssdk.services.databasemigration.model.DescribeTableStatisticsRequest;
import software.amazon.awssdk.services.databasemigration.model.DescribeTableStatisticsResponse;
import software.amazon.awssdk.services.databasemigration.model.ImportCertificateRequest;
import software.amazon.awssdk.services.databasemigration.model.ImportCertificateResponse;
import software.amazon.awssdk.services.databasemigration.model.InsufficientResourceCapacityException;
import software.amazon.awssdk.services.databasemigration.model.InvalidCertificateException;
import software.amazon.awssdk.services.databasemigration.model.InvalidOperationException;
import software.amazon.awssdk.services.databasemigration.model.InvalidResourceStateException;
import software.amazon.awssdk.services.databasemigration.model.InvalidSubnetException;
import software.amazon.awssdk.services.databasemigration.model.KmsAccessDeniedException;
import software.amazon.awssdk.services.databasemigration.model.KmsDisabledException;
import software.amazon.awssdk.services.databasemigration.model.KmsException;
import software.amazon.awssdk.services.databasemigration.model.KmsInvalidStateException;
import software.amazon.awssdk.services.databasemigration.model.KmsKeyNotAccessibleException;
import software.amazon.awssdk.services.databasemigration.model.KmsNotFoundException;
import software.amazon.awssdk.services.databasemigration.model.KmsThrottlingException;
import software.amazon.awssdk.services.databasemigration.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.databasemigration.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyEndpointRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyEndpointResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyEventSubscriptionRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyEventSubscriptionResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationInstanceRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationInstanceResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationSubnetGroupRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationSubnetGroupResponse;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.ModifyReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.MoveReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.MoveReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.RebootReplicationInstanceRequest;
import software.amazon.awssdk.services.databasemigration.model.RebootReplicationInstanceResponse;
import software.amazon.awssdk.services.databasemigration.model.RefreshSchemasRequest;
import software.amazon.awssdk.services.databasemigration.model.RefreshSchemasResponse;
import software.amazon.awssdk.services.databasemigration.model.ReloadTablesRequest;
import software.amazon.awssdk.services.databasemigration.model.ReloadTablesResponse;
import software.amazon.awssdk.services.databasemigration.model.RemoveTagsFromResourceRequest;
import software.amazon.awssdk.services.databasemigration.model.RemoveTagsFromResourceResponse;
import software.amazon.awssdk.services.databasemigration.model.ReplicationSubnetGroupDoesNotCoverEnoughAZsException;
import software.amazon.awssdk.services.databasemigration.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.databasemigration.model.ResourceNotFoundException;
import software.amazon.awssdk.services.databasemigration.model.ResourceQuotaExceededException;
import software.amazon.awssdk.services.databasemigration.model.RunFleetAdvisorLsaAnalysisRequest;
import software.amazon.awssdk.services.databasemigration.model.RunFleetAdvisorLsaAnalysisResponse;
import software.amazon.awssdk.services.databasemigration.model.S3AccessDeniedException;
import software.amazon.awssdk.services.databasemigration.model.S3ResourceNotFoundException;
import software.amazon.awssdk.services.databasemigration.model.SnsInvalidTopicException;
import software.amazon.awssdk.services.databasemigration.model.SnsNoAuthorizationException;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskAssessmentRequest;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskAssessmentResponse;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskAssessmentRunRequest;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskAssessmentRunResponse;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.StartReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.StopReplicationTaskRequest;
import software.amazon.awssdk.services.databasemigration.model.StopReplicationTaskResponse;
import software.amazon.awssdk.services.databasemigration.model.StorageQuotaExceededException;
import software.amazon.awssdk.services.databasemigration.model.SubnetAlreadyInUseException;
import software.amazon.awssdk.services.databasemigration.model.TestConnectionRequest;
import software.amazon.awssdk.services.databasemigration.model.TestConnectionResponse;
import software.amazon.awssdk.services.databasemigration.model.UpdateSubscriptionsToEventBridgeRequest;
import software.amazon.awssdk.services.databasemigration.model.UpdateSubscriptionsToEventBridgeResponse;
import software.amazon.awssdk.services.databasemigration.model.UpgradeDependencyFailureException;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeApplicableIndividualAssessmentsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeCertificatesPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeConnectionsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointSettingsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointTypesPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeEventSubscriptionsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorCollectorsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorDatabasesPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorLsaAnalysisPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemaObjectSummaryPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemasPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeOrderableReplicationInstancesPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribePendingMaintenanceActionsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstanceTaskLogsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstancesPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationSubnetGroupsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentResultsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentRunsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskIndividualAssessmentsPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTasksPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeSchemasPublisher;
import software.amazon.awssdk.services.databasemigration.paginators.DescribeTableStatisticsPublisher;
import software.amazon.awssdk.services.databasemigration.transform.AddTagsToResourceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ApplyPendingMaintenanceActionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CancelReplicationTaskAssessmentRunRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateEndpointRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateFleetAdvisorCollectorRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateReplicationInstanceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateReplicationSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.CreateReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteCertificateRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteConnectionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteEndpointRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteFleetAdvisorCollectorRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteFleetAdvisorDatabasesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteReplicationInstanceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteReplicationSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteReplicationTaskAssessmentRunRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DeleteReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeAccountAttributesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeApplicableIndividualAssessmentsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeCertificatesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeConnectionsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEndpointSettingsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEndpointTypesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEndpointsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEventCategoriesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEventSubscriptionsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeEventsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeFleetAdvisorCollectorsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeFleetAdvisorDatabasesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeFleetAdvisorLsaAnalysisRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeFleetAdvisorSchemaObjectSummaryRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeFleetAdvisorSchemasRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeOrderableReplicationInstancesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribePendingMaintenanceActionsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeRefreshSchemasStatusRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationInstanceTaskLogsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationInstancesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationSubnetGroupsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationTaskAssessmentResultsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationTaskAssessmentRunsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationTaskIndividualAssessmentsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeReplicationTasksRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeSchemasRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.DescribeTableStatisticsRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ImportCertificateRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyEndpointRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyEventSubscriptionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyReplicationInstanceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyReplicationSubnetGroupRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ModifyReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.MoveReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.RebootReplicationInstanceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.RefreshSchemasRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.ReloadTablesRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.RemoveTagsFromResourceRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.RunFleetAdvisorLsaAnalysisRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartReplicationTaskAssessmentRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartReplicationTaskAssessmentRunRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StartReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.StopReplicationTaskRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.TestConnectionRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.transform.UpdateSubscriptionsToEventBridgeRequestMarshaller;
import software.amazon.awssdk.services.databasemigration.waiters.DatabaseMigrationAsyncWaiter;
import software.amazon.awssdk.utils.CompletableFutureUtils;

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

    private final AsyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    private final ScheduledExecutorService executorService;

    protected DefaultDatabaseMigrationAsyncClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsAsyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
        this.executorService = clientConfiguration.option(SdkClientOption.SCHEDULED_EXECUTOR_SERVICE);
    }

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

    /**
     * 

* Adds metadata tags to an DMS resource, including replication instance, endpoint, security group, and migration * task. These tags can also be used with cost allocation reporting to track cost associated with DMS resources, or * used in a Condition statement in an IAM policy for DMS. For more information, see Tag data type * description. *

* * @param addTagsToResourceRequest * Associates a set of tags with an DMS resource. * @return A Java Future containing the result of the AddTagsToResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.AddTagsToResource * @see AWS API * Documentation */ @Override public CompletableFuture addTagsToResource(AddTagsToResourceRequest addTagsToResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, addTagsToResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AddTagsToResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, AddTagsToResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("AddTagsToResource") .withMarshaller(new AddTagsToResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(addTagsToResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Applies a pending maintenance action to a resource (for example, to a replication instance). *

* * @param applyPendingMaintenanceActionRequest * @return A Java Future containing the result of the ApplyPendingMaintenanceAction operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ApplyPendingMaintenanceAction * @see AWS API Documentation */ @Override public CompletableFuture applyPendingMaintenanceAction( ApplyPendingMaintenanceActionRequest applyPendingMaintenanceActionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, applyPendingMaintenanceActionRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ApplyPendingMaintenanceAction"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ApplyPendingMaintenanceActionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ApplyPendingMaintenanceAction") .withMarshaller(new ApplyPendingMaintenanceActionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(applyPendingMaintenanceActionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Cancels a single premigration assessment run. *

*

* This operation prevents any individual assessments from running if they haven't started running. It also attempts * to cancel any individual assessments that are currently running. *

* * @param cancelReplicationTaskAssessmentRunRequest * @return A Java Future containing the result of the CancelReplicationTaskAssessmentRun operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CancelReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public CompletableFuture cancelReplicationTaskAssessmentRun( CancelReplicationTaskAssessmentRunRequest cancelReplicationTaskAssessmentRunRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, cancelReplicationTaskAssessmentRunRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CancelReplicationTaskAssessmentRun"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, CancelReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CancelReplicationTaskAssessmentRun") .withMarshaller(new CancelReplicationTaskAssessmentRunRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(cancelReplicationTaskAssessmentRunRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an endpoint using the provided settings. *

* *

* For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName * request parameter on the CreateEndpoint API call. Specifying DatabaseName when you * create a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify * the database only when you specify the schema in the table-mapping rules of the DMS task. *

*
* * @param createEndpointRequest * @return A Java Future containing the result of the CreateEndpoint operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • S3AccessDeniedException Insufficient privileges are preventing access to an Amazon S3 object.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateEndpoint * @see AWS API * Documentation */ @Override public CompletableFuture createEndpoint(CreateEndpointRequest createEndpointRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createEndpointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEndpoint"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEndpoint") .withMarshaller(new CreateEndpointRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createEndpointRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates an DMS event notification subscription. *

*

* You can specify the type of source (SourceType) you want to be notified of, provide a list of DMS * source IDs (SourceIds) that triggers the events, and provide a list of event categories ( * EventCategories) for events you want to be notified of. If you specify both the * SourceType and SourceIds, such as SourceType = replication-instance and * SourceIdentifier = my-replinstance, you will be notified of all the replication instance events for * the specified source. If you specify a SourceType but don't specify a SourceIdentifier, * you receive notice of the events for that source type for all your DMS sources. If you don't specify either * SourceType nor SourceIdentifier, you will be notified of events generated from all DMS * sources belonging to your customer account. *

*

* For more information about DMS events, see Working with Events and * Notifications in the Database Migration Service User Guide. *

* * @param createEventSubscriptionRequest * @return A Java Future containing the result of the CreateEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • SnsInvalidTopicException The SNS topic is invalid.
  • *
  • SnsNoAuthorizationException You are not authorized for the SNS subscription.
  • *
  • KmsAccessDeniedException The ciphertext references a key that doesn't exist or that the DMS account * doesn't have access to.
  • *
  • KmsDisabledException The specified KMS key isn't enabled.
  • *
  • KmsInvalidStateException The state of the specified KMS resource isn't valid for this request.
  • *
  • KmsNotFoundException The specified KMS entity or resource can't be found.
  • *
  • KmsThrottlingException This request triggered KMS request throttling.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateEventSubscription * @see AWS * API Documentation */ @Override public CompletableFuture createEventSubscription( CreateEventSubscriptionRequest createEventSubscriptionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateEventSubscription"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateEventSubscription") .withMarshaller(new CreateEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createEventSubscriptionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a Fleet Advisor collector using the specified parameters. *

* * @param createFleetAdvisorCollectorRequest * @return A Java Future containing the result of the CreateFleetAdvisorCollector operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • S3AccessDeniedException Insufficient privileges are preventing access to an Amazon S3 object.
  • *
  • S3ResourceNotFoundException A specified Amazon S3 bucket, bucket folder, or other object can't be * found.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateFleetAdvisorCollector * @see AWS API Documentation */ @Override public CompletableFuture createFleetAdvisorCollector( CreateFleetAdvisorCollectorRequest createFleetAdvisorCollectorRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createFleetAdvisorCollectorRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateFleetAdvisorCollector"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateFleetAdvisorCollectorResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateFleetAdvisorCollector") .withMarshaller(new CreateFleetAdvisorCollectorRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createFleetAdvisorCollectorRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates the replication instance using the specified parameters. *

*

* DMS requires that your account have certain roles with appropriate permissions before you can create a * replication instance. For information on the required roles, see Creating the IAM * Roles to Use With the CLI and DMS API. For information on the required permissions, see IAM * Permissions Needed to Use DMS. *

* * @param createReplicationInstanceRequest * @return A Java Future containing the result of the CreateReplicationInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • InsufficientResourceCapacityException There are not enough resources allocated to the database * migration.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • StorageQuotaExceededException The storage quota has been exceeded.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ReplicationSubnetGroupDoesNotCoverEnoughAZsException The replication subnet group does not cover * enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • InvalidSubnetException The subnet provided is invalid.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateReplicationInstance * @see AWS * API Documentation */ @Override public CompletableFuture createReplicationInstance( CreateReplicationInstanceRequest createReplicationInstanceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createReplicationInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReplicationInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationInstance") .withMarshaller(new CreateReplicationInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createReplicationInstanceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a replication subnet group given a list of the subnet IDs in a VPC. *

*

* The VPC needs to have at least one subnet in at least two availability zones in the Amazon Web Services Region, * otherwise the service will throw a ReplicationSubnetGroupDoesNotCoverEnoughAZs exception. *

* * @param createReplicationSubnetGroupRequest * @return A Java Future containing the result of the CreateReplicationSubnetGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • ReplicationSubnetGroupDoesNotCoverEnoughAZsException The replication subnet group does not cover * enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.
  • *
  • InvalidSubnetException The subnet provided is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateReplicationSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture createReplicationSubnetGroup( CreateReplicationSubnetGroupRequest createReplicationSubnetGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createReplicationSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReplicationSubnetGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationSubnetGroup") .withMarshaller(new CreateReplicationSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createReplicationSubnetGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Creates a replication task using the specified parameters. *

* * @param createReplicationTaskRequest * @return A Java Future containing the result of the CreateReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.CreateReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture createReplicationTask( CreateReplicationTaskRequest createReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, createReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateReplicationTask") .withMarshaller(new CreateReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(createReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified certificate. *

* * @param deleteCertificateRequest * @return A Java Future containing the result of the DeleteCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteCertificate * @see AWS API * Documentation */ @Override public CompletableFuture deleteCertificate(DeleteCertificateRequest deleteCertificateRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteCertificate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteCertificate") .withMarshaller(new DeleteCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteCertificateRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the connection between a replication instance and an endpoint. *

* * @param deleteConnectionRequest * @return A Java Future containing the result of the DeleteConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteConnection * @see AWS API * Documentation */ @Override public CompletableFuture deleteConnection(DeleteConnectionRequest deleteConnectionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConnectionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConnection"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteConnectionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteConnection") .withMarshaller(new DeleteConnectionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteConnectionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified endpoint. *

* *

* All tasks associated with the endpoint must be deleted before you can delete the endpoint. *

*
*

* * @param deleteEndpointRequest * @return A Java Future containing the result of the DeleteEndpoint operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *

    *
  • ResourceNotFoundException The resource could not be found.
  • InvalidResourceStateException The * resource is in a state that prevents it from being used for database migration.
  • SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios.
  • SdkClientException If any client side error occurs such as an IO related * failure, failure to get credentials, etc.
  • DatabaseMigrationException Base class for all service * exceptions. Unknown exceptions will be thrown as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteEndpoint * @see AWS API * Documentation */ @Override public CompletableFuture deleteEndpoint(DeleteEndpointRequest deleteEndpointRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEndpointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEndpoint"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEndpoint") .withMarshaller(new DeleteEndpointRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteEndpointRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes an DMS event subscription. *

* * @param deleteEventSubscriptionRequest * @return A Java Future containing the result of the DeleteEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteEventSubscription * @see AWS * API Documentation */ @Override public CompletableFuture deleteEventSubscription( DeleteEventSubscriptionRequest deleteEventSubscriptionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteEventSubscription"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteEventSubscription") .withMarshaller(new DeleteEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteEventSubscriptionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified Fleet Advisor collector. *

* * @param deleteFleetAdvisorCollectorRequest * @return A Java Future containing the result of the DeleteFleetAdvisorCollector operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • CollectorNotFoundException The specified collector doesn't exist.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteFleetAdvisorCollector * @see AWS API Documentation */ @Override public CompletableFuture deleteFleetAdvisorCollector( DeleteFleetAdvisorCollectorRequest deleteFleetAdvisorCollectorRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFleetAdvisorCollectorRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFleetAdvisorCollector"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteFleetAdvisorCollectorResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteFleetAdvisorCollector") .withMarshaller(new DeleteFleetAdvisorCollectorRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteFleetAdvisorCollectorRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified Fleet Advisor collector databases. *

* * @param deleteFleetAdvisorDatabasesRequest * @return A Java Future containing the result of the DeleteFleetAdvisorDatabases operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidOperationException The action or operation requested isn't valid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteFleetAdvisorDatabases * @see AWS API Documentation */ @Override public CompletableFuture deleteFleetAdvisorDatabases( DeleteFleetAdvisorDatabasesRequest deleteFleetAdvisorDatabasesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteFleetAdvisorDatabasesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteFleetAdvisorDatabases"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteFleetAdvisorDatabasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteFleetAdvisorDatabases") .withMarshaller(new DeleteFleetAdvisorDatabasesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteFleetAdvisorDatabasesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified replication instance. *

* *

* You must delete any migration tasks that are associated with the replication instance before you can delete it. *

*
*

* * @param deleteReplicationInstanceRequest * @return A Java Future containing the result of the DeleteReplicationInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *

    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • ResourceNotFoundException The resource could not be found.
  • * SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can * be used for catch all scenarios.
  • SdkClientException If any client side error occurs such as an * IO related failure, failure to get credentials, etc.
  • DatabaseMigrationException Base class for * all service exceptions. Unknown exceptions will be thrown as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteReplicationInstance * @see AWS * API Documentation */ @Override public CompletableFuture deleteReplicationInstance( DeleteReplicationInstanceRequest deleteReplicationInstanceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReplicationInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReplicationInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationInstance") .withMarshaller(new DeleteReplicationInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteReplicationInstanceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes a subnet group. *

* * @param deleteReplicationSubnetGroupRequest * @return A Java Future containing the result of the DeleteReplicationSubnetGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteReplicationSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture deleteReplicationSubnetGroup( DeleteReplicationSubnetGroupRequest deleteReplicationSubnetGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReplicationSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReplicationSubnetGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationSubnetGroup") .withMarshaller(new DeleteReplicationSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteReplicationSubnetGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the specified replication task. *

* * @param deleteReplicationTaskRequest * @return A Java Future containing the result of the DeleteReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture deleteReplicationTask( DeleteReplicationTaskRequest deleteReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationTask") .withMarshaller(new DeleteReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Deletes the record of a single premigration assessment run. *

*

* This operation removes all metadata that DMS maintains about this assessment run. However, the operation leaves * untouched all information about this assessment run that is stored in your Amazon S3 bucket. *

* * @param deleteReplicationTaskAssessmentRunRequest * @return A Java Future containing the result of the DeleteReplicationTaskAssessmentRun operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DeleteReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public CompletableFuture deleteReplicationTaskAssessmentRun( DeleteReplicationTaskAssessmentRunRequest deleteReplicationTaskAssessmentRunRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteReplicationTaskAssessmentRunRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteReplicationTaskAssessmentRun"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DeleteReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteReplicationTaskAssessmentRun") .withMarshaller(new DeleteReplicationTaskAssessmentRunRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(deleteReplicationTaskAssessmentRunRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all of the DMS attributes for a customer account. These attributes include DMS quotas for the account and a * unique account identifier in a particular DMS region. DMS quotas include a list of resource quotas supported by * the account, such as the number of replication instances allowed. The description for each resource quota, * includes the quota name, current usage toward that quota, and the quota's maximum value. DMS uses the unique * account identifier to name each artifact used by DMS in the given region. *

*

* This command does not take any parameters. *

* * @param describeAccountAttributesRequest * @return A Java Future containing the result of the DescribeAccountAttributes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeAccountAttributes * @see AWS * API Documentation */ @Override public CompletableFuture describeAccountAttributes( DescribeAccountAttributesRequest describeAccountAttributesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountAttributesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccountAttributes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeAccountAttributesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeAccountAttributes") .withMarshaller(new DescribeAccountAttributesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeAccountAttributesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Provides a list of individual assessments that you can specify for a new premigration assessment run, given one * or more parameters. *

*

* If you specify an existing migration task, this operation provides the default individual assessments you can * specify for that task. Otherwise, the specified parameters model elements of a possible migration task on which * to base a premigration assessment run. *

*

* To use these migration task modeling parameters, you must specify an existing replication instance, a source * database engine, a target database engine, and a migration type. This combination of parameters potentially * limits the default individual assessments available for an assessment run created for a corresponding migration * task. *

*

* If you specify no parameters, this operation provides a list of all possible individual assessments that you can * specify for an assessment run. If you specify any one of the task modeling parameters, you must specify all of * them or the operation cannot provide a list of individual assessments. The only parameter that you can specify * alone is for an existing migration task. The specified task definition then determines the default list of * individual assessments that you can specify in an assessment run for the task. *

* * @param describeApplicableIndividualAssessmentsRequest * @return A Java Future containing the result of the DescribeApplicableIndividualAssessments operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeApplicableIndividualAssessments * @see AWS API Documentation */ @Override public CompletableFuture describeApplicableIndividualAssessments( DescribeApplicableIndividualAssessmentsRequest describeApplicableIndividualAssessmentsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeApplicableIndividualAssessmentsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeApplicableIndividualAssessments"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeApplicableIndividualAssessmentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeApplicableIndividualAssessments") .withMarshaller(new DescribeApplicableIndividualAssessmentsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector) .withInput(describeApplicableIndividualAssessmentsRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Provides a list of individual assessments that you can specify for a new premigration assessment run, given one * or more parameters. *

*

* If you specify an existing migration task, this operation provides the default individual assessments you can * specify for that task. Otherwise, the specified parameters model elements of a possible migration task on which * to base a premigration assessment run. *

*

* To use these migration task modeling parameters, you must specify an existing replication instance, a source * database engine, a target database engine, and a migration type. This combination of parameters potentially * limits the default individual assessments available for an assessment run created for a corresponding migration * task. *

*

* If you specify no parameters, this operation provides a list of all possible individual assessments that you can * specify for an assessment run. If you specify any one of the task modeling parameters, you must specify all of * them or the operation cannot provide a list of individual assessments. The only parameter that you can specify * alone is for an existing migration task. The specified task definition then determines the default list of * individual assessments that you can specify in an assessment run for the task. *

*
*

* This is a variant of * {@link #describeApplicableIndividualAssessments(software.amazon.awssdk.services.databasemigration.model.DescribeApplicableIndividualAssessmentsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeApplicableIndividualAssessmentsPublisher publisher = client.describeApplicableIndividualAssessmentsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeApplicableIndividualAssessmentsPublisher publisher = client.describeApplicableIndividualAssessmentsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeApplicableIndividualAssessmentsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeApplicableIndividualAssessmentsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeApplicableIndividualAssessments * @see AWS API Documentation */ public DescribeApplicableIndividualAssessmentsPublisher describeApplicableIndividualAssessmentsPaginator( DescribeApplicableIndividualAssessmentsRequest describeApplicableIndividualAssessmentsRequest) { return new DescribeApplicableIndividualAssessmentsPublisher(this, applyPaginatorUserAgent(describeApplicableIndividualAssessmentsRequest)); } /** *

* Provides a description of the certificate. *

* * @param describeCertificatesRequest * @return A Java Future containing the result of the DescribeCertificates operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeCertificates * @see AWS API * Documentation */ @Override public CompletableFuture describeCertificates( DescribeCertificatesRequest describeCertificatesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeCertificatesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeCertificates"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeCertificatesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeCertificates") .withMarshaller(new DescribeCertificatesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeCertificatesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Provides a description of the certificate. *

*
*

* This is a variant of * {@link #describeCertificates(software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeCertificatesPublisher publisher = client.describeCertificatesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeCertificatesPublisher publisher = client.describeCertificatesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeCertificatesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeCertificatesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeCertificates * @see AWS API * Documentation */ public DescribeCertificatesPublisher describeCertificatesPaginator(DescribeCertificatesRequest describeCertificatesRequest) { return new DescribeCertificatesPublisher(this, applyPaginatorUserAgent(describeCertificatesRequest)); } /** *

* Describes the status of the connections that have been made between the replication instance and an endpoint. * Connections are created when you test an endpoint. *

* * @param describeConnectionsRequest * @return A Java Future containing the result of the DescribeConnections operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeConnections * @see AWS API * Documentation */ @Override public CompletableFuture describeConnections( DescribeConnectionsRequest describeConnectionsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConnectionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConnections"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeConnectionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeConnections") .withMarshaller(new DescribeConnectionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeConnectionsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Describes the status of the connections that have been made between the replication instance and an endpoint. * Connections are created when you test an endpoint. *

*
*

* This is a variant of * {@link #describeConnections(software.amazon.awssdk.services.databasemigration.model.DescribeConnectionsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeConnectionsPublisher publisher = client.describeConnectionsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeConnectionsPublisher publisher = client.describeConnectionsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeConnectionsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeConnectionsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeConnections * @see AWS API * Documentation */ public DescribeConnectionsPublisher describeConnectionsPaginator(DescribeConnectionsRequest describeConnectionsRequest) { return new DescribeConnectionsPublisher(this, applyPaginatorUserAgent(describeConnectionsRequest)); } /** *

* Returns information about the possible endpoint settings available when you create an endpoint for a specific * database engine. *

* * @param describeEndpointSettingsRequest * @return A Java Future containing the result of the DescribeEndpointSettings operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpointSettings * @see AWS * API Documentation */ @Override public CompletableFuture describeEndpointSettings( DescribeEndpointSettingsRequest describeEndpointSettingsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointSettingsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpointSettings"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEndpointSettingsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpointSettings") .withMarshaller(new DescribeEndpointSettingsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEndpointSettingsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the possible endpoint settings available when you create an endpoint for a specific * database engine. *

*
*

* This is a variant of * {@link #describeEndpointSettings(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointSettingsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointSettingsPublisher publisher = client.describeEndpointSettingsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointSettingsPublisher publisher = client.describeEndpointSettingsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointSettingsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeEndpointSettingsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpointSettings * @see AWS * API Documentation */ public DescribeEndpointSettingsPublisher describeEndpointSettingsPaginator( DescribeEndpointSettingsRequest describeEndpointSettingsRequest) { return new DescribeEndpointSettingsPublisher(this, applyPaginatorUserAgent(describeEndpointSettingsRequest)); } /** *

* Returns information about the type of endpoints available. *

* * @param describeEndpointTypesRequest * @return A Java Future containing the result of the DescribeEndpointTypes operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpointTypes * @see AWS API * Documentation */ @Override public CompletableFuture describeEndpointTypes( DescribeEndpointTypesRequest describeEndpointTypesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointTypesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpointTypes"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEndpointTypesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpointTypes") .withMarshaller(new DescribeEndpointTypesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEndpointTypesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the type of endpoints available. *

*
*

* This is a variant of * {@link #describeEndpointTypes(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointTypesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointTypesPublisher publisher = client.describeEndpointTypesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointTypesPublisher publisher = client.describeEndpointTypesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointTypesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeEndpointTypesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpointTypes * @see AWS API * Documentation */ public DescribeEndpointTypesPublisher describeEndpointTypesPaginator(DescribeEndpointTypesRequest describeEndpointTypesRequest) { return new DescribeEndpointTypesPublisher(this, applyPaginatorUserAgent(describeEndpointTypesRequest)); } /** *

* Returns information about the endpoints for your account in the current region. *

* * @param describeEndpointsRequest * @return A Java Future containing the result of the DescribeEndpoints operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpoints * @see AWS API * Documentation */ @Override public CompletableFuture describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEndpointsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEndpoints"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEndpointsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEndpoints") .withMarshaller(new DescribeEndpointsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEndpointsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the endpoints for your account in the current region. *

*
*

* This is a variant of * {@link #describeEndpoints(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointsPublisher publisher = client.describeEndpointsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEndpointsPublisher publisher = client.describeEndpointsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeEndpointsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeEndpointsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEndpoints * @see AWS API * Documentation */ public DescribeEndpointsPublisher describeEndpointsPaginator(DescribeEndpointsRequest describeEndpointsRequest) { return new DescribeEndpointsPublisher(this, applyPaginatorUserAgent(describeEndpointsRequest)); } /** *

* Lists categories for all event source types, or, if specified, for a specified source type. You can see a list of * the event categories and source types in Working with Events and * Notifications in the Database Migration Service User Guide. *

* * @param describeEventCategoriesRequest * @return A Java Future containing the result of the DescribeEventCategories operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEventCategories * @see AWS * API Documentation */ @Override public CompletableFuture describeEventCategories( DescribeEventCategoriesRequest describeEventCategoriesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventCategoriesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventCategories"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventCategoriesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventCategories") .withMarshaller(new DescribeEventCategoriesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEventCategoriesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the event subscriptions for a customer account. The description of a subscription includes * SubscriptionName, SNSTopicARN, CustomerID, SourceType, * SourceID, CreationTime, and Status. *

*

* If you specify SubscriptionName, this action lists the description for that subscription. *

* * @param describeEventSubscriptionsRequest * @return A Java Future containing the result of the DescribeEventSubscriptions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEventSubscriptions * @see AWS API Documentation */ @Override public CompletableFuture describeEventSubscriptions( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventSubscriptionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEventSubscriptions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventSubscriptionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEventSubscriptions") .withMarshaller(new DescribeEventSubscriptionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEventSubscriptionsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all the event subscriptions for a customer account. The description of a subscription includes * SubscriptionName, SNSTopicARN, CustomerID, SourceType, * SourceID, CreationTime, and Status. *

*

* If you specify SubscriptionName, this action lists the description for that subscription. *

*
*

* This is a variant of * {@link #describeEventSubscriptions(software.amazon.awssdk.services.databasemigration.model.DescribeEventSubscriptionsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEventSubscriptionsPublisher publisher = client.describeEventSubscriptionsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEventSubscriptionsPublisher publisher = client.describeEventSubscriptionsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeEventSubscriptionsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeEventSubscriptionsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEventSubscriptions * @see AWS API Documentation */ public DescribeEventSubscriptionsPublisher describeEventSubscriptionsPaginator( DescribeEventSubscriptionsRequest describeEventSubscriptionsRequest) { return new DescribeEventSubscriptionsPublisher(this, applyPaginatorUserAgent(describeEventSubscriptionsRequest)); } /** *

* Lists events for a given source identifier and source type. You can also specify a start and end time. For more * information on DMS events, see Working with Events and * Notifications in the Database Migration Service User Guide. *

* * @param describeEventsRequest * @return A Java Future containing the result of the DescribeEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEvents * @see AWS API * Documentation */ @Override public CompletableFuture describeEvents(DescribeEventsRequest describeEventsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeEventsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeEvents"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeEventsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeEvents") .withMarshaller(new DescribeEventsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeEventsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists events for a given source identifier and source type. You can also specify a start and end time. For more * information on DMS events, see Working with Events and * Notifications in the Database Migration Service User Guide. *

*
*

* This is a variant of * {@link #describeEvents(software.amazon.awssdk.services.databasemigration.model.DescribeEventsRequest)} operation. * The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will * internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeEventsPublisher publisher = client.describeEventsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeEventsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeEventsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeEvents * @see AWS API * Documentation */ public DescribeEventsPublisher describeEventsPaginator(DescribeEventsRequest describeEventsRequest) { return new DescribeEventsPublisher(this, applyPaginatorUserAgent(describeEventsRequest)); } /** *

* Returns a list of the Fleet Advisor collectors in your account. *

* * @param describeFleetAdvisorCollectorsRequest * @return A Java Future containing the result of the DescribeFleetAdvisorCollectors operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorCollectors * @see AWS API Documentation */ @Override public CompletableFuture describeFleetAdvisorCollectors( DescribeFleetAdvisorCollectorsRequest describeFleetAdvisorCollectorsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetAdvisorCollectorsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetAdvisorCollectors"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorCollectorsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorCollectors") .withMarshaller(new DescribeFleetAdvisorCollectorsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeFleetAdvisorCollectorsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of the Fleet Advisor collectors in your account. *

*
*

* This is a variant of * {@link #describeFleetAdvisorCollectors(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorCollectorsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorCollectorsPublisher publisher = client.describeFleetAdvisorCollectorsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorCollectorsPublisher publisher = client.describeFleetAdvisorCollectorsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorCollectorsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeFleetAdvisorCollectorsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorCollectors * @see AWS API Documentation */ public DescribeFleetAdvisorCollectorsPublisher describeFleetAdvisorCollectorsPaginator( DescribeFleetAdvisorCollectorsRequest describeFleetAdvisorCollectorsRequest) { return new DescribeFleetAdvisorCollectorsPublisher(this, applyPaginatorUserAgent(describeFleetAdvisorCollectorsRequest)); } /** *

* Returns a list of Fleet Advisor databases in your account. *

* * @param describeFleetAdvisorDatabasesRequest * @return A Java Future containing the result of the DescribeFleetAdvisorDatabases operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorDatabases * @see AWS API Documentation */ @Override public CompletableFuture describeFleetAdvisorDatabases( DescribeFleetAdvisorDatabasesRequest describeFleetAdvisorDatabasesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetAdvisorDatabasesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetAdvisorDatabases"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorDatabasesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorDatabases") .withMarshaller(new DescribeFleetAdvisorDatabasesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeFleetAdvisorDatabasesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of Fleet Advisor databases in your account. *

*
*

* This is a variant of * {@link #describeFleetAdvisorDatabases(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorDatabasesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorDatabasesPublisher publisher = client.describeFleetAdvisorDatabasesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorDatabasesPublisher publisher = client.describeFleetAdvisorDatabasesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorDatabasesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeFleetAdvisorDatabasesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorDatabases * @see AWS API Documentation */ public DescribeFleetAdvisorDatabasesPublisher describeFleetAdvisorDatabasesPaginator( DescribeFleetAdvisorDatabasesRequest describeFleetAdvisorDatabasesRequest) { return new DescribeFleetAdvisorDatabasesPublisher(this, applyPaginatorUserAgent(describeFleetAdvisorDatabasesRequest)); } /** *

* Provides descriptions of large-scale assessment (LSA) analyses produced by your Fleet Advisor collectors. *

* * @param describeFleetAdvisorLsaAnalysisRequest * @return A Java Future containing the result of the DescribeFleetAdvisorLsaAnalysis operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorLsaAnalysis * @see AWS API Documentation */ @Override public CompletableFuture describeFleetAdvisorLsaAnalysis( DescribeFleetAdvisorLsaAnalysisRequest describeFleetAdvisorLsaAnalysisRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetAdvisorLsaAnalysisRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetAdvisorLsaAnalysis"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorLsaAnalysisResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorLsaAnalysis") .withMarshaller(new DescribeFleetAdvisorLsaAnalysisRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeFleetAdvisorLsaAnalysisRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Provides descriptions of large-scale assessment (LSA) analyses produced by your Fleet Advisor collectors. *

*
*

* This is a variant of * {@link #describeFleetAdvisorLsaAnalysis(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorLsaAnalysisRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorLsaAnalysisPublisher publisher = client.describeFleetAdvisorLsaAnalysisPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorLsaAnalysisPublisher publisher = client.describeFleetAdvisorLsaAnalysisPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorLsaAnalysisResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeFleetAdvisorLsaAnalysisRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorLsaAnalysis * @see AWS API Documentation */ public DescribeFleetAdvisorLsaAnalysisPublisher describeFleetAdvisorLsaAnalysisPaginator( DescribeFleetAdvisorLsaAnalysisRequest describeFleetAdvisorLsaAnalysisRequest) { return new DescribeFleetAdvisorLsaAnalysisPublisher(this, applyPaginatorUserAgent(describeFleetAdvisorLsaAnalysisRequest)); } /** *

* Provides descriptions of the schemas discovered by your Fleet Advisor collectors. *

* * @param describeFleetAdvisorSchemaObjectSummaryRequest * @return A Java Future containing the result of the DescribeFleetAdvisorSchemaObjectSummary operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorSchemaObjectSummary * @see AWS API Documentation */ @Override public CompletableFuture describeFleetAdvisorSchemaObjectSummary( DescribeFleetAdvisorSchemaObjectSummaryRequest describeFleetAdvisorSchemaObjectSummaryRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetAdvisorSchemaObjectSummaryRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetAdvisorSchemaObjectSummary"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeFleetAdvisorSchemaObjectSummaryResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorSchemaObjectSummary") .withMarshaller(new DescribeFleetAdvisorSchemaObjectSummaryRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector) .withInput(describeFleetAdvisorSchemaObjectSummaryRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Provides descriptions of the schemas discovered by your Fleet Advisor collectors. *

*
*

* This is a variant of * {@link #describeFleetAdvisorSchemaObjectSummary(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemaObjectSummaryRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemaObjectSummaryPublisher publisher = client.describeFleetAdvisorSchemaObjectSummaryPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemaObjectSummaryPublisher publisher = client.describeFleetAdvisorSchemaObjectSummaryPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemaObjectSummaryResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeFleetAdvisorSchemaObjectSummaryRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorSchemaObjectSummary * @see AWS API Documentation */ public DescribeFleetAdvisorSchemaObjectSummaryPublisher describeFleetAdvisorSchemaObjectSummaryPaginator( DescribeFleetAdvisorSchemaObjectSummaryRequest describeFleetAdvisorSchemaObjectSummaryRequest) { return new DescribeFleetAdvisorSchemaObjectSummaryPublisher(this, applyPaginatorUserAgent(describeFleetAdvisorSchemaObjectSummaryRequest)); } /** *

* Returns a list of schemas detected by Fleet Advisor Collectors in your account. *

* * @param describeFleetAdvisorSchemasRequest * @return A Java Future containing the result of the DescribeFleetAdvisorSchemas operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorSchemas * @see AWS API Documentation */ @Override public CompletableFuture describeFleetAdvisorSchemas( DescribeFleetAdvisorSchemasRequest describeFleetAdvisorSchemasRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeFleetAdvisorSchemasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeFleetAdvisorSchemas"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeFleetAdvisorSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeFleetAdvisorSchemas") .withMarshaller(new DescribeFleetAdvisorSchemasRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeFleetAdvisorSchemasRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a list of schemas detected by Fleet Advisor Collectors in your account. *

*
*

* This is a variant of * {@link #describeFleetAdvisorSchemas(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemasRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemasPublisher publisher = client.describeFleetAdvisorSchemasPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeFleetAdvisorSchemasPublisher publisher = client.describeFleetAdvisorSchemasPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeFleetAdvisorSchemasResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeFleetAdvisorSchemasRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeFleetAdvisorSchemas * @see AWS API Documentation */ public DescribeFleetAdvisorSchemasPublisher describeFleetAdvisorSchemasPaginator( DescribeFleetAdvisorSchemasRequest describeFleetAdvisorSchemasRequest) { return new DescribeFleetAdvisorSchemasPublisher(this, applyPaginatorUserAgent(describeFleetAdvisorSchemasRequest)); } /** *

* Returns information about the replication instance types that can be created in the specified region. *

* * @param describeOrderableReplicationInstancesRequest * @return A Java Future containing the result of the DescribeOrderableReplicationInstances operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeOrderableReplicationInstances * @see AWS API Documentation */ @Override public CompletableFuture describeOrderableReplicationInstances( DescribeOrderableReplicationInstancesRequest describeOrderableReplicationInstancesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeOrderableReplicationInstancesRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeOrderableReplicationInstances"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeOrderableReplicationInstancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeOrderableReplicationInstances") .withMarshaller(new DescribeOrderableReplicationInstancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeOrderableReplicationInstancesRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the replication instance types that can be created in the specified region. *

*
*

* This is a variant of * {@link #describeOrderableReplicationInstances(software.amazon.awssdk.services.databasemigration.model.DescribeOrderableReplicationInstancesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeOrderableReplicationInstancesPublisher publisher = client.describeOrderableReplicationInstancesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeOrderableReplicationInstancesPublisher publisher = client.describeOrderableReplicationInstancesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeOrderableReplicationInstancesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeOrderableReplicationInstancesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeOrderableReplicationInstances * @see AWS API Documentation */ public DescribeOrderableReplicationInstancesPublisher describeOrderableReplicationInstancesPaginator( DescribeOrderableReplicationInstancesRequest describeOrderableReplicationInstancesRequest) { return new DescribeOrderableReplicationInstancesPublisher(this, applyPaginatorUserAgent(describeOrderableReplicationInstancesRequest)); } /** *

* For internal use only *

* * @param describePendingMaintenanceActionsRequest * @return A Java Future containing the result of the DescribePendingMaintenanceActions operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribePendingMaintenanceActions * @see AWS API Documentation */ @Override public CompletableFuture describePendingMaintenanceActions( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describePendingMaintenanceActionsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribePendingMaintenanceActions"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribePendingMaintenanceActionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribePendingMaintenanceActions") .withMarshaller(new DescribePendingMaintenanceActionsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describePendingMaintenanceActionsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* For internal use only *

*
*

* This is a variant of * {@link #describePendingMaintenanceActions(software.amazon.awssdk.services.databasemigration.model.DescribePendingMaintenanceActionsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribePendingMaintenanceActionsPublisher publisher = client.describePendingMaintenanceActionsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribePendingMaintenanceActionsPublisher publisher = client.describePendingMaintenanceActionsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribePendingMaintenanceActionsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describePendingMaintenanceActionsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribePendingMaintenanceActions * @see AWS API Documentation */ public DescribePendingMaintenanceActionsPublisher describePendingMaintenanceActionsPaginator( DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest) { return new DescribePendingMaintenanceActionsPublisher(this, applyPaginatorUserAgent(describePendingMaintenanceActionsRequest)); } /** *

* Returns the status of the RefreshSchemas operation. *

* * @param describeRefreshSchemasStatusRequest * @return A Java Future containing the result of the DescribeRefreshSchemasStatus operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeRefreshSchemasStatus * @see AWS API Documentation */ @Override public CompletableFuture describeRefreshSchemasStatus( DescribeRefreshSchemasStatusRequest describeRefreshSchemasStatusRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeRefreshSchemasStatusRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeRefreshSchemasStatus"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeRefreshSchemasStatusResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeRefreshSchemasStatus") .withMarshaller(new DescribeRefreshSchemasStatusRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeRefreshSchemasStatusRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the task logs for the specified task. *

* * @param describeReplicationInstanceTaskLogsRequest * @return A Java Future containing the result of the DescribeReplicationInstanceTaskLogs operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationInstanceTaskLogs * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationInstanceTaskLogs( DescribeReplicationInstanceTaskLogsRequest describeReplicationInstanceTaskLogsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationInstanceTaskLogsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationInstanceTaskLogs"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationInstanceTaskLogsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationInstanceTaskLogs") .withMarshaller(new DescribeReplicationInstanceTaskLogsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeReplicationInstanceTaskLogsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the task logs for the specified task. *

*
*

* This is a variant of * {@link #describeReplicationInstanceTaskLogs(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstanceTaskLogsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstanceTaskLogsPublisher publisher = client.describeReplicationInstanceTaskLogsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstanceTaskLogsPublisher publisher = client.describeReplicationInstanceTaskLogsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstanceTaskLogsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationInstanceTaskLogsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationInstanceTaskLogs * @see AWS API Documentation */ public DescribeReplicationInstanceTaskLogsPublisher describeReplicationInstanceTaskLogsPaginator( DescribeReplicationInstanceTaskLogsRequest describeReplicationInstanceTaskLogsRequest) { return new DescribeReplicationInstanceTaskLogsPublisher(this, applyPaginatorUserAgent(describeReplicationInstanceTaskLogsRequest)); } /** *

* Returns information about replication instances for your account in the current region. *

* * @param describeReplicationInstancesRequest * @return A Java Future containing the result of the DescribeReplicationInstances operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationInstances * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationInstances( DescribeReplicationInstancesRequest describeReplicationInstancesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationInstancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationInstances"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationInstancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationInstances") .withMarshaller(new DescribeReplicationInstancesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeReplicationInstancesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about replication instances for your account in the current region. *

*
*

* This is a variant of * {@link #describeReplicationInstances(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstancesRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstancesPublisher publisher = client.describeReplicationInstancesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationInstancesPublisher publisher = client.describeReplicationInstancesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationInstancesResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationInstancesRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationInstances * @see AWS API Documentation */ public DescribeReplicationInstancesPublisher describeReplicationInstancesPaginator( DescribeReplicationInstancesRequest describeReplicationInstancesRequest) { return new DescribeReplicationInstancesPublisher(this, applyPaginatorUserAgent(describeReplicationInstancesRequest)); } /** *

* Returns information about the replication subnet groups. *

* * @param describeReplicationSubnetGroupsRequest * @return A Java Future containing the result of the DescribeReplicationSubnetGroups operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationSubnetGroups * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationSubnetGroups( DescribeReplicationSubnetGroupsRequest describeReplicationSubnetGroupsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationSubnetGroupsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationSubnetGroups"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationSubnetGroupsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationSubnetGroups") .withMarshaller(new DescribeReplicationSubnetGroupsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeReplicationSubnetGroupsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the replication subnet groups. *

*
*

* This is a variant of * {@link #describeReplicationSubnetGroups(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationSubnetGroupsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationSubnetGroupsPublisher publisher = client.describeReplicationSubnetGroupsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationSubnetGroupsPublisher publisher = client.describeReplicationSubnetGroupsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationSubnetGroupsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationSubnetGroupsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationSubnetGroups * @see AWS API Documentation */ public DescribeReplicationSubnetGroupsPublisher describeReplicationSubnetGroupsPaginator( DescribeReplicationSubnetGroupsRequest describeReplicationSubnetGroupsRequest) { return new DescribeReplicationSubnetGroupsPublisher(this, applyPaginatorUserAgent(describeReplicationSubnetGroupsRequest)); } /** *

* Returns the task assessment results from the Amazon S3 bucket that DMS creates in your Amazon Web Services * account. This action always returns the latest results. *

*

* For more information about DMS task assessments, see Creating a task * assessment report in the Database Migration Service User Guide. *

* * @param describeReplicationTaskAssessmentResultsRequest * @return A Java Future containing the result of the DescribeReplicationTaskAssessmentResults operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskAssessmentResults * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationTaskAssessmentResults( DescribeReplicationTaskAssessmentResultsRequest describeReplicationTaskAssessmentResultsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationTaskAssessmentResultsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationTaskAssessmentResults"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskAssessmentResultsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskAssessmentResults") .withMarshaller(new DescribeReplicationTaskAssessmentResultsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector) .withInput(describeReplicationTaskAssessmentResultsRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns the task assessment results from the Amazon S3 bucket that DMS creates in your Amazon Web Services * account. This action always returns the latest results. *

*

* For more information about DMS task assessments, see Creating a task * assessment report in the Database Migration Service User Guide. *

*
*

* This is a variant of * {@link #describeReplicationTaskAssessmentResults(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentResultsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentResultsPublisher publisher = client.describeReplicationTaskAssessmentResultsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentResultsPublisher publisher = client.describeReplicationTaskAssessmentResultsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentResultsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationTaskAssessmentResultsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskAssessmentResults * @see AWS API Documentation */ public DescribeReplicationTaskAssessmentResultsPublisher describeReplicationTaskAssessmentResultsPaginator( DescribeReplicationTaskAssessmentResultsRequest describeReplicationTaskAssessmentResultsRequest) { return new DescribeReplicationTaskAssessmentResultsPublisher(this, applyPaginatorUserAgent(describeReplicationTaskAssessmentResultsRequest)); } /** *

* Returns a paginated list of premigration assessment runs based on filter settings. *

*

* These filter settings can specify a combination of premigration assessment runs, migration tasks, replication * instances, and assessment run status values. *

* *

* This operation doesn't return information about individual assessments. For this information, see the * DescribeReplicationTaskIndividualAssessments operation. *

*
* * @param describeReplicationTaskAssessmentRunsRequest * @return A Java Future containing the result of the DescribeReplicationTaskAssessmentRuns operation returned by * the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskAssessmentRuns * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationTaskAssessmentRuns( DescribeReplicationTaskAssessmentRunsRequest describeReplicationTaskAssessmentRunsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationTaskAssessmentRunsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationTaskAssessmentRuns"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskAssessmentRunsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskAssessmentRuns") .withMarshaller(new DescribeReplicationTaskAssessmentRunsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeReplicationTaskAssessmentRunsRequest)); CompletableFuture whenCompleted = executeFuture .whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a paginated list of premigration assessment runs based on filter settings. *

*

* These filter settings can specify a combination of premigration assessment runs, migration tasks, replication * instances, and assessment run status values. *

* *

* This operation doesn't return information about individual assessments. For this information, see the * DescribeReplicationTaskIndividualAssessments operation. *

*

*

* This is a variant of * {@link #describeReplicationTaskAssessmentRuns(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentRunsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentRunsPublisher publisher = client.describeReplicationTaskAssessmentRunsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskAssessmentRunsPublisher publisher = client.describeReplicationTaskAssessmentRunsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskAssessmentRunsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationTaskAssessmentRunsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskAssessmentRuns * @see AWS API Documentation */ public DescribeReplicationTaskAssessmentRunsPublisher describeReplicationTaskAssessmentRunsPaginator( DescribeReplicationTaskAssessmentRunsRequest describeReplicationTaskAssessmentRunsRequest) { return new DescribeReplicationTaskAssessmentRunsPublisher(this, applyPaginatorUserAgent(describeReplicationTaskAssessmentRunsRequest)); } /** *

* Returns a paginated list of individual assessments based on filter settings. *

*

* These filter settings can specify a combination of premigration assessment runs, migration tasks, and assessment * status values. *

* * @param describeReplicationTaskIndividualAssessmentsRequest * @return A Java Future containing the result of the DescribeReplicationTaskIndividualAssessments operation * returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskIndividualAssessments * @see AWS API Documentation */ @Override public CompletableFuture describeReplicationTaskIndividualAssessments( DescribeReplicationTaskIndividualAssessmentsRequest describeReplicationTaskIndividualAssessmentsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationTaskIndividualAssessmentsRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationTaskIndividualAssessments"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, DescribeReplicationTaskIndividualAssessmentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTaskIndividualAssessments") .withMarshaller(new DescribeReplicationTaskIndividualAssessmentsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector) .withInput(describeReplicationTaskIndividualAssessmentsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete(( r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns a paginated list of individual assessments based on filter settings. *

*

* These filter settings can specify a combination of premigration assessment runs, migration tasks, and assessment * status values. *

*
*

* This is a variant of * {@link #describeReplicationTaskIndividualAssessments(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskIndividualAssessmentsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskIndividualAssessmentsPublisher publisher = client.describeReplicationTaskIndividualAssessmentsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTaskIndividualAssessmentsPublisher publisher = client.describeReplicationTaskIndividualAssessmentsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTaskIndividualAssessmentsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationTaskIndividualAssessmentsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTaskIndividualAssessments * @see AWS API Documentation */ public DescribeReplicationTaskIndividualAssessmentsPublisher describeReplicationTaskIndividualAssessmentsPaginator( DescribeReplicationTaskIndividualAssessmentsRequest describeReplicationTaskIndividualAssessmentsRequest) { return new DescribeReplicationTaskIndividualAssessmentsPublisher(this, applyPaginatorUserAgent(describeReplicationTaskIndividualAssessmentsRequest)); } /** *

* Returns information about replication tasks for your account in the current region. *

* * @param describeReplicationTasksRequest * @return A Java Future containing the result of the DescribeReplicationTasks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTasks * @see AWS * API Documentation */ @Override public CompletableFuture describeReplicationTasks( DescribeReplicationTasksRequest describeReplicationTasksRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeReplicationTasksRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeReplicationTasks"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeReplicationTasksResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeReplicationTasks") .withMarshaller(new DescribeReplicationTasksRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeReplicationTasksRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about replication tasks for your account in the current region. *

*
*

* This is a variant of * {@link #describeReplicationTasks(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTasksRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTasksPublisher publisher = client.describeReplicationTasksPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeReplicationTasksPublisher publisher = client.describeReplicationTasksPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeReplicationTasksResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeReplicationTasksRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeReplicationTasks * @see AWS * API Documentation */ public DescribeReplicationTasksPublisher describeReplicationTasksPaginator( DescribeReplicationTasksRequest describeReplicationTasksRequest) { return new DescribeReplicationTasksPublisher(this, applyPaginatorUserAgent(describeReplicationTasksRequest)); } /** *

* Returns information about the schema for the specified endpoint. *

*

* * @param describeSchemasRequest * @return A Java Future containing the result of the DescribeSchemas operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *

    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • ResourceNotFoundException The resource could not be found.
  • * SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can * be used for catch all scenarios.
  • SdkClientException If any client side error occurs such as an * IO related failure, failure to get credentials, etc.
  • DatabaseMigrationException Base class for * all service exceptions. Unknown exceptions will be thrown as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeSchemas * @see AWS API * Documentation */ @Override public CompletableFuture describeSchemas(DescribeSchemasRequest describeSchemasRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeSchemasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeSchemas"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeSchemas") .withMarshaller(new DescribeSchemasRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeSchemasRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns information about the schema for the specified endpoint. *

*

*
*

* This is a variant of * {@link #describeSchemas(software.amazon.awssdk.services.databasemigration.model.DescribeSchemasRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeSchemasPublisher publisher = client.describeSchemasPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeSchemasPublisher publisher = client.describeSchemasPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeSchemasResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeSchemasRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeSchemas * @see AWS API * Documentation */ public DescribeSchemasPublisher describeSchemasPaginator(DescribeSchemasRequest describeSchemasRequest) { return new DescribeSchemasPublisher(this, applyPaginatorUserAgent(describeSchemasRequest)); } /** *

* Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and * rows deleted. *

*

* Note that the "last updated" column the DMS console only indicates the time that DMS last updated the table * statistics record for a table. It does not indicate the time of the last update to the table. *

* * @param describeTableStatisticsRequest * @return A Java Future containing the result of the DescribeTableStatistics operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeTableStatistics * @see AWS * API Documentation */ @Override public CompletableFuture describeTableStatistics( DescribeTableStatisticsRequest describeTableStatisticsRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTableStatisticsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTableStatistics"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DescribeTableStatisticsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("DescribeTableStatistics") .withMarshaller(new DescribeTableStatisticsRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(describeTableStatisticsRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and * rows deleted. *

*

* Note that the "last updated" column the DMS console only indicates the time that DMS last updated the table * statistics record for a table. It does not indicate the time of the last update to the table. *

*
*

* This is a variant of * {@link #describeTableStatistics(software.amazon.awssdk.services.databasemigration.model.DescribeTableStatisticsRequest)} * operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. * SDK will internally handle making service calls for you. *

*

* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet * and so there is no guarantee that the request is valid. If there are errors in your request, you will see the * failures only after you start streaming the data. The subscribe method should be called as a request to start * streaming data. For more info, see * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the * starting request. *

* *

* The following are few ways to use the response class: *

* 1) Using the subscribe helper method * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeTableStatisticsPublisher publisher = client.describeTableStatisticsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.databasemigration.paginators.DescribeTableStatisticsPublisher publisher = client.describeTableStatisticsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.databasemigration.model.DescribeTableStatisticsResponse response) { //... };
     * });}
     * 
* * As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2. *

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

*

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

* * @param describeTableStatisticsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.DescribeTableStatistics * @see AWS * API Documentation */ public DescribeTableStatisticsPublisher describeTableStatisticsPaginator( DescribeTableStatisticsRequest describeTableStatisticsRequest) { return new DescribeTableStatisticsPublisher(this, applyPaginatorUserAgent(describeTableStatisticsRequest)); } /** *

* Uploads the specified certificate. *

* * @param importCertificateRequest * @return A Java Future containing the result of the ImportCertificate operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • InvalidCertificateException The certificate was not valid.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ImportCertificate * @see AWS API * Documentation */ @Override public CompletableFuture importCertificate(ImportCertificateRequest importCertificateRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, importCertificateRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportCertificate"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ImportCertificateResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ImportCertificate") .withMarshaller(new ImportCertificateRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(importCertificateRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Lists all metadata tags attached to an DMS resource, including replication instance, endpoint, security group, * and migration task. For more information, see Tag data type * description. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ListTagsForResource * @see AWS API * Documentation */ @Override public CompletableFuture listTagsForResource( ListTagsForResourceRequest listTagsForResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ListTagsForResource") .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(listTagsForResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the specified endpoint. *

* *

* For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName * request parameter on the ModifyEndpoint API call. Specifying DatabaseName when you * modify a MySQL endpoint replicates all the task tables to this single database. For MySQL endpoints, you specify * the database only when you specify the schema in the table-mapping rules of the DMS task. *

*
* * @param modifyEndpointRequest * @return A Java Future containing the result of the ModifyEndpoint operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ModifyEndpoint * @see AWS API * Documentation */ @Override public CompletableFuture modifyEndpoint(ModifyEndpointRequest modifyEndpointRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyEndpointRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyEndpoint"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyEndpointResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEndpoint") .withMarshaller(new ModifyEndpointRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(modifyEndpointRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies an existing DMS event notification subscription. *

* * @param modifyEventSubscriptionRequest * @return A Java Future containing the result of the ModifyEventSubscription operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SnsInvalidTopicException The SNS topic is invalid.
  • *
  • SnsNoAuthorizationException You are not authorized for the SNS subscription.
  • *
  • KmsAccessDeniedException The ciphertext references a key that doesn't exist or that the DMS account * doesn't have access to.
  • *
  • KmsDisabledException The specified KMS key isn't enabled.
  • *
  • KmsInvalidStateException The state of the specified KMS resource isn't valid for this request.
  • *
  • KmsNotFoundException The specified KMS entity or resource can't be found.
  • *
  • KmsThrottlingException This request triggered KMS request throttling.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ModifyEventSubscription * @see AWS * API Documentation */ @Override public CompletableFuture modifyEventSubscription( ModifyEventSubscriptionRequest modifyEventSubscriptionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyEventSubscriptionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyEventSubscription"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyEventSubscriptionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyEventSubscription") .withMarshaller(new ModifyEventSubscriptionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(modifyEventSubscriptionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the replication instance to apply new settings. You can change one or more parameters by specifying * these parameters and the new values in the request. *

*

* Some settings are applied during the maintenance window. *

*

* * @param modifyReplicationInstanceRequest * @return A Java Future containing the result of the ModifyReplicationInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *

    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • InvalidResourceStateException The resource is in a state that prevents it from being * used for database migration.
  • ResourceAlreadyExistsException The resource you are attempting to * create already exists.
  • ResourceNotFoundException The resource could not be found.
  • * InsufficientResourceCapacityException There are not enough resources allocated to the database migration. *
  • StorageQuotaExceededException The storage quota has been exceeded.
  • * UpgradeDependencyFailureException An upgrade dependency is preventing the database migration.
  • * SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can * be used for catch all scenarios.
  • SdkClientException If any client side error occurs such as an * IO related failure, failure to get credentials, etc.
  • DatabaseMigrationException Base class for * all service exceptions. Unknown exceptions will be thrown as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ModifyReplicationInstance * @see AWS * API Documentation */ @Override public CompletableFuture modifyReplicationInstance( ModifyReplicationInstanceRequest modifyReplicationInstanceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyReplicationInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyReplicationInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationInstance") .withMarshaller(new ModifyReplicationInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(modifyReplicationInstanceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the settings for the specified replication subnet group. *

* * @param modifyReplicationSubnetGroupRequest * @return A Java Future containing the result of the ModifyReplicationSubnetGroup operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SubnetAlreadyInUseException The specified subnet is already in use.
  • *
  • ReplicationSubnetGroupDoesNotCoverEnoughAZsException The replication subnet group does not cover * enough Availability Zones (AZs). Edit the replication subnet group and add more AZs.
  • *
  • InvalidSubnetException The subnet provided is invalid.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ModifyReplicationSubnetGroup * @see AWS API Documentation */ @Override public CompletableFuture modifyReplicationSubnetGroup( ModifyReplicationSubnetGroupRequest modifyReplicationSubnetGroupRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyReplicationSubnetGroupRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyReplicationSubnetGroup"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationSubnetGroupResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationSubnetGroup") .withMarshaller(new ModifyReplicationSubnetGroupRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(modifyReplicationSubnetGroupRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Modifies the specified replication task. *

*

* You can't modify the task endpoints. The task must be stopped before you can modify it. *

*

* For more information about DMS tasks, see Working with Migration Tasks in the * Database Migration Service User Guide. *

* * @param modifyReplicationTaskRequest * @return A Java Future containing the result of the ModifyReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ModifyReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture modifyReplicationTask( ModifyReplicationTaskRequest modifyReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ModifyReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ModifyReplicationTask") .withMarshaller(new ModifyReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(modifyReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Moves a replication task from its current replication instance to a different target replication instance using * the specified parameters. The target replication instance must be created with the same or later DMS version as * the current replication instance. *

* * @param moveReplicationTaskRequest * @return A Java Future containing the result of the MoveReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.MoveReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture moveReplicationTask( MoveReplicationTaskRequest moveReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, moveReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "MoveReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, MoveReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("MoveReplicationTask") .withMarshaller(new MoveReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(moveReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Reboots a replication instance. Rebooting results in a momentary outage, until the replication instance becomes * available again. *

* * @param rebootReplicationInstanceRequest * @return A Java Future containing the result of the RebootReplicationInstance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.RebootReplicationInstance * @see AWS * API Documentation */ @Override public CompletableFuture rebootReplicationInstance( RebootReplicationInstanceRequest rebootReplicationInstanceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, rebootReplicationInstanceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RebootReplicationInstance"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RebootReplicationInstanceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RebootReplicationInstance") .withMarshaller(new RebootReplicationInstanceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(rebootReplicationInstanceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Populates the schema for the specified endpoint. This is an asynchronous operation and can take several minutes. * You can check the status of this operation by calling the DescribeRefreshSchemasStatus operation. *

* * @param refreshSchemasRequest * @return A Java Future containing the result of the RefreshSchemas operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.RefreshSchemas * @see AWS API * Documentation */ @Override public CompletableFuture refreshSchemas(RefreshSchemasRequest refreshSchemasRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, refreshSchemasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RefreshSchemas"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RefreshSchemasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RefreshSchemas") .withMarshaller(new RefreshSchemasRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(refreshSchemasRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Reloads the target database table with the source data. *

*

* You can only use this operation with a task in the RUNNING state, otherwise the service will throw * an InvalidResourceStateFault exception. *

* * @param reloadTablesRequest * @return A Java Future containing the result of the ReloadTables operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.ReloadTables * @see AWS API * Documentation */ @Override public CompletableFuture reloadTables(ReloadTablesRequest reloadTablesRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, reloadTablesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ReloadTables"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ReloadTablesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("ReloadTables").withMarshaller(new ReloadTablesRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(reloadTablesRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Removes metadata tags from an DMS resource, including replication instance, endpoint, security group, and * migration task. For more information, see Tag data type * description. *

* * @param removeTagsFromResourceRequest * Removes one or more tags from an DMS resource. * @return A Java Future containing the result of the RemoveTagsFromResource operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.RemoveTagsFromResource * @see AWS * API Documentation */ @Override public CompletableFuture removeTagsFromResource( RemoveTagsFromResourceRequest removeTagsFromResourceRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, removeTagsFromResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RemoveTagsFromResource"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RemoveTagsFromResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RemoveTagsFromResource") .withMarshaller(new RemoveTagsFromResourceRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(removeTagsFromResourceRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Runs large-scale assessment (LSA) analysis on every Fleet Advisor collector in your account. *

* * @param runFleetAdvisorLsaAnalysisRequest * @return A Java Future containing the result of the RunFleetAdvisorLsaAnalysis operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.RunFleetAdvisorLsaAnalysis * @see AWS API Documentation */ @Override public CompletableFuture runFleetAdvisorLsaAnalysis( RunFleetAdvisorLsaAnalysisRequest runFleetAdvisorLsaAnalysisRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, runFleetAdvisorLsaAnalysisRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "RunFleetAdvisorLsaAnalysis"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, RunFleetAdvisorLsaAnalysisResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("RunFleetAdvisorLsaAnalysis") .withMarshaller(new RunFleetAdvisorLsaAnalysisRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(runFleetAdvisorLsaAnalysisRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Starts the replication task. *

*

* For more information about DMS tasks, see Working with Migration Tasks in the * Database Migration Service User Guide. *

* * @param startReplicationTaskRequest * @return A Java Future containing the result of the StartReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.StartReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture startReplicationTask( StartReplicationTaskRequest startReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, startReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartReplicationTask") .withMarshaller(new StartReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Starts the replication task assessment for unsupported data types in the source database. *

*

* You can only use this operation for a task if the following conditions are true: *

*
    *
  • *

    * The task must be in the stopped state. *

    *
  • *
  • *

    * The task must have successful connections to the source and target. *

    *
  • *
*

* If either of these conditions are not met, an InvalidResourceStateFault error will result. *

*

* For information about DMS task assessments, see Creating a task * assessment report in the Database Migration Service User Guide. *

* * @param startReplicationTaskAssessmentRequest * @return A Java Future containing the result of the StartReplicationTaskAssessment operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.StartReplicationTaskAssessment * @see AWS API Documentation */ @Override public CompletableFuture startReplicationTaskAssessment( StartReplicationTaskAssessmentRequest startReplicationTaskAssessmentRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, startReplicationTaskAssessmentRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartReplicationTaskAssessment"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartReplicationTaskAssessmentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartReplicationTaskAssessment") .withMarshaller(new StartReplicationTaskAssessmentRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startReplicationTaskAssessmentRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Starts a new premigration assessment run for one or more individual assessments of a migration task. *

*

* The assessments that you can specify depend on the source and target database engine and the migration type * defined for the given task. To run this operation, your migration task must already be created. After you run * this operation, you can review the status of each individual assessment. You can also run the migration task * manually after the assessment run and its individual assessments complete. *

* * @param startReplicationTaskAssessmentRunRequest * @return A Java Future containing the result of the StartReplicationTaskAssessmentRun operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • KmsAccessDeniedException The ciphertext references a key that doesn't exist or that the DMS account * doesn't have access to.
  • *
  • KmsDisabledException The specified KMS key isn't enabled.
  • *
  • KmsException An Key Management Service (KMS) error is preventing access to KMS.
  • *
  • KmsInvalidStateException The state of the specified KMS resource isn't valid for this request.
  • *
  • KmsNotFoundException The specified KMS entity or resource can't be found.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • S3AccessDeniedException Insufficient privileges are preventing access to an Amazon S3 object.
  • *
  • S3ResourceNotFoundException A specified Amazon S3 bucket, bucket folder, or other object can't be * found.
  • *
  • ResourceAlreadyExistsException The resource you are attempting to create already exists.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.StartReplicationTaskAssessmentRun * @see AWS API Documentation */ @Override public CompletableFuture startReplicationTaskAssessmentRun( StartReplicationTaskAssessmentRunRequest startReplicationTaskAssessmentRunRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, startReplicationTaskAssessmentRunRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartReplicationTaskAssessmentRun"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, StartReplicationTaskAssessmentRunResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StartReplicationTaskAssessmentRun") .withMarshaller(new StartReplicationTaskAssessmentRunRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(startReplicationTaskAssessmentRunRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Stops the replication task. *

* * @param stopReplicationTaskRequest * @return A Java Future containing the result of the StopReplicationTask operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.StopReplicationTask * @see AWS API * Documentation */ @Override public CompletableFuture stopReplicationTask( StopReplicationTaskRequest stopReplicationTaskRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, stopReplicationTaskRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StopReplicationTask"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StopReplicationTaskResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("StopReplicationTask") .withMarshaller(new StopReplicationTaskRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(stopReplicationTaskRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Tests the connection between the replication instance and the endpoint. *

* * @param testConnectionRequest * @return A Java Future containing the result of the TestConnection operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException The resource could not be found.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • KmsKeyNotAccessibleException DMS cannot access the KMS key.
  • *
  • ResourceQuotaExceededException The quota for this resource quota has been exceeded.
  • *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.TestConnection * @see AWS API * Documentation */ @Override public CompletableFuture testConnection(TestConnectionRequest testConnectionRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, testConnectionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TestConnection"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, TestConnectionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("TestConnection") .withMarshaller(new TestConnectionRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(testConnectionRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } /** *

* Migrates 10 active and enabled Amazon SNS subscriptions at a time and converts them to corresponding Amazon * EventBridge rules. By default, this operation migrates subscriptions only when all your replication instance * versions are 3.4.6 or higher. If any replication instances are from versions earlier than 3.4.6, the operation * raises an error and tells you to upgrade these instances to version 3.4.6 or higher. To enable migration * regardless of version, set the Force option to true. However, if you don't upgrade instances earlier * than version 3.4.6, some types of events might not be available when you use Amazon EventBridge. *

*

* To call this operation, make sure that you have certain permissions added to your user account. For more * information, see Migrating event subscriptions to Amazon EventBridge in the Amazon Web Services Database Migration Service * User Guide. *

* * @param updateSubscriptionsToEventBridgeRequest * @return A Java Future containing the result of the UpdateSubscriptionsToEventBridge operation returned by the * service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • AccessDeniedException DMS was denied access to the endpoint. Check that the role is correctly * configured.
  • *
  • InvalidResourceStateException The resource is in a state that prevents it from being used for * database migration.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • DatabaseMigrationException Base class for all service exceptions. Unknown exceptions will be thrown * as an instance of this type.
  • *
* @sample DatabaseMigrationAsyncClient.UpdateSubscriptionsToEventBridge * @see AWS API Documentation */ @Override public CompletableFuture updateSubscriptionsToEventBridge( UpdateSubscriptionsToEventBridgeRequest updateSubscriptionsToEventBridgeRequest) { List metricPublishers = resolveMetricPublishers(clientConfiguration, updateSubscriptionsToEventBridgeRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "Database Migration Service"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateSubscriptionsToEventBridge"); JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory .createResponseHandler(operationMetadata, UpdateSubscriptionsToEventBridgeResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); CompletableFuture executeFuture = clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateSubscriptionsToEventBridge") .withMarshaller(new UpdateSubscriptionsToEventBridgeRequestMarshaller(protocolFactory)) .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler) .withMetricCollector(apiCallMetricCollector).withInput(updateSubscriptionsToEventBridgeRequest)); CompletableFuture whenCompleted = executeFuture.whenComplete((r, e) -> { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); }); executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture); return executeFuture; } catch (Throwable t) { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); return CompletableFutureUtils.failedFuture(t); } } @Override public void close() { clientHandler.close(); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(DatabaseMigrationException::builder) .protocol(AwsJsonProtocol.AWS_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("KMSThrottlingFault") .exceptionBuilderSupplier(KmsThrottlingException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidOperationFault") .exceptionBuilderSupplier(InvalidOperationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidCertificateFault") .exceptionBuilderSupplier(InvalidCertificateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSInvalidStateFault") .exceptionBuilderSupplier(KmsInvalidStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSNotFoundFault") .exceptionBuilderSupplier(KmsNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSKeyNotAccessibleFault") .exceptionBuilderSupplier(KmsKeyNotAccessibleException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InsufficientResourceCapacityFault") .exceptionBuilderSupplier(InsufficientResourceCapacityException::builder).httpStatusCode(400) .build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceQuotaExceededFault") .exceptionBuilderSupplier(ResourceQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("S3AccessDeniedFault") .exceptionBuilderSupplier(S3AccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundFault") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSAccessDeniedFault") .exceptionBuilderSupplier(KmsAccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SubnetAlreadyInUse") .exceptionBuilderSupplier(SubnetAlreadyInUseException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceAlreadyExistsFault") .exceptionBuilderSupplier(ResourceAlreadyExistsException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidSubnet") .exceptionBuilderSupplier(InvalidSubnetException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("CollectorNotFoundFault") .exceptionBuilderSupplier(CollectorNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSFault").exceptionBuilderSupplier(KmsException::builder) .httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("UpgradeDependencyFailureFault") .exceptionBuilderSupplier(UpgradeDependencyFailureException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSInvalidTopicFault") .exceptionBuilderSupplier(SnsInvalidTopicException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedFault") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InvalidResourceStateFault") .exceptionBuilderSupplier(InvalidResourceStateException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("SNSNoAuthorizationFault") .exceptionBuilderSupplier(SnsNoAuthorizationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("KMSDisabledFault") .exceptionBuilderSupplier(KmsDisabledException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("StorageQuotaExceededFault") .exceptionBuilderSupplier(StorageQuotaExceededException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("S3ResourceNotFoundFault") .exceptionBuilderSupplier(S3ResourceNotFoundException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ReplicationSubnetGroupDoesNotCoverEnoughAZs") .exceptionBuilderSupplier(ReplicationSubnetGroupDoesNotCoverEnoughAZsException::builder) .httpStatusCode(400).build()); } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } @Override public DatabaseMigrationAsyncWaiter waiter() { return DatabaseMigrationAsyncWaiter.builder().client(this).scheduledExecutorService(executorService).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy